|
|
|
@@ -0,0 +1,53 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
namespace App\Http\Controllers\Web\SeasonTicketContract; |
|
|
|
|
|
|
|
use App\Http\Controllers\Web\WebController; |
|
|
|
use App\Kintone\Models\Customer; |
|
|
|
use App\Kintone\Models\ParkingRoom; |
|
|
|
use App\Kintone\Models\SeasonTicketContract; |
|
|
|
use App\Logic\GeneralApplicationManager; |
|
|
|
use App\Util\DateUtil; |
|
|
|
use Illuminate\Http\JsonResponse; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
|
|
|
|
class TerminationOrderOptionsController extends WebController |
|
|
|
{ |
|
|
|
|
|
|
|
public function name(): string |
|
|
|
{ |
|
|
|
return "定期契約解約申請用オプション取得"; |
|
|
|
} |
|
|
|
|
|
|
|
public function description(): string |
|
|
|
{ |
|
|
|
return "定期契約解約依頼用のオプションを取得する"; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function __construct(protected TerminationOrderOptionsParams $param, private GeneralApplicationManager $manager) |
|
|
|
{ |
|
|
|
parent::__construct(); |
|
|
|
$this->middleware('auth:sanctum'); |
|
|
|
} |
|
|
|
|
|
|
|
protected function run(Request $request): JsonResponse |
|
|
|
{ |
|
|
|
$param = $this->param; |
|
|
|
|
|
|
|
$customer = Customer::getSelf(); |
|
|
|
|
|
|
|
$seasonTicketContract = SeasonTicketContract::getAccess()->find($param->seasonTicketContractRecordNo); |
|
|
|
|
|
|
|
// $parking = $seasonTicketContract->parkingRoom(); |
|
|
|
|
|
|
|
$monthes = []; |
|
|
|
|
|
|
|
foreach (range(0, 3) as $m) { |
|
|
|
$target = DateUtil::now()->addMonth($m)->endOfMonth(); |
|
|
|
$monthes[] = $target->format('Y/m/d'); |
|
|
|
} |
|
|
|
|
|
|
|
return $this->successResponse(['monthes' => $monthes]); |
|
|
|
} |
|
|
|
} |