741 lines
48 KiB
PHP
Executable File
741 lines
48 KiB
PHP
Executable File
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag; ?>
|
|
<?php foreach($attributes->onlyProps([
|
|
'allowEdit' => true,
|
|
]) as $__key => $__value) {
|
|
$$__key = $$__key ?? $__value;
|
|
} ?>
|
|
<?php $attributes = $attributes->exceptProps([
|
|
'allowEdit' => true,
|
|
]); ?>
|
|
<?php foreach (array_filter(([
|
|
'allowEdit' => true,
|
|
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
|
$$__key = $$__key ?? $__value;
|
|
} ?>
|
|
<?php $__defined_vars = get_defined_vars(); ?>
|
|
<?php foreach ($attributes as $__key => $__value) {
|
|
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
|
} ?>
|
|
<?php unset($__defined_vars); ?>
|
|
|
|
<v-inline-address-edit
|
|
<?php echo e($attributes->except('value')); ?>
|
|
|
|
:value='<?php echo json_encode($attributes->get('value'), 15, 512) ?>'
|
|
:allow-edit="<?php echo e($allowEdit ? 'true' : 'false'); ?>"
|
|
>
|
|
<div class="group w-full max-w-full hover:rounded-sm">
|
|
<div class="rounded-xs flex h-[34px] items-center ltr:pl-2.5 ltr:text-left rtl:pr-2.5 rtl:text-right">
|
|
<div class="shimmer h-5 w-48 rounded border border-transparent"></div>
|
|
</div>
|
|
</div>
|
|
</v-inline-address-edit>
|
|
|
|
<?php if (! $__env->hasRenderedOnce('80338b4a-59cb-423d-be72-c6adb0fa5097')): $__env->markAsRenderedOnce('80338b4a-59cb-423d-be72-c6adb0fa5097');
|
|
$__env->startPush('scripts'); ?>
|
|
<script
|
|
type="text/x-template"
|
|
id="v-inline-address-edit-template"
|
|
>
|
|
<div class="group w-full max-w-full hover:rounded-sm">
|
|
<!-- Non-editing view -->
|
|
<div
|
|
class="flex h-[34px] items-center rounded border border-transparent transition-all"
|
|
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
|
|
>
|
|
<div
|
|
class="group relative !w-full pl-2.5"
|
|
:style="{ 'text-align': position }"
|
|
>
|
|
<span class="cursor-pointer truncate rounded">
|
|
{{ valueLabel ? valueLabel : `${inputValue?.address} ${inputValue?.city} ${inputValue?.state} ${inputValue?.postcode} ${inputValue?.country}`.length > 20 ? `${inputValue?.address} ${inputValue?.city} ${inputValue?.state} ${inputValue?.postcode} ${inputValue?.country}`.substring(0, 20) + '...' : `${inputValue?.address} ${inputValue?.city} ${inputValue?.state} ${inputValue?.postcode} ${inputValue?.country}` }}
|
|
</span>
|
|
|
|
<div class="absolute bottom-0 mb-5 hidden flex-col group-hover:flex">
|
|
<span class="whitespace-no-wrap relative z-10 rounded-md bg-black px-4 py-2 text-xs leading-none text-white shadow-lg dark:bg-white dark:text-gray-900">
|
|
{{ inputValue?.address }}<br>
|
|
{{ `${inputValue?.city}, ${inputValue?.state}, ${inputValue?.postcode}` }}<br>
|
|
{{ `${inputValue?.country}` }}<br>
|
|
</span>
|
|
|
|
<div class="-mt-2 ml-4 h-3 w-3 rotate-45 bg-black dark:bg-white"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<template v-if="allowEdit">
|
|
<i
|
|
@click="toggle"
|
|
class="icon-edit cursor-pointer rounded p-0.5 text-2xl opacity-0 hover:bg-gray-200 group-hover:opacity-100 dark:hover:bg-gray-950 ltr:mr-1 rtl:ml-1"
|
|
></i>
|
|
</template>
|
|
</div>
|
|
|
|
<Teleport to="body">
|
|
<?php if (isset($component)) { $__componentOriginal81b4d293d9113446bb908fc8aef5c8f6 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal81b4d293d9113446bb908fc8aef5c8f6 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.index','data' => ['vSlot' => '{ meta, errors, handleSubmit }','as' => 'div','ref' => 'modalForm']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['v-slot' => '{ meta, errors, handleSubmit }','as' => 'div','ref' => 'modalForm']); ?>
|
|
<form @submit="handleSubmit($event, updateOrCreate)">
|
|
<!-- Editing view -->
|
|
<?php if (isset($component)) { $__componentOriginal09768308838b828c7799162f44758281 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal09768308838b828c7799162f44758281 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.modal.index','data' => ['ref' => 'emailModal']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::modal'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['ref' => 'emailModal']); ?>
|
|
<!-- Modal Header -->
|
|
<?php $__env->slot('header', null, []); ?>
|
|
<p class="text-lg font-bold text-gray-800 dark:text-white">
|
|
Update Address
|
|
</p>
|
|
<?php $__env->endSlot(); ?>
|
|
|
|
<!-- Modal Content -->
|
|
<?php $__env->slot('content', null, []); ?>
|
|
<div class="flex gap-4">
|
|
<div class="w-full">
|
|
<!-- Address (Textarea field) -->
|
|
<?php if (isset($component)) { $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.index','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes([]); ?>
|
|
<?php if (isset($component)) { $__componentOriginal53af403f6b2179a3039d488b8ab2a267 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal53af403f6b2179a3039d488b8ab2a267 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.control','data' => ['type' => 'textarea',':name' => '`${name}.address`','rows' => '10',':value' => 'inputValue?.address']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.control'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['type' => 'textarea',':name' => '`${name}.address`','rows' => '10',':value' => 'inputValue?.address']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $attributes = $__attributesOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $component = $__componentOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__componentOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($component)) { $__componentOriginal8da25fb6534e2ef288914e35c32417f8 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal8da25fb6534e2ef288914e35c32417f8 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.error','data' => [':name' => 'name']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.error'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes([':name' => 'name']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $attributes = $__attributesOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $component = $__componentOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__componentOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $attributes = $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $component = $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="grid w-full">
|
|
<!-- Country Field -->
|
|
<?php if (isset($component)) { $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.index','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes([]); ?>
|
|
<?php if (isset($component)) { $__componentOriginal53af403f6b2179a3039d488b8ab2a267 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal53af403f6b2179a3039d488b8ab2a267 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.control','data' => ['type' => 'select',':name' => '`${name}.country`','vModel' => 'inputValue.country']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.control'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['type' => 'select',':name' => '`${name}.country`','v-model' => 'inputValue.country']); ?>
|
|
<option value=""><?php echo app('translator')->get('admin::app.common.custom-attributes.select-country'); ?></option>
|
|
|
|
<?php $__currentLoopData = core()->countries(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<option value="<?php echo e($country->code); ?>"><?php echo e($country->name); ?></option>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $attributes = $__attributesOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $component = $__componentOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__componentOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($component)) { $__componentOriginal8da25fb6534e2ef288914e35c32417f8 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal8da25fb6534e2ef288914e35c32417f8 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.error','data' => ['name' => 'country']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.error'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['name' => 'country']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $attributes = $__attributesOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $component = $__componentOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__componentOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $attributes = $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $component = $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
|
|
<!-- State Field -->
|
|
<template v-if="haveStates()">
|
|
<?php if (isset($component)) { $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.index','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes([]); ?>
|
|
<?php if (isset($component)) { $__componentOriginal53af403f6b2179a3039d488b8ab2a267 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal53af403f6b2179a3039d488b8ab2a267 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.control','data' => ['type' => 'select',':name' => '`${name}.state`','vModel' => 'inputValue.state']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.control'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['type' => 'select',':name' => '`${name}.state`','v-model' => 'inputValue.state']); ?>
|
|
<option value=""><?php echo app('translator')->get('admin::app.common.custom-attributes.select-state'); ?></option>
|
|
|
|
<option v-for='(state, index) in countryStates[inputValue?.country]' :value="state.code">
|
|
{{ state.name }}
|
|
</option>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $attributes = $__attributesOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $component = $__componentOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__componentOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($component)) { $__componentOriginal8da25fb6534e2ef288914e35c32417f8 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal8da25fb6534e2ef288914e35c32417f8 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.error','data' => ['name' => 'country']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.error'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['name' => 'country']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $attributes = $__attributesOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $component = $__componentOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__componentOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $attributes = $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $component = $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
</template>
|
|
|
|
<template v-else>
|
|
<?php if (isset($component)) { $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.index','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes([]); ?>
|
|
<?php if (isset($component)) { $__componentOriginal53af403f6b2179a3039d488b8ab2a267 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal53af403f6b2179a3039d488b8ab2a267 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.control','data' => ['type' => 'text',':name' => '`${name}.state`','vModel' => 'inputValue.state']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.control'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['type' => 'text',':name' => '`${name}.state`','v-model' => 'inputValue.state']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $attributes = $__attributesOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $component = $__componentOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__componentOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($component)) { $__componentOriginal8da25fb6534e2ef288914e35c32417f8 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal8da25fb6534e2ef288914e35c32417f8 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.error','data' => ['name' => 'state']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.error'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['name' => 'state']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $attributes = $__attributesOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $component = $__componentOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__componentOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $attributes = $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $component = $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
</template>
|
|
|
|
<!-- City Field -->
|
|
<?php if (isset($component)) { $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.index','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes([]); ?>
|
|
<?php if (isset($component)) { $__componentOriginal53af403f6b2179a3039d488b8ab2a267 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal53af403f6b2179a3039d488b8ab2a267 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.control','data' => ['type' => 'text',':name' => '`${name}.city`',':value' => 'inputValue?.city']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.control'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['type' => 'text',':name' => '`${name}.city`',':value' => 'inputValue?.city']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $attributes = $__attributesOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $component = $__componentOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__componentOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($component)) { $__componentOriginal8da25fb6534e2ef288914e35c32417f8 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal8da25fb6534e2ef288914e35c32417f8 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.error','data' => ['name' => 'city']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.error'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['name' => 'city']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $attributes = $__attributesOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $component = $__componentOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__componentOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $attributes = $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $component = $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
|
|
<!-- Postcode Field -->
|
|
<?php if (isset($component)) { $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.index','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes([]); ?>
|
|
<?php if (isset($component)) { $__componentOriginal53af403f6b2179a3039d488b8ab2a267 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal53af403f6b2179a3039d488b8ab2a267 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.control','data' => ['type' => 'text',':name' => '`${name}.postcode`',':value' => 'inputValue?.postcode','placeholder' => trans('admin::app.common.custom-attributes.postcode')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.control'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['type' => 'text',':name' => '`${name}.postcode`',':value' => 'inputValue?.postcode','placeholder' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(trans('admin::app.common.custom-attributes.postcode'))]); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $attributes = $__attributesOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__attributesOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal53af403f6b2179a3039d488b8ab2a267)): ?>
|
|
<?php $component = $__componentOriginal53af403f6b2179a3039d488b8ab2a267; ?>
|
|
<?php unset($__componentOriginal53af403f6b2179a3039d488b8ab2a267); ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($component)) { $__componentOriginal8da25fb6534e2ef288914e35c32417f8 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal8da25fb6534e2ef288914e35c32417f8 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.form.control-group.error','data' => ['name' => 'postcode']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::form.control-group.error'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['name' => 'postcode']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $attributes = $__attributesOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__attributesOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal8da25fb6534e2ef288914e35c32417f8)): ?>
|
|
<?php $component = $__componentOriginal8da25fb6534e2ef288914e35c32417f8; ?>
|
|
<?php unset($__componentOriginal8da25fb6534e2ef288914e35c32417f8); ?>
|
|
<?php endif; ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $attributes = $__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__attributesOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3)): ?>
|
|
<?php $component = $__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3; ?>
|
|
<?php unset($__componentOriginal7b1bc76a00ab5e7f1bf2c6429dae85a3); ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php $__env->endSlot(); ?>
|
|
|
|
<!-- Modal Footer -->
|
|
<?php $__env->slot('footer', null, []); ?>
|
|
<!-- Save Button -->
|
|
<?php if (isset($component)) { $__componentOriginal989f82b74d189698d771eef298c02d90 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal989f82b74d189698d771eef298c02d90 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'admin::components.button.index','data' => ['buttonType' => 'submit','class' => 'primary-button justify-center','title' => trans('Save'),':loading' => 'isProcessing',':disabled' => 'isProcessing']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
|
|
<?php $component->withName('admin::button'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
|
|
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['button-type' => 'submit','class' => 'primary-button justify-center','title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(trans('Save')),':loading' => 'isProcessing',':disabled' => 'isProcessing']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal989f82b74d189698d771eef298c02d90)): ?>
|
|
<?php $attributes = $__attributesOriginal989f82b74d189698d771eef298c02d90; ?>
|
|
<?php unset($__attributesOriginal989f82b74d189698d771eef298c02d90); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal989f82b74d189698d771eef298c02d90)): ?>
|
|
<?php $component = $__componentOriginal989f82b74d189698d771eef298c02d90; ?>
|
|
<?php unset($__componentOriginal989f82b74d189698d771eef298c02d90); ?>
|
|
<?php endif; ?>
|
|
<?php $__env->endSlot(); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal09768308838b828c7799162f44758281)): ?>
|
|
<?php $attributes = $__attributesOriginal09768308838b828c7799162f44758281; ?>
|
|
<?php unset($__attributesOriginal09768308838b828c7799162f44758281); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal09768308838b828c7799162f44758281)): ?>
|
|
<?php $component = $__componentOriginal09768308838b828c7799162f44758281; ?>
|
|
<?php unset($__componentOriginal09768308838b828c7799162f44758281); ?>
|
|
<?php endif; ?>
|
|
</form>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal81b4d293d9113446bb908fc8aef5c8f6)): ?>
|
|
<?php $attributes = $__attributesOriginal81b4d293d9113446bb908fc8aef5c8f6; ?>
|
|
<?php unset($__attributesOriginal81b4d293d9113446bb908fc8aef5c8f6); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal81b4d293d9113446bb908fc8aef5c8f6)): ?>
|
|
<?php $component = $__componentOriginal81b4d293d9113446bb908fc8aef5c8f6; ?>
|
|
<?php unset($__componentOriginal81b4d293d9113446bb908fc8aef5c8f6); ?>
|
|
<?php endif; ?>
|
|
</Teleport>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="module">
|
|
app.component('v-inline-address-edit', {
|
|
template: '#v-inline-address-edit-template',
|
|
|
|
emits: ['on-change', 'on-cancelled'],
|
|
|
|
props: {
|
|
name: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
|
|
value: {
|
|
required: true,
|
|
},
|
|
|
|
rules: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
|
|
label: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
|
|
placeholder: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
|
|
position: {
|
|
type: String,
|
|
default: 'right',
|
|
},
|
|
|
|
allowEdit: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
|
|
errors: {
|
|
type: Object,
|
|
default: {},
|
|
},
|
|
|
|
url: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
|
|
valueLabel: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
inputValue: this.value,
|
|
|
|
isEditing: false,
|
|
|
|
emails: JSON.parse(JSON.stringify(this.value || [{'value': '', 'label': 'work'}])),
|
|
|
|
isProcessing: false,
|
|
|
|
countryStates: <?php echo json_encode(core()->groupedStatesByCountries(), 15, 512) ?>,
|
|
};
|
|
},
|
|
|
|
watch: {
|
|
/**
|
|
* Watch the value prop.
|
|
*
|
|
* @param {String} newValue
|
|
*/
|
|
value(newValue, oldValue) {
|
|
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
this.emails = newValue || [{'value': '', 'label': 'work'}];
|
|
}
|
|
},
|
|
},
|
|
|
|
created() {
|
|
this.extendValidations();
|
|
|
|
if (! this.emails || ! this.emails.length) {
|
|
this.emails = [{
|
|
'value': '',
|
|
'label': 'work'
|
|
}];
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
/**
|
|
* Get the validation rules.
|
|
*
|
|
* @return {Object}
|
|
*/
|
|
getValidation() {
|
|
return {
|
|
email: true,
|
|
unique_contact_email: this.emails ?? [],
|
|
required: true,
|
|
};
|
|
},
|
|
},
|
|
|
|
methods: {
|
|
/**
|
|
* Toggle the input.
|
|
*
|
|
* @return {void}
|
|
*/
|
|
toggle() {
|
|
this.isEditing = true;
|
|
|
|
this.$refs.emailModal.toggle();
|
|
},
|
|
|
|
add() {
|
|
this.emails.push({
|
|
'value': '',
|
|
'label': 'work'
|
|
});
|
|
},
|
|
|
|
remove(email) {
|
|
this.emails = this.emails.filter(email => email !== email);
|
|
},
|
|
|
|
extendValidations() {
|
|
defineRule('unique_contact_email', (value, emails) => {
|
|
if (
|
|
! value
|
|
|| ! value.length
|
|
) {
|
|
return true;
|
|
}
|
|
|
|
const emailOccurrences = emails.filter(email => email.value === value).length;
|
|
|
|
if (emailOccurrences > 1) {
|
|
return 'This email email is already used';
|
|
}
|
|
|
|
return true;
|
|
});
|
|
},
|
|
|
|
updateOrCreate(params) {
|
|
this.inputValue = params[this.name];
|
|
|
|
if (this.url) {
|
|
this.$axios.put(this.url, {
|
|
[this.name]: this.inputValue,
|
|
})
|
|
.then((response) => {
|
|
this.$emitter.emit('add-flash', { type: 'success', message: response.data.message });
|
|
})
|
|
.catch((error) => {
|
|
this.inputValue = this.value;
|
|
|
|
this.$emitter.emit('add-flash', { type: 'error', message: error.response.data.message });
|
|
});
|
|
}
|
|
|
|
this.$emit('on-change', {
|
|
name: this.name,
|
|
value: this.inputValue,
|
|
});
|
|
|
|
this.$refs.emailModal.toggle();
|
|
},
|
|
|
|
haveStates() {
|
|
/*
|
|
* The double negation operator is used to convert the value to a boolean.
|
|
* It ensures that the final result is a boolean value,
|
|
* true if the array has a length greater than 0, and otherwise false.
|
|
*/
|
|
return !!this.countryStates[this.inputValue.country]?.length;
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
<?php $__env->stopPush(); endif; ?><?php /**PATH /var/www/html/packages/Webkul/Admin/src/Resources/views/components/form/control-group/controls/inline/address.blade.php ENDPATH**/ ?>
|