@php /* * 商品金額変更予約(待機中) * |登録・取消の権限は商品マスタの canUpdate と共有する(補助モーダルのAPIも同じ権限で判定) * |取消の確認文言は予約一覧(product-price-change-schedules)と統一する(steering §6-4)。 *  confirm() の引数に埋めるため、文字列中の引用符・記号は \uXXXX へ退避する。 *  改行は PHP_EOL ではなく "\n" 固定(Windows開発機と本番Linuxで文言が変わるため) */ $canUpdateSchedule = App\Services\Logic\Assist::getCurrentRoutePermissions()->canUpdate; $pendingSchedule = $priceSchedule->schedule ?? null; $scheduleTarget = App\Services\Logic\User\Product\ProductPriceChangeScheduleService::targetLabel( $product->product_code, $product->product_name); $cancelConfirmJs = json_encode( $scheduleTarget . " の予約を取消します。\n取消した予約は元に戻せません。よろしいですか?", JSON_UNESCAPED_UNICODE | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_AMP ); @endphp {{-- header --}} @php($breadcrumbs = [ '商品一覧'=>route('products.index', ['action'=>'back']), '商品入力'=>null ])
@php($canDestroy = (App\Services\Logic\Assist::getCurrentRoutePermissions()->canDestroy) ? '' : 'hidden') @php($canUpdate = (App\Services\Logic\Assist::getCurrentRoutePermissions()->canUpdate) ? '' : 'hidden') {{-- 商品金額変更予約(金額系6項目を適用開始日つきで予約する) --}} @if($canUpdateSchedule) @if(isset($pendingSchedule))
@csrf @else @endif @endif @if(App\Services\Logic\Assist::canViewRoute('product-price-change-schedules.index')) 予約一覧 @endif
{{-- contents --}}
{{-- entry --}}
@csrf @method('put') @include('user.products.partials.entry', ['mode'=>'edit'])
@if(!empty($setComponent)) @foreach($setComponent as $row) @php($id=is_array($row) ? $row['id'] : (property_exists($row, 'id') ? $row->id : '')) @if(!empty($id)) @endif @endforeach @endif @if(!empty($partComponent)) @foreach($partComponent as $row) @php($id=is_array($row) ? $row['id'] : (property_exists($row, 'id') ? $row->id : '')) @if(!empty($id)) @endif @endforeach @endif {{-- 商品金額変更予約 登録サブモーダル(入力フォームの外に置く。form の入れ子は不可) --}} {{-- 権限が無い場合はモーダルもスクリプトも描画しない(APIは Controller 側で 403 にする) --}} @if($canUpdateSchedule) @endif {{-- script --}}