fix: [sales] Alpine.js promoFreeMonths 미정의 및 closeModal 미정의 오류 수정
- product-selection: Alpine x-data에 promoFreeMonths 속성 추가 및 저장 데이터에 포함 - price-simulator: promoFreeMonths 속성 추가 및 resetPromo()에 초기화 추가 - DemoTenantController: HX-Boosted 제외 조건 제거하여 hx-boost 탐색 시에도 전체 페이지 로드
This commit is contained in:
@@ -37,7 +37,7 @@ class DemoTenantController extends Controller
|
||||
*/
|
||||
public function index(Request $request): View
|
||||
{
|
||||
if ($request->header('HX-Request') && ! $request->header('HX-Boosted')) {
|
||||
if ($request->header('HX-Request')) {
|
||||
return response('', 200)->header('HX-Redirect', route('sales.demo-tenants.index'));
|
||||
}
|
||||
|
||||
|
||||
@@ -491,6 +491,7 @@ function productSelection() {
|
||||
promoDevWaive: {{ !empty($savedPromotion['dev_waive']) ? 'true' : 'false' }},
|
||||
promoSubPercent: {{ $savedPromotion['sub_discount_percent'] ?? 0 }},
|
||||
promoFreeTrial: {{ !empty($savedPromotion['free_trial']) ? 'true' : 'false' }},
|
||||
promoFreeMonths: {{ $savedPromotion['free_months'] ?? 0 }},
|
||||
promoNote: '{{ addslashes($savedPromotion['note'] ?? '') }}',
|
||||
|
||||
isSelected(id) {
|
||||
@@ -714,6 +715,7 @@ function productSelection() {
|
||||
dev_waive: this.promoDevWaive,
|
||||
sub_discount_percent: this.promoSubPercent,
|
||||
free_trial: this.promoFreeTrial,
|
||||
free_months: this.promoFreeMonths,
|
||||
note: this.promoNote,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1295,6 +1295,7 @@ function buildRequiredSelected(catId) {
|
||||
promoWaiveRegistration: false,
|
||||
promoSubscriptionPercent: 0,
|
||||
promoFreeTrial: false,
|
||||
promoFreeMonths: 0,
|
||||
promoNote: '',
|
||||
|
||||
// --- 카테고리 선택 (상호 배타) ---
|
||||
@@ -1531,6 +1532,7 @@ function buildRequiredSelected(catId) {
|
||||
this.promoWaiveRegistration = false;
|
||||
this.promoSubscriptionPercent = 0;
|
||||
this.promoFreeTrial = false;
|
||||
this.promoFreeMonths = 0;
|
||||
this.promoNote = '';
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user