관리-도구
편집 파일: e87ec583dcbb720787de2b5cc00a4fd3.php
<?php if (isset($component)) { $__componentOriginald7f77a02f879fd4954ea3c39c4e952cb = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginald7f77a02f879fd4954ea3c39c4e952cb = $attributes; } ?> <?php $component = Modules\LMS\View\Components\Dashboard\Layout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('dashboard-layout'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Modules\LMS\View\Components\Dashboard\Layout::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php $__env->slot('title', null, []); ?> <?php echo e(translate('Edit Coupon')); ?> <?php $__env->endSlot(); ?> <?php if (isset($component)) { $__componentOriginalcf27f2c2c873893339708d5fdeeb6984 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginalcf27f2c2c873893339708d5fdeeb6984 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => '7ee9c4f86007ba41bc79bbfab1cd8a68::admin.breadcrumb','data' => ['title' => 'Coupon','pageTo' => 'Edit Coupon','backUrl' => ''.e(route('coupon.index')).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('portal::admin.breadcrumb'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes(['title' => 'Coupon','page-to' => 'Edit Coupon','back-url' => ''.e(route('coupon.index')).'']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginalcf27f2c2c873893339708d5fdeeb6984)): ?> <?php $attributes = $__attributesOriginalcf27f2c2c873893339708d5fdeeb6984; ?> <?php unset($__attributesOriginalcf27f2c2c873893339708d5fdeeb6984); ?> <?php endif; ?> <?php if (isset($__componentOriginalcf27f2c2c873893339708d5fdeeb6984)): ?> <?php $component = $__componentOriginalcf27f2c2c873893339708d5fdeeb6984; ?> <?php unset($__componentOriginalcf27f2c2c873893339708d5fdeeb6984); ?> <?php endif; ?> <form action="<?php echo e(route('coupon.update', $coupon->id)); ?>" class="mb-4 form"> <?php echo method_field('PUT'); ?> <?php echo csrf_field(); ?> <div class="grid grid-cols-12 gap-x-4"> <div class="col-span-full lg:col-span-6 card"> <h6 class="leading-none text-xl font-semibold text-heading"><?php echo e(translate('Edit Coupons')); ?></h6> <div class="mt-7"> <div> <label for="coupon-name" class="form-label"><?php echo e(translate('Coupon Name')); ?><span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span></label> <input type="text" id="coupon-name" value="<?php echo e($coupon->name); ?>" name="name" class="form-input"> <span class="text-danger error-text name_err"></span> </div> <div class="mt-6"> <label class="form-label"><?php echo e(translate('Coupon Type')); ?><span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span></label> <select id="couponType" class="singleSelect" name="type" onchange="getCouponType()"> <option selected disabled> <?php echo e(translate('Select Coupon Type')); ?></option>t <?php $__currentLoopData = get_all_coupon_type(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $couponType): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($couponType->slug); ?>" <?php echo e($coupon->type == $couponType->slug ? 'selected' : ''); ?>><?php echo e($couponType->name); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="text-danger error-text type_err"></span> </div> <div class="mt-6 couponTypeField category <?php echo e($coupon->type == 'category' ? '' : 'hidden'); ?>"> <label class="form-label"> <?php echo e(translate('Selected Category')); ?><span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span></label> <select class="multipleSelect" name="categoryId[]" multiple="multiple"> <?php $__currentLoopData = get_all_category(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($category->id); ?>" <?php $__currentLoopData = $coupon->categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $couponCategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($couponCategory->id == $category->id ? 'selected' : ''); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>> <?php echo e($category->title); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="text-danger error-text categoryId_err"></span> </div> <div class="mt-6 couponTypeField course <?php echo e($coupon->type == 'course' ? '' : 'hidden'); ?>"> <label class="form-label"><?php echo e(translate('Selected Courses')); ?><span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span></label> <select class="multipleSelect" name="courseId[]" multiple="multiple"> <?php $__currentLoopData = get_all_course(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $course): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($course->id); ?>" <?php $__currentLoopData = $coupon->courses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $couponCourse): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($couponCourse->id == $course->id ? 'selected' : ''); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>> <?php echo e($course->title); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="text-danger error-text courseId_err"></span> </div> <div class="mt-6"> <label class="form-label"><?php echo e(translate('Discount Type')); ?><span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span></label> <select id="couponDiscountType" class="singleSelect discount-type" name="discount_type"> <option value="percentage" <?php echo e($coupon->discount_type == 'percentage' ? 'selected' : ''); ?>> <?php echo e(translate('Percent')); ?> </option> <option value="fixed" <?php echo e($coupon->discount_type == 'fixed' ? 'selected' : ''); ?>> <?php echo e(translate('Fixed')); ?> </option> </select> <span class="text-danger error-text discount_type_err"></span> </div> <!-- Discount Percent --> <div class="couponDiscountTypeField"> </div> </div> </div> <div class="col-span-full lg:col-span-6 card"> <div class=""> <label for="coupon-code" class="form-label"><?php echo e(translate('Coupon Code')); ?><span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span></label> <input type="text" id="coupon-code" placeholder="CXSDK" class="form-input" name="code" value="<?php echo e($coupon->code); ?>"> <span class="text-danger error-text code_err"></span> </div> <div class="mt-6"> <label for="max-useable-time" class="form-label"><?php echo e(translate('Max usable times')); ?></label> <input type="number" id="max-useable-time" class="form-input" name="total_useable" autocomplete="off" value="<?php echo e($coupon->total_useable); ?>" /> </div> <div class="mt-6"> <label for="min-order" class="form-label"><?php echo e(translate('Minimum Order')); ?></label> <input type="number" id="min-order" class="form-input" autocomplete="off" name="minimum_order_amount" value="<?php echo e($coupon->minimum_order_amount); ?>" /> </div> <div class="mt-6"> <label for="coupon-expire-date" class="form-label"><?php echo e(translate('Expire Date')); ?></label> <input type="datetime-local" class="form-input" name="expiration_date" value="<?php echo e($coupon->expiration_date); ?>" /> </div> </div> </div> <div class="card flex-center justify-end"> <button type="submit" class="next-form-btn btn b-solid btn-primary-solid dk-theme-card-square"><?php echo e(translate('Update')); ?></button> </div> </form> <?php $__env->startPush('js'); ?> <?php echo $__env->make('portal::js.couponjs', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> <?php $__env->stopPush(); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginald7f77a02f879fd4954ea3c39c4e952cb)): ?> <?php $attributes = $__attributesOriginald7f77a02f879fd4954ea3c39c4e952cb; ?> <?php unset($__attributesOriginald7f77a02f879fd4954ea3c39c4e952cb); ?> <?php endif; ?> <?php if (isset($__componentOriginald7f77a02f879fd4954ea3c39c4e952cb)): ?> <?php $component = $__componentOriginald7f77a02f879fd4954ea3c39c4e952cb; ?> <?php unset($__componentOriginald7f77a02f879fd4954ea3c39c4e952cb); ?> <?php endif; ?> <?php /**PATH D:\www\edulab\Modules\LMS\resources\views\portals\admin\coupon\edit.blade.php ENDPATH**/ ?>