@fleetbase/storefront-engine 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon/components/modals/create-gateway.hbs +13 -27
- package/addon/components/schedule-manager.hbs +24 -20
- package/addon/components/settings-container.hbs +3 -2
- package/addon/components/widget/customers.hbs +56 -78
- package/addon/components/widget/orders.hbs +281 -303
- package/addon/components/widget/storefront-key-metrics.hbs +1 -1
- package/addon/components/widget/storefront-metrics.hbs +2 -2
- package/addon/controllers/settings.js +36 -0
- package/addon/services/storefront.js +6 -1
- package/addon/templates/settings/gateways.hbs +3 -3
- package/addon/templates/settings/index.hbs +322 -321
- package/addon/templates/settings/locations.hbs +2 -2
- package/addon/templates/settings.hbs +8 -30
- package/addon/utils/get-gateway-schemas.js +2 -0
- package/app/controllers/settings.js +1 -0
- package/composer.json +1 -1
- package/extension.json +1 -1
- package/package.json +2 -2
- package/server/config/storefront.php +11 -1
- package/server/src/Http/Controllers/v1/CheckoutController.php +42 -11
- package/server/src/Http/Controllers/v1/CustomerController.php +1 -1
- package/server/src/Http/Controllers/v1/OrderController.php +206 -1
- package/server/src/Http/Filter/OrderFilter.php +35 -29
- package/server/src/Http/Middleware/ThrottleRequests.php +16 -0
- package/server/src/Models/Cart.php +1 -1
- package/server/src/Models/FoodTruck.php +1 -1
- package/server/src/Providers/StorefrontServiceProvider.php +1 -1
- package/server/src/Support/QPay.php +78 -0
- package/server/src/routes.php +1 -0
|
@@ -1,323 +1,321 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@id="storefront_name_input"
|
|
15
|
-
@name={{t "storefront.common.name"}}
|
|
16
|
-
@value={{@model.name}}
|
|
17
|
-
@placeholder={{t "storefront.settings.index.name-placeholder"}}
|
|
18
|
-
@helpText={{t "storefront.settings.index.name-help-text"}}
|
|
19
|
-
/>
|
|
20
|
-
<InputGroup
|
|
21
|
-
@name={{t "storefront.common.description"}}
|
|
22
|
-
@value={{@model.description}}
|
|
23
|
-
@placeholder={{t "storefront.settings.index.description-placeholder"}}
|
|
24
|
-
@helpText={{t "storefront.settings.index.description-help-text"}}
|
|
25
|
-
/>
|
|
26
|
-
<InputGroup @name={{t "storefront.common.tag"}}>
|
|
27
|
-
<TagInput
|
|
28
|
-
class="form-input"
|
|
29
|
-
@placeholder={{t "storefront.settings.index.tags-placeholder"}}
|
|
30
|
-
@allowSpacesInTags={{true}}
|
|
31
|
-
@tags={{@model.tags}}
|
|
32
|
-
@addTag={{this.addTag}}
|
|
33
|
-
@removeTagAtIndex={{this.removeTag}}
|
|
34
|
-
as |tag|
|
|
35
|
-
>
|
|
36
|
-
{{tag}}
|
|
37
|
-
</TagInput>
|
|
38
|
-
</InputGroup>
|
|
1
|
+
<div class="overflow-y-scroll h-screen">
|
|
2
|
+
<div class="h-screen">
|
|
3
|
+
<main class="h-screen max-w-xl mx-auto pt-4">
|
|
4
|
+
<form class="h-screen" {{on "submit" this.saveSettings}}>
|
|
5
|
+
<div class="space-y-4 h-screen">
|
|
6
|
+
<div>
|
|
7
|
+
<h1 class="text-lg leading-6 font-bold text-gray-900 dark:text-gray-100">
|
|
8
|
+
{{t "storefront.settings.index.general-settings-header"}}
|
|
9
|
+
</h1>
|
|
10
|
+
<p class="mt-1 text-sm text-gray-500">
|
|
11
|
+
{{t "storefront.settings.index.general-settings-message"}}
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
39
14
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
15
|
+
<InputGroup
|
|
16
|
+
@id="storefront_name_input"
|
|
17
|
+
@name={{t "storefront.common.name"}}
|
|
18
|
+
@value={{@model.name}}
|
|
19
|
+
@placeholder={{t "storefront.settings.index.name-placeholder"}}
|
|
20
|
+
@helpText={{t "storefront.settings.index.name-help-text"}}
|
|
21
|
+
/>
|
|
22
|
+
<InputGroup
|
|
23
|
+
@name={{t "storefront.common.description"}}
|
|
24
|
+
@value={{@model.description}}
|
|
25
|
+
@placeholder={{t "storefront.settings.index.description-placeholder"}}
|
|
26
|
+
@helpText={{t "storefront.settings.index.description-help-text"}}
|
|
27
|
+
/>
|
|
28
|
+
<InputGroup @name={{t "storefront.common.tag"}}>
|
|
29
|
+
<TagInput
|
|
30
|
+
class="form-input"
|
|
31
|
+
@placeholder={{t "storefront.settings.index.tags-placeholder"}}
|
|
32
|
+
@allowSpacesInTags={{true}}
|
|
33
|
+
@tags={{@model.tags}}
|
|
34
|
+
@addTag={{this.addTag}}
|
|
35
|
+
@removeTagAtIndex={{this.removeTag}}
|
|
36
|
+
as |tag|
|
|
37
|
+
>
|
|
38
|
+
{{tag}}
|
|
39
|
+
</TagInput>
|
|
40
|
+
</InputGroup>
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
@options={{this.orderConfigs}}
|
|
48
|
-
@optionValue="id"
|
|
49
|
-
@optionLabel="name"
|
|
50
|
-
@onSelect={{fn (mut @model.order_config_uuid)}}
|
|
51
|
-
@placeholder="Select default order config"
|
|
52
|
-
class="w-full"
|
|
53
|
-
/>
|
|
54
|
-
</InputGroup>
|
|
42
|
+
<InputGroup @name={{t "storefront.common.currency"}}>
|
|
43
|
+
<CurrencySelect @currency={{@model.currency}} @onCurrencyChange={{fn (mut @model.currency)}} @triggerClass="w-full form-select" />
|
|
44
|
+
</InputGroup>
|
|
55
45
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
@name={{t "storefront.common.facebook"}}
|
|
68
|
-
@value={{@model.facebook}}
|
|
69
|
-
@placeholder={{t "storefront.settings.index.facebook-placeholder"}}
|
|
70
|
-
@helpText={{t "storefront.settings.index.facebook-help-text"}}
|
|
71
|
-
/>
|
|
72
|
-
<InputGroup
|
|
73
|
-
@name={{t "storefront.common.instagram"}}
|
|
74
|
-
@value={{@model.instagram}}
|
|
75
|
-
@placeholder={{t "storefront.settings.index.instagram-placeholder"}}
|
|
76
|
-
@helpText={{t "storefront.settings.index.instagram-help-text"}}
|
|
77
|
-
/>
|
|
78
|
-
<InputGroup
|
|
79
|
-
@name={{t "storefront.common.twitter"}}
|
|
80
|
-
@value={{@model.twitter}}
|
|
81
|
-
@placeholder={{t "storefront.settings.index.twitter-placeholder"}}
|
|
82
|
-
@helpText={{t "storefront.settings.index.twitter-help-text"}}
|
|
83
|
-
/>
|
|
84
|
-
</ContentPanel>
|
|
46
|
+
<InputGroup @name="Default Order Config" @helpText="Select the order config which will apply to all orders created for this store">
|
|
47
|
+
<Select
|
|
48
|
+
@value={{@model.order_config_uuid}}
|
|
49
|
+
@options={{this.orderConfigs}}
|
|
50
|
+
@optionValue="id"
|
|
51
|
+
@optionLabel="name"
|
|
52
|
+
@onSelect={{fn (mut @model.order_config_uuid)}}
|
|
53
|
+
@placeholder="Select default order config"
|
|
54
|
+
class="w-full"
|
|
55
|
+
/>
|
|
56
|
+
</InputGroup>
|
|
85
57
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
58
|
+
<ContentPanel @title={{t "storefront.settings.index.contact-social"}} @open={{false}} @pad={{false}} @wrapperClass="bordered-classic">
|
|
59
|
+
<InputGroup @name={{t "storefront.common.phone"}}>
|
|
60
|
+
<PhoneInput @value={{@model.phone}} @onInput={{fn (mut @model.phone)}} class="form-input w-full" />
|
|
61
|
+
</InputGroup>
|
|
62
|
+
<InputGroup
|
|
63
|
+
@name={{t "storefront.common.website"}}
|
|
64
|
+
@value={{@model.website}}
|
|
65
|
+
@placeholder={{t "storefront.common.website"}}
|
|
66
|
+
@helpText={{t "storefront.settings.index.website-help-text"}}
|
|
67
|
+
/>
|
|
68
|
+
<InputGroup
|
|
69
|
+
@name={{t "storefront.common.facebook"}}
|
|
70
|
+
@value={{@model.facebook}}
|
|
71
|
+
@placeholder={{t "storefront.settings.index.facebook-placeholder"}}
|
|
72
|
+
@helpText={{t "storefront.settings.index.facebook-help-text"}}
|
|
73
|
+
/>
|
|
74
|
+
<InputGroup
|
|
75
|
+
@name={{t "storefront.common.instagram"}}
|
|
76
|
+
@value={{@model.instagram}}
|
|
77
|
+
@placeholder={{t "storefront.settings.index.instagram-placeholder"}}
|
|
78
|
+
@helpText={{t "storefront.settings.index.instagram-help-text"}}
|
|
79
|
+
/>
|
|
80
|
+
<InputGroup
|
|
81
|
+
@name={{t "storefront.common.twitter"}}
|
|
82
|
+
@value={{@model.twitter}}
|
|
83
|
+
@placeholder={{t "storefront.settings.index.twitter-placeholder"}}
|
|
84
|
+
@helpText={{t "storefront.settings.index.twitter-help-text"}}
|
|
85
|
+
/>
|
|
86
|
+
</ContentPanel>
|
|
107
87
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
88
|
+
<ContentPanel @title={{t "storefront.settings.index.logo-backdrop"}} @open={{false}} @pad={{false}} @wrapperClass="bordered-classic">
|
|
89
|
+
<InputGroup @name={{t "storefront.common.logo"}} @helpText={{t "storefront.settings.index.logo-help-text"}}>
|
|
90
|
+
<div class="flex flex-row items-center">
|
|
91
|
+
<img src={{@model.logo_url}} alt={{concat @model.name " logo"}} class="h-20 w-64 border dark:border-gray-900 rounded-md mr-4" />
|
|
92
|
+
<FileUpload @name={{t "storefront.common.logo"}} @accept="image/*" @onFileAdded={{fn this.uploadFile "storefront_logo"}} as |queue|>
|
|
93
|
+
<a tabindex={{0}} class="flex items-center px-0 mt-2 text-xs no-underline truncate btn btn-sm btn-default">
|
|
94
|
+
{{#if queue.files.length}}
|
|
95
|
+
<Spinner class="mr-1" />
|
|
96
|
+
<span>
|
|
97
|
+
{{t "storefront.common.uploading"}}
|
|
98
|
+
</span>
|
|
99
|
+
{{else}}
|
|
100
|
+
<FaIcon @icon="image" class="mr-1" />
|
|
101
|
+
<span>
|
|
102
|
+
{{t "storefront.settings.index.upload-new-logo"}}
|
|
103
|
+
</span>
|
|
104
|
+
{{/if}}
|
|
105
|
+
</a>
|
|
106
|
+
</FileUpload>
|
|
107
|
+
</div>
|
|
108
|
+
</InputGroup>
|
|
129
109
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
110
|
+
<InputGroup @name={{t "storefront.common.backdrop"}} @helpText={{t "storefront.settings.index.backdrop-help-text"}}>
|
|
111
|
+
<div class="flex flex-row items-center">
|
|
112
|
+
<img src={{@model.backdrop_url}} alt={{concat @model.name " backdrop"}} class="h-20 w-64 border dark:border-gray-900 rounded-md mr-4" />
|
|
113
|
+
<FileUpload @name={{t "storefront.common.backdrop"}} @accept="image/*" @onFileAdded={{fn this.uploadFile "storefront_backdrop"}} as |queue|>
|
|
114
|
+
<a tabindex={{0}} class="flex items-center px-0 mt-2 text-xs no-underline truncate btn btn-sm btn-default">
|
|
115
|
+
{{#if queue.files.length}}
|
|
116
|
+
<Spinner class="mr-1" />
|
|
117
|
+
<span>
|
|
118
|
+
{{t "storefront.common.uploading"}}
|
|
119
|
+
</span>
|
|
120
|
+
{{else}}
|
|
121
|
+
<FaIcon @icon="image" class="mr-1" />
|
|
122
|
+
<span>
|
|
123
|
+
{{t "storefront.settings.index.upload-new-backdrop"}}
|
|
124
|
+
</span>
|
|
125
|
+
{{/if}}
|
|
126
|
+
</a>
|
|
127
|
+
</FileUpload>
|
|
144
128
|
</div>
|
|
145
|
-
</
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{{t "storefront.settings.index.drop-to-upload"}}
|
|
158
|
-
{{else}}
|
|
159
|
-
{{t "storefront.common.invalid"}}
|
|
160
|
-
{{/if}}
|
|
161
|
-
{{else if queue.files.length}}
|
|
162
|
-
<div class="my-2">
|
|
163
|
-
<FaIcon @icon="photo-video" class="text-indigo-500 mr-2" />
|
|
164
|
-
{{pluralize queue.files.length "file"}}
|
|
165
|
-
{{t "storefront.settings.index.ready-to-upload"}}
|
|
129
|
+
</InputGroup>
|
|
130
|
+
</ContentPanel>
|
|
131
|
+
|
|
132
|
+
<ContentPanel @title={{t "storefront.settings.index.images-videos"}} @open={{false}} @pad={{false}} @wrapperClass="bordered-classic">
|
|
133
|
+
<div class="p-6">
|
|
134
|
+
{{#if this.isUploading}}
|
|
135
|
+
<div
|
|
136
|
+
class="min-h-56 dropzone w-full rounded px-4 py-8 min-h bg-black bg-opacity-25 text-gray-900 dark:text-white text-center flex flex-col items-center justify-center border-2 border-dashed border-gray-200 dark:border-indigo-500"
|
|
137
|
+
>
|
|
138
|
+
<div class="flex items-center justify-center py-5">
|
|
139
|
+
<PageLoader class="text-sm dar:text-gray-100" @loadingMessage="Uploading..." />
|
|
140
|
+
</div>
|
|
166
141
|
</div>
|
|
167
|
-
<div class="my-2">({{queue.progress}}%)</div>
|
|
168
142
|
{{else}}
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
{{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
143
|
+
<FileDropzone
|
|
144
|
+
@name={{t "storefront.common.file"}}
|
|
145
|
+
@multiple={{true}}
|
|
146
|
+
@onFileAdded={{this.queueFile}}
|
|
147
|
+
@accept={{join "," this.acceptedFileTypes}}
|
|
148
|
+
class="dropzone file-dropzone"
|
|
149
|
+
as |dropzone queue|
|
|
150
|
+
>
|
|
151
|
+
{{#if dropzone.active}}
|
|
152
|
+
{{#if dropzone.valid}}
|
|
153
|
+
{{t "storefront.settings.index.drop-to-upload"}}
|
|
154
|
+
{{else}}
|
|
155
|
+
{{t "storefront.common.invalid"}}
|
|
156
|
+
{{/if}}
|
|
157
|
+
{{else if queue.files.length}}
|
|
158
|
+
<div class="my-2">
|
|
159
|
+
<FaIcon @icon="photo-video" class="text-indigo-500 mr-2" />
|
|
160
|
+
{{pluralize queue.files.length "file"}}
|
|
161
|
+
{{t "storefront.settings.index.ready-to-upload"}}
|
|
162
|
+
</div>
|
|
163
|
+
<div class="my-2">({{queue.progress}}%)</div>
|
|
164
|
+
{{else}}
|
|
165
|
+
<h4 class="font-semibold mb-8">
|
|
166
|
+
<FaIcon @icon="photo-video" @size="2x" class="text-indigo-500 mr-2" />
|
|
167
|
+
{{t "storefront.settings.index.upload-image-video"}}
|
|
168
|
+
</h4>
|
|
169
|
+
<div>
|
|
170
|
+
{{#if dropzone.supported}}
|
|
171
|
+
<p class="text-base font-semibold my-5">{{t "storefront.settings.index.drag-and-drop-image"}}</p>
|
|
172
|
+
{{/if}}
|
|
173
|
+
<FileUpload
|
|
174
|
+
@name={{t "storefront.common.file"}}
|
|
175
|
+
@for="files"
|
|
176
|
+
@accept={{join "," this.acceptedFileTypes}}
|
|
177
|
+
@multiple={{true}}
|
|
178
|
+
@onFileAdded={{this.queueFile}}
|
|
179
|
+
>
|
|
180
|
+
<a tabindex={{0}} class="btn btn-magic cursor-pointer ml-1">or select files to upload.</a>
|
|
181
|
+
</FileUpload>
|
|
182
|
+
</div>
|
|
176
183
|
{{/if}}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
</div>
|
|
194
|
-
<div class="space-y-2 mb-5">
|
|
195
|
-
{{#each this.uploadQueue as |file|}}
|
|
196
|
-
<div class="flex items-center justify-between bg-green-100 border border-gray-300 dark:border-gray-900 py-2 shadow-sm rounded-lg px-4">
|
|
197
|
-
<div class="text-sm text-green-900">{{file.name}}</div>
|
|
198
|
-
<div class="flex items-center text-sm">
|
|
199
|
-
<Spinner class="text-green-400 mr-2" />
|
|
200
|
-
<span class="font-bold text-green-400">{{round file.progress}}%</span>
|
|
201
|
-
</div>
|
|
184
|
+
</FileDropzone>
|
|
185
|
+
{{#if this.uploadQueue}}
|
|
186
|
+
<div class="mx-4 my-6">
|
|
187
|
+
<div class="flex items-center justify-between mb-4">
|
|
188
|
+
<span class="leading-6 dark:text-gray-100">{{t "storefront.settings.index.upload-queue"}}</span>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="space-y-2 mb-5">
|
|
191
|
+
{{#each this.uploadQueue as |file|}}
|
|
192
|
+
<div class="flex items-center justify-between bg-green-100 border border-gray-300 dark:border-gray-900 py-2 shadow-sm rounded-lg px-4">
|
|
193
|
+
<div class="text-sm text-green-900">{{file.name}}</div>
|
|
194
|
+
<div class="flex items-center text-sm">
|
|
195
|
+
<Spinner class="text-green-400 mr-2" />
|
|
196
|
+
<span class="font-bold text-green-400">{{round file.progress}}%</span>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
{{/each}}
|
|
202
200
|
</div>
|
|
203
|
-
|
|
201
|
+
</div>
|
|
202
|
+
{{/if}}
|
|
203
|
+
<div>
|
|
204
|
+
<div class="grid grid-cols-2 md:grid-cols-3 gap-3 mt-6">
|
|
205
|
+
{{#each @model.files as |file|}}
|
|
206
|
+
<FileRecord @file={{file}} @onDelete={{this.removeFile}} />
|
|
207
|
+
{{/each}}
|
|
208
|
+
</div>
|
|
204
209
|
</div>
|
|
205
|
-
|
|
206
|
-
{{/if}}
|
|
207
|
-
<div>
|
|
208
|
-
<div class="grid grid-cols-2 md:grid-cols-3 gap-3 mt-6">
|
|
209
|
-
{{#each @model.files as |file|}}
|
|
210
|
-
<FileRecord @file={{file}} @onDelete={{this.removeFile}} />
|
|
211
|
-
{{/each}}
|
|
212
|
-
</div>
|
|
210
|
+
{{/if}}
|
|
213
211
|
</div>
|
|
214
|
-
|
|
215
|
-
</div>
|
|
216
|
-
</ContentPanel>
|
|
212
|
+
</ContentPanel>
|
|
217
213
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
214
|
+
<ContentPanel @title={{t "storefront.common.alerts"}} @open={{false}} @pad={{false}} @wrapperClass="bordered-classic">
|
|
215
|
+
<div>
|
|
216
|
+
<p class="dark:text-gray-100 mb-4">{{t "storefront.settings.index.alerted-for-certain-event"}}</p>
|
|
217
|
+
<InputGroup @name={{t "storefront.settings.index.new-order-alert"}} @wrapperClass="mb-0">
|
|
218
|
+
<ModelSelectMultiple
|
|
219
|
+
@modelName="user"
|
|
220
|
+
@selectedModel={{@model.alertable.for_new_order}}
|
|
221
|
+
@placeholder={{t "storefront.settings.index.alert-placeholder"}}
|
|
222
|
+
@triggerClass="form-select form-input multiple"
|
|
223
|
+
@infiniteScroll={{false}}
|
|
224
|
+
@renderInPlace={{true}}
|
|
225
|
+
@onChange={{fn this.makeAlertable "for_new_order"}}
|
|
226
|
+
as |model|
|
|
227
|
+
>
|
|
228
|
+
{{model.name}}
|
|
229
|
+
</ModelSelectMultiple>
|
|
230
|
+
</InputGroup>
|
|
231
|
+
</div>
|
|
232
|
+
</ContentPanel>
|
|
237
233
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
@
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
<
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
@
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
<
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
<
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
<
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
<
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
234
|
+
<div class="store-boolean-settings">
|
|
235
|
+
<div class="input-group">
|
|
236
|
+
<Toggle @isToggled={{@model.online}} @onToggle={{fn (mut @model.online)}}>
|
|
237
|
+
<FaIcon @icon="plug" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t "storefront.common.online"}}</span>
|
|
238
|
+
</Toggle>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="input-group">
|
|
241
|
+
<Toggle @isToggled={{@model.options.tax_enabled}} @onToggle={{fn (mut @model.options.tax_enabled)}}>
|
|
242
|
+
<FaIcon @icon="percent" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
243
|
+
"storefront.settings.index.enable-tax"
|
|
244
|
+
}}</span>
|
|
245
|
+
</Toggle>
|
|
246
|
+
{{#if @model.options.tax_enabled}}
|
|
247
|
+
<InputGroup
|
|
248
|
+
@wrapperClass="mb-0 mt-2"
|
|
249
|
+
@type="number"
|
|
250
|
+
@name={{t "storefront.settings.index.tax-percentage"}}
|
|
251
|
+
@value={{@model.options.tax_percentage}}
|
|
252
|
+
@placeholder={{t "storefront.settings.index.tax-percentage"}}
|
|
253
|
+
@helpText={{t "storefront.settings.index.tax-percentage-help-text"}}
|
|
254
|
+
/>
|
|
255
|
+
{{/if}}
|
|
256
|
+
</div>
|
|
257
|
+
<div class="input-group">
|
|
258
|
+
<Toggle @isToggled={{@model.options.auto_accept_orders}} @onToggle={{fn (mut @model.options.auto_accept_orders)}}>
|
|
259
|
+
<FaIcon @icon="robot" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
260
|
+
"storefront.settings.index.auto-accept-incoming-order"
|
|
261
|
+
}}</span>
|
|
262
|
+
</Toggle>
|
|
263
|
+
</div>
|
|
264
|
+
<div class="input-group">
|
|
265
|
+
<Toggle @isToggled={{@model.options.auto_dispatch}} @onToggle={{fn (mut @model.options.auto_dispatch)}}>
|
|
266
|
+
<FaIcon @icon="paper-plane" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
267
|
+
"storefront.settings.index.auto-dispatch-order"
|
|
268
|
+
}}</span>
|
|
269
|
+
</Toggle>
|
|
270
|
+
</div>
|
|
271
|
+
<div class="input-group">
|
|
272
|
+
<Toggle @isToggled={{@model.options.require_pod}} @onToggle={{fn (mut @model.options.require_pod)}}>
|
|
273
|
+
<FaIcon @icon="signature" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
274
|
+
"storefront.settings.index.require-proof-of-delivery"
|
|
275
|
+
}}</span>
|
|
276
|
+
</Toggle>
|
|
277
|
+
{{#if @model.options.require_pod}}
|
|
278
|
+
<InputGroup @wrapperClass="mb-0 mt-2" @name={{t "storefront.settings.index.proof-of-delivery-method"}}>
|
|
279
|
+
<Select
|
|
280
|
+
@options={{this.podMethods}}
|
|
281
|
+
@optionValue="value"
|
|
282
|
+
@optionLabel="name"
|
|
283
|
+
@value={{@model.pod_method}}
|
|
284
|
+
@onSelect={{fn (mut @model.pod_method)}}
|
|
285
|
+
class="w-full"
|
|
286
|
+
/>
|
|
287
|
+
</InputGroup>
|
|
288
|
+
{{/if}}
|
|
289
|
+
</div>
|
|
290
|
+
<div class="input-group">
|
|
291
|
+
<Toggle @isToggled={{@model.options.cod_enabled}} @onToggle={{fn (mut @model.options.cod_enabled)}}>
|
|
292
|
+
<FaIcon @icon="money-bill-wave" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
293
|
+
"storefront.settings.index.enable-cash-on-delivery"
|
|
294
|
+
}}</span>
|
|
295
|
+
</Toggle>
|
|
296
|
+
</div>
|
|
297
|
+
<div class="input-group">
|
|
298
|
+
<Toggle @isToggled={{@model.options.pickup_enabled}} @onToggle={{fn (mut @model.options.pickup_enabled)}}>
|
|
299
|
+
<FaIcon @icon="person-booth" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
300
|
+
"storefront.settings.index.enable-order-pickup"
|
|
301
|
+
}}</span>
|
|
302
|
+
</Toggle>
|
|
303
|
+
</div>
|
|
304
|
+
<div class="input-group">
|
|
305
|
+
<Toggle @isToggled={{@model.options.tips_enabled}} @onToggle={{fn (mut @model.options.tips_enabled)}}>
|
|
306
|
+
<FaIcon @icon="cash-register" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
307
|
+
"storefront.settings.index.enable-tips"
|
|
308
|
+
}}</span>
|
|
309
|
+
</Toggle>
|
|
310
|
+
</div>
|
|
311
|
+
<div class="input-group">
|
|
312
|
+
<Toggle @isToggled={{@model.options.delivery_tips_enabled}} @onToggle={{fn (mut @model.options.delivery_tips_enabled)}}>
|
|
313
|
+
<FaIcon @icon="face-smile" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
314
|
+
"storefront.settings.index.enable-delivery-tips"
|
|
315
|
+
}}</span>
|
|
316
|
+
</Toggle>
|
|
317
|
+
</div>
|
|
318
|
+
{{!-- <div class="input-group">
|
|
321
319
|
<Toggle @isToggled={{@model.options.integrated_vendors_enabled}} @onToggle={{fn (mut @model.options.integrated_vendors_enabled)}}>
|
|
322
320
|
<FaIcon @icon="truck" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">Enable integrated vendors</span>
|
|
323
321
|
</Toggle>
|
|
@@ -329,20 +327,23 @@
|
|
|
329
327
|
</InputGroup>
|
|
330
328
|
{{/if}}
|
|
331
329
|
</div> --}}
|
|
332
|
-
|
|
330
|
+
</div>
|
|
333
331
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
332
|
+
<div class="flex justify-end pb-12">
|
|
333
|
+
<Button
|
|
334
|
+
@buttonType="submit"
|
|
335
|
+
@type="primary"
|
|
336
|
+
@text={{t "storefront.settings.index.save-changes"}}
|
|
337
|
+
@icon="save"
|
|
338
|
+
@size="lg"
|
|
339
|
+
@isLoading={{this.isLoading}}
|
|
340
|
+
@onClick={{this.saveSettings}}
|
|
341
|
+
@permission="storefront update settings"
|
|
342
|
+
/>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</form>
|
|
346
|
+
<Spacer @height="400px" />
|
|
347
|
+
</main>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|