Skip to content

Commit 2f2b1bb

Browse files
Merge pull request #2323 from suraj-webkul/issue#2294
issue #2294 has been fixed.
2 parents 847feee + 47c8257 commit 2f2b1bb

File tree

2 files changed

+33
-16
lines changed

2 files changed

+33
-16
lines changed

packages/Webkul/Admin/src/Resources/views/settings/workflows/create.blade.php

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ class="flex flex-col gap-4"
283283
</p>
284284
</div>
285285
286-
<div class="block w-full overflow-x-auto">
287-
<x-admin::table class="!w-1/2">
286+
<div class="block w-full">
287+
<x-admin::table class="!w-1/2 !table-auto">
288288
<!-- Table Head -->
289289
<x-admin::table.thead>
290290
<x-admin::table.thead.tr>
@@ -339,7 +339,7 @@ class="text-md flex max-w-max items-center gap-2 text-brandColor"
339339
type="text/x-template"
340340
id="v-workflow-condition-item-template"
341341
>
342-
<div class="flex justify-between gap-4">
342+
<div class="flex items-center justify-between gap-4">
343343
<div class="flex flex-1 gap-4 max-sm:flex-1 max-sm:flex-wrap">
344344
<!-- Select main condition. -->
345345
<select
@@ -490,11 +490,15 @@ class="custom-select inline-flex h-10 w-1/3 items-center justify-between gap-x-1
490490
<template v-else>
491491
<div class="w-1/3">
492492
<v-lookup-component
493-
:attribute="{'code': 'conditions[' + index + '][value]', 'name': 'Email', 'lookup_type': matchedAttribute.lookup_type}"
494-
validations="required|email"
495-
:data="condition.value"
493+
:attribute="{'code': 'conditions[' + index + '][value]', 'name': matchedAttribute?.name, 'lookup_type': matchedAttribute.lookup_type}"
494+
validations="required"
495+
:value="{
496+
id: condition.value
497+
}"
496498
can-add-new="true"
497499
></v-lookup-component>
500+
501+
<x-admin::form.control-group.error ::name="`conditions[${index}][value]`"/>
498502
</div>
499503
</template>
500504
</template>
@@ -726,11 +730,15 @@ class="custom-select inline-flex h-10 w-full items-center justify-between gap-x-
726730
<template v-else>
727731
<div class="w-full">
728732
<v-lookup-component
729-
:attribute="{'code': 'actions[' + index + '][value]', 'name': 'Email', 'lookup_type': matchedAttribute.lookup_type}"
730-
validations="required|email"
731-
:data="action.value"
733+
:attribute="{'code': 'actions[' + index + '][value]', 'name': matchedAttribute?.name, 'lookup_type': matchedAttribute.lookup_type}"
734+
validations="required"
735+
:value="{
736+
id: action.value
737+
}"
732738
can-add-new="true"
733739
></v-lookup-component>
740+
741+
<x-admin::form.control-group.error ::name="`actions[${index}][value]`"/>
734742
</div>
735743
</template>
736744
</template>

packages/Webkul/Admin/src/Resources/views/settings/workflows/edit.blade.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class="flex flex-col gap-4"
112112
:label="trans('admin::app.settings.workflows.edit.name')"
113113
:placeholder="trans('admin::app.settings.workflows.edit.name')"
114114
/>
115+
115116
<x-admin::form.control-group.error control-name="name" />
116117
</x-admin::form.control-group>
117118
@@ -287,7 +288,7 @@ class="flex flex-col gap-4"
287288
</p>
288289
</div>
289290
290-
<div class="block w-full overflow-x-auto">
291+
<div class="block w-full">
291292
<x-admin::table class="!w-1/2 !table-auto">
292293
<!-- Table Head -->
293294
<x-admin::table.thead>
@@ -494,11 +495,15 @@ class="custom-select inline-flex h-10 w-1/3 items-center justify-between gap-x-1
494495
<template v-else>
495496
<div class="w-1/3">
496497
<v-lookup-component
497-
:attribute="{'code': 'conditions[' + index + '][value]', 'name': 'Email', 'lookup_type': matchedAttribute.lookup_type}"
498-
validations="required|email"
499-
:data="condition.value"
498+
:attribute="{'code': 'conditions[' + index + '][value]', 'name': matchedAttribute?.name, 'lookup_type': matchedAttribute.lookup_type}"
499+
validations="required"
500+
:value="{
501+
id: condition.value
502+
}"
500503
can-add-new="true"
501504
></v-lookup-component>
505+
506+
<x-admin::form.control-group.error ::name="`conditions[${index}][value]`"/>
502507
</div>
503508
</template>
504509
</template>
@@ -731,11 +736,15 @@ class="custom-select inline-flex h-10 w-full items-center justify-between gap-x-
731736
<template v-else>
732737
<div class="w-full">
733738
<v-lookup-component
734-
:attribute="{'code': 'actions[' + index + '][value]', 'name': 'Email', 'lookup_type': matchedAttribute.lookup_type}"
735-
validations="required|email"
736-
:data="action.value"
739+
:attribute="{'code': 'actions[' + index + '][value]', 'name': matchedAttribute?.name, 'lookup_type': matchedAttribute.lookup_type}"
740+
validations="required"
741+
:value="{
742+
id: action.value
743+
}"
737744
can-add-new="true"
738745
></v-lookup-component>
746+
747+
<x-admin::form.control-group.error ::name="`actions[${index}][value]`"/>
739748
</div>
740749
</template>
741750
</template>

0 commit comments

Comments
 (0)