ok
Direktori : /home2/selectio/www/fms-worksuite/storage/framework/views/ |
Current File : /home2/selectio/www/fms-worksuite/storage/framework/views/f597815690797481fab500eda6d1fbdc.php |
<?php $addProductCategoryPermission = user()->permission('manage_product_category'); $addProductSubCategoryPermission = user()->permission('manage_product_sub_category'); ?> <link rel="stylesheet" href="<?php echo e(asset('vendor/css/dropzone.min.css')); ?>"> <div class="row"> <div class="col-sm-12"> <?php if (isset($component)) { $__componentOriginal18ad2e0d264f9740dc73fff715357c28 = $component; } ?> <?php $component = App\View\Components\Form::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('form'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Form::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['id' => 'save-product-form']); ?> <?php echo $__env->make('sections.password-autocomplete-hide', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <div class="add-client bg-white rounded"> <h4 class="mb-0 p-20 f-21 font-weight-normal text-capitalize border-bottom-grey"> <?php echo app('translator')->get('app.menu.addProducts'); ?></h4> <div class="row p-20"> <div class="col-lg-12"> <div class="row"> <input type="hidden" id="hiddenProductId"> <div class="col-lg-4 col-md-6"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldId' => 'name','fieldLabel' => __('app.name'),'fieldName' => 'name','fieldRequired' => 'true','fieldPlaceholder' => __('placeholders.productName')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.text'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Text::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal4e45e801405ab67097982370a6a83cba)): ?> <?php $component = $__componentOriginal4e45e801405ab67097982370a6a83cba; ?> <?php unset($__componentOriginal4e45e801405ab67097982370a6a83cba); ?> <?php endif; ?> </div> <div class="col-lg-4 col-md-6"> <?php if (isset($component)) { $__componentOriginal1fded940a0a5d34bf1b88a1f45916593 = $component; } ?> <?php $component = App\View\Components\Forms\Number::resolve(['fieldLabel' => __('app.price'),'fieldName' => 'price','fieldId' => 'price','fieldRequired' => 'true','fieldPlaceholder' => __('placeholders.price'),'fieldValue' => '0'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.number'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Number::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-0 mr-lg-2 mr-md-2']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal1fded940a0a5d34bf1b88a1f45916593)): ?> <?php $component = $__componentOriginal1fded940a0a5d34bf1b88a1f45916593; ?> <?php unset($__componentOriginal1fded940a0a5d34bf1b88a1f45916593); ?> <?php endif; ?> </div> <div class="col-lg-4 col-md-6"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => '','fieldLabel' => __('modules.productCategory.productCategory')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7 = $component; } ?> <?php $component = App\View\Components\Forms\InputGroup::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.input-group'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\InputGroup::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <select class="form-control select-picker" name="category_id" id="product_category_id" data-live-search="true"> <option value="">--</option> <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($category->id); ?>"> <?php echo e(mb_ucwords($category->category_name)); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if($addProductCategoryPermission == 'all' || $addProductCategoryPermission == 'added'): ?> <?php $__env->slot('append', null, []); ?> <button id="add-category" type="button" data-toggle="tooltip" data-original-title="<?php echo e(__('app.add').' '.__('modules.productCategory.productCategory')); ?>" class="btn btn-outline-secondary border-grey"><?php echo app('translator')->get('app.add'); ?></button> <?php $__env->endSlot(); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> <div class="col-lg-4 col-md-6"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => '','fieldLabel' => __('modules.productCategory.productSubCategory')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7 = $component; } ?> <?php $component = App\View\Components\Forms\InputGroup::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.input-group'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\InputGroup::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <select class="form-control select-picker" name="sub_category_id" id="sub_category_id" data-live-search="true"> <option value=""><?php echo app('translator')->get('messages.noProductSubCategoryAdded'); ?></option> <?php $__currentLoopData = $subCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subCategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($subCategory->id); ?>"> <?php echo e(mb_ucwords($subCategory->category_name)); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if($addProductSubCategoryPermission == 'all' || $addProductSubCategoryPermission == 'added'): ?> <?php $__env->slot('append', null, []); ?> <button id="add-sub-category" type="button" data-toggle="tooltip" data-original-title="<?php echo e(__('app.add').' '.__('modules.productCategory.productSubCategory')); ?>" class="btn btn-outline-secondary border-grey"><?php echo app('translator')->get('app.add'); ?></button> <?php $__env->endSlot(); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> <div class="col-lg-4 col-md-6"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => '','fieldLabel' => __('modules.invoices.tax')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7 = $component; } ?> <?php $component = App\View\Components\Forms\InputGroup::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.input-group'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\InputGroup::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <select class="form-control select-picker" name="tax[]" id="tax_id" data-live-search="true" multiple="true"> <?php $__currentLoopData = $taxes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tax): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($tax->id); ?>"><?php echo e(strtoupper($tax->tax_name)); ?>: <?php echo e($tax->rate_percent); ?>% </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if(user()->permission('manage_tax') == 'all'): ?> <?php $__env->slot('append', null, []); ?> <button id="add-tax" type="button" data-toggle="tooltip" data-original-title="<?php echo e(__('app.add').' '.__('modules.invoices.tax')); ?>" class="btn btn-outline-secondary border-grey"><?php echo app('translator')->get('app.add'); ?></button> <?php $__env->endSlot(); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> <div class="col-lg-4 col-md-6"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldId' => 'hsn_sac_code','fieldLabel' => __('app.hsnSac'),'fieldName' => 'hsn_sac_code','fieldPlaceholder' => __('placeholders.hsnSac')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.text'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Text::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal4e45e801405ab67097982370a6a83cba)): ?> <?php $component = $__componentOriginal4e45e801405ab67097982370a6a83cba; ?> <?php unset($__componentOriginal4e45e801405ab67097982370a6a83cba); ?> <?php endif; ?> </div> <div class="col-lg-4 col-md-6"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => '','fieldLabel' => __('modules.unitType.unitType')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7 = $component; } ?> <?php $component = App\View\Components\Forms\InputGroup::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.input-group'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\InputGroup::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <select class="form-control select-picker" name="unit_type" id="unit_type_id" data-live-search="true"> <?php $__currentLoopData = $unit_types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $unit_type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php if($unit_type->default == 1): ?> selected <?php endif; ?> value="<?php echo e($unit_type->id); ?>"><?php echo e(ucwords($unit_type->unit_type)); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> <div class="col-lg-4 col-md-6 mt-5"> <?php if (isset($component)) { $__componentOriginal9c5d7e5b2e4b8b16cfa941b5e69189f3 = $component; } ?> <?php $component = App\View\Components\Forms\Checkbox::resolve(['fieldLabel' => __('app.purchaseAllow'),'fieldName' => 'purchase_allow','fieldId' => 'purchase_allow','fieldValue' => 'no'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.checkbox'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Checkbox::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-0 mr-lg-2 mr-md-2','fieldRequired' => 'true']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal9c5d7e5b2e4b8b16cfa941b5e69189f3)): ?> <?php $component = $__componentOriginal9c5d7e5b2e4b8b16cfa941b5e69189f3; ?> <?php unset($__componentOriginal9c5d7e5b2e4b8b16cfa941b5e69189f3); ?> <?php endif; ?> </div> <div class="col-lg-4 col-md-6 mt-5"> <?php if (isset($component)) { $__componentOriginal9c5d7e5b2e4b8b16cfa941b5e69189f3 = $component; } ?> <?php $component = App\View\Components\Forms\Checkbox::resolve(['fieldLabel' => __('app.downloadable'),'fieldName' => 'downloadable','fieldId' => 'downloadable','fieldValue' => 'true','popover' => __('messages.downloadable')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.checkbox'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Checkbox::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-0 mr-lg-2 mr-md-2','fieldRequired' => 'true']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal9c5d7e5b2e4b8b16cfa941b5e69189f3)): ?> <?php $component = $__componentOriginal9c5d7e5b2e4b8b16cfa941b5e69189f3; ?> <?php unset($__componentOriginal9c5d7e5b2e4b8b16cfa941b5e69189f3); ?> <?php endif; ?> </div> <div class="col-lg-12 col-xl-12 mt-2 downloadable d-none"> <?php if (isset($component)) { $__componentOriginal71f75760ce80416d6aa938be1ae7e8b2 = $component; } ?> <?php $component = App\View\Components\Forms\File::resolve(['fieldLabel' => __('app.downloadableFile'),'fieldName' => 'downloadable_file','fieldId' => 'downloadable_file','fieldRequired' => 'true'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.file'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\File::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-0 mr-lg-2 mr-md-2']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal71f75760ce80416d6aa938be1ae7e8b2)): ?> <?php $component = $__componentOriginal71f75760ce80416d6aa938be1ae7e8b2; ?> <?php unset($__componentOriginal71f75760ce80416d6aa938be1ae7e8b2); ?> <?php endif; ?> </div> <div class="col-md-12 mt-3"> <div class="form-group"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => 'description-text','fieldLabel' => __('app.description')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <textarea name="description" id="description-text" rows="4" class="form-control"></textarea> </div> </div> <div class="col-lg-12"> <?php if (isset($component)) { $__componentOriginal22e84ee8172e1045de536542f4ffc9a0 = $component; } ?> <?php $component = App\View\Components\Forms\FileMultiple::resolve(['fieldLabel' => __('app.menu.addFile'),'fieldName' => 'file','fieldId' => 'file-upload-dropzone-product'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.file-multiple'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\FileMultiple::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-0 mr-lg-2 mr-md-2']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal22e84ee8172e1045de536542f4ffc9a0)): ?> <?php $component = $__componentOriginal22e84ee8172e1045de536542f4ffc9a0; ?> <?php unset($__componentOriginal22e84ee8172e1045de536542f4ffc9a0); ?> <?php endif; ?> </div> <input type ="hidden" name="add_more" value="false" id="add_more" /> </div> </div> </div> <?php if (isset($component)) { $__componentOriginalfa1d9407bf58c9650823154ec52dea3e = $component; } ?> <?php $component = App\View\Components\Forms\CustomField::resolve(['fields' => $fields] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.custom-field'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\CustomField::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalfa1d9407bf58c9650823154ec52dea3e)): ?> <?php $component = $__componentOriginalfa1d9407bf58c9650823154ec52dea3e; ?> <?php unset($__componentOriginalfa1d9407bf58c9650823154ec52dea3e); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalb19caa501eea72410c04d1917a586963 = $component; } ?> <?php $component = App\View\Components\FormActions::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('form-actions'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\FormActions::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php if (isset($component)) { $__componentOriginalcf8d12533ff890e0d6573daf32b7618d = $component; } ?> <?php $component = App\View\Components\Forms\ButtonPrimary::resolve(['icon' => 'check'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-primary'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonPrimary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['id' => 'save-product','class' => 'mr-3']); ?><?php echo app('translator')->get('app.save'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d)): ?> <?php $component = $__componentOriginalcf8d12533ff890e0d6573daf32b7618d; ?> <?php unset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad = $component; } ?> <?php $component = App\View\Components\Forms\ButtonSecondary::resolve(['icon' => 'check-double'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-secondary'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonSecondary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-3','id' => 'save-more-product']); ?><?php echo app('translator')->get('app.saveAddMore'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad)): ?> <?php $component = $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad; ?> <?php unset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalc35c79ed7e812580313ad04118477974 = $component; } ?> <?php $component = App\View\Components\Forms\ButtonCancel::resolve(['link' => route('products.index')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-cancel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonCancel::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'border-0']); ?><?php echo app('translator')->get('app.cancel'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalc35c79ed7e812580313ad04118477974)): ?> <?php $component = $__componentOriginalc35c79ed7e812580313ad04118477974; ?> <?php unset($__componentOriginalc35c79ed7e812580313ad04118477974); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalb19caa501eea72410c04d1917a586963)): ?> <?php $component = $__componentOriginalb19caa501eea72410c04d1917a586963; ?> <?php unset($__componentOriginalb19caa501eea72410c04d1917a586963); ?> <?php endif; ?> </div> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal18ad2e0d264f9740dc73fff715357c28)): ?> <?php $component = $__componentOriginal18ad2e0d264f9740dc73fff715357c28; ?> <?php unset($__componentOriginal18ad2e0d264f9740dc73fff715357c28); ?> <?php endif; ?> </div> </div> <script> $(document).ready(function () { let defaultImage = ''; let lastIndex = 0; Dropzone.autoDiscover = false; //Dropzone class productDropzone = new Dropzone("div#file-upload-dropzone-product", { dictDefaultMessage: "<?php echo e(__('app.dragDrop')); ?>", url: "<?php echo e(route('product-files.store')); ?>", headers: { 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' }, paramName: "file", maxFilesize: DROPZONE_MAX_FILESIZE, maxFiles: DROPZONE_MAX_FILES, autoProcessQueue: false, uploadMultiple: true, addRemoveLinks: true, parallelUploads: DROPZONE_MAX_FILES, acceptedFiles: 'image/*', init: function () { productDropzone = this; } }); productDropzone.on('sending', function (file, xhr, formData) { const productID = $('#hiddenProductId').val(); formData.append('product_id', productID); formData.append('default_image', defaultImage); $.easyBlockUI(); }); productDropzone.on('uploadprogress', function () { $.easyBlockUI(); }); productDropzone.on('queuecomplete', function () { window.location.href = '<?php echo e(route("products.index")); ?>'; }); productDropzone.on('removedfile', function () { var grp = $('div#file-upload-dropzone').closest(".form-group"); var label = $('div#file-upload-box').siblings("label"); $(grp).removeClass("has-error"); $(label).removeClass("is-invalid"); }); productDropzone.on('error', function (file, message) { productDropzone.removeFile(file); var grp = $('div#file-upload-dropzone').closest(".form-group"); var label = $('div#file-upload-box').siblings("label"); $(grp).find(".help-block").remove(); var helpBlockContainer = $(grp); if (helpBlockContainer.length == 0) { helpBlockContainer = $(grp); } helpBlockContainer.append('<div class="help-block invalid-feedback">' + message + '</div>'); $(grp).addClass("has-error"); $(label).addClass("is-invalid"); }); productDropzone.on('addedfile', function (file) { lastIndex++; const div = document.createElement('div'); div.className = 'form-check-inline custom-control custom-radio mt-2 mr-3'; const input = document.createElement('input'); input.className = 'custom-control-input'; input.type = 'radio'; input.name = 'default_image'; input.id = 'default-image-' + lastIndex; input.value = file.name; if (lastIndex == 1) { input.checked = true; } div.appendChild(input); var label = document.createElement('label'); label.className = 'custom-control-label pt-1 cursor-pointer'; label.innerHTML = "<?php echo app('translator')->get('modules.makeDefaultImage'); ?>"; label.htmlFor = 'default-image-' + lastIndex; div.appendChild(label); file.previewTemplate.appendChild(div); }); $('#product_category_id').change(function (e) { let categoryId = $(this).val(); let url = "<?php echo e(route('get_product_sub_categories', ':id')); ?>"; url = (categoryId) ? url.replace(':id', categoryId) : url.replace(':id', null); $.easyAjax({ url: url, type: "GET", success: function (response) { if (response.status == 'success') { var options = []; var rData; rData = response.data; $.each(rData, function (index, value) { var selectData; selectData = '<option value="' + value.id + '">' + value .category_name + '</option>'; options.push(selectData); }); $('#sub_category_id').html('<option value="">--</option>' + options); $('#sub_category_id').selectpicker('refresh'); } } }) }); $('#save-more-product').click(function () { $('#add_more').val(true); const url = "<?php echo e(route('products.store')); ?>"; var data = $('#save-product-form').serialize(); saveProduct(data, url, "#save-more-product"); }); $('#save-product').click(function() { const url = "<?php echo e(route('products.store')); ?>"; var data = $('#save-product-form').serialize(); saveProduct(data, url, "#save-product"); }); function saveProduct(data, url, buttonSelector) { $.easyAjax({ url: url, container: '#save-product-form', type: "POST", disableButton: true, blockUI: true, buttonSelector: buttonSelector, file: true, data: data, success: function(response) { if (productDropzone.getQueuedFiles().length > 0) { productID = response.productID defaultImage = response.defaultImage; $('#hiddenProductId').val(productID); productDropzone.processQueue(); } else if(response.add_more == true) { var right_modal_content = $.trim($(RIGHT_MODAL_CONTENT).html()); if(right_modal_content.length) { $(RIGHT_MODAL_CONTENT).html(response.html.html); $('#add_more').val(false); } else { $('.content-wrapper').html(response.html.html); init('.content-wrapper'); $('#add_more').val(false); } } else{ if (response.redirectUrl == 'no') { getProductOptions(); closeTaskDetail(); } else if ($(MODAL_XL).hasClass('show')) { $(MODAL_XL).modal('hide'); window.location.reload(); } else { window.location.href = response.redirectUrl; } } if (typeof showTable !== 'undefined' && typeof showTable === 'function') { showTable(); } } }); } function getProductOptions() { $.easyAjax({ url: "<?php echo e(route('products.options')); ?>", type: "GET", success: function (response) { $('#add-products').html(response.products); $('#add-products').val(''); $('#add-products').selectpicker('refresh'); } }) } $('#add-category').click(function () { const url = "<?php echo e(route('productCategory.create')); ?>"; $(MODAL_LG + ' ' + MODAL_HEADING).html('...'); $.ajaxModal(MODAL_LG, url); }) $('#add-sub-category').click(function () { const url = "<?php echo e(route('productSubCategory.create')); ?>"; $(MODAL_LG + ' ' + MODAL_HEADING).html('...'); $.ajaxModal(MODAL_LG, url); }); $('#add-tax').click(function () { const url = "<?php echo e(route('taxes.create')); ?>"; $(MODAL_LG + ' ' + MODAL_HEADING).html('...'); $.ajaxModal(MODAL_LG, url); }); init(RIGHT_MODAL); $('#downloadable').change(function () { if ($(this).is(':checked')) { $('.downloadable').removeClass('d-none'); } else { $('.downloadable').addClass('d-none'); } }); }); </script> <?php /**PATH /home2/selectio/public_html/fms-worksuite/resources/views/products/ajax/create.blade.php ENDPATH**/ ?>