@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.
@@ -35,33 +35,19 @@
35
35
  <div class="input-group">
36
36
  <Checkbox @value={{@options.gateway.sandbox}} @label={{t "storefront.component.modals.create-getaway.sandbox-getaway"}} @onToggle={{fn (mut @options.gateway.sandbox)}} />
37
37
  </div>
38
- <div class="p-2 rounded-md my-2 border border-gray-200 dark:border-gray-800">
39
- <h4 class="mb-2 font-semibold text-sm dark:text-white">Config</h4>
40
- {{#if @options.gateway.isNew}}
41
- {{#each-in @options.schema as |key value|}}
42
- {{#if (is-bool-value value)}}
43
- <div class="input-group">
44
- <Checkbox @value={{value}} @label={{humanize key}} @onToggle={{fn @options.setConfigKey key}} />
45
- </div>
46
- {{else}}
47
- <InputGroup @name={{humanize key}}>
48
- <Input class="form-input w-full" placeholder={{humanize key}} @value={{value}} {{on "blur" (fn @options.setConfigKey key)}} />
49
- </InputGroup>
50
- {{/if}}
51
- {{/each-in}}
52
- {{else}}
53
- {{#each-in @options.gateway.config as |key value|}}
54
- {{#if (is-bool-value value)}}
55
- <div class="input-group">
56
- <Checkbox @value={{value}} @label={{humanize key}} @onToggle={{fn @options.setConfigKey key}} />
57
- </div>
58
- {{else}}
59
- <InputGroup @name={{humanize key}}>
60
- <Input class="form-input w-full" placeholder={{humanize key}} @value={{value}} {{on "blur" (fn @options.setConfigKey key)}} />
61
- </InputGroup>
62
- {{/if}}
63
- {{/each-in}}
64
- {{/if}}
38
+ <div class="p-2 rounded-md mb-2 mt-4 border border-gray-200 dark:border-gray-800">
39
+ <h4 class="mb-2 font-semibold text-xs tracking-wide uppercase text-gray-700 dark:text-gray-400">Config</h4>
40
+ {{#each-in @options.schema as |key value|}}
41
+ {{#if (is-bool-value value)}}
42
+ <div class="input-group">
43
+ <Checkbox @value={{get @options.gateway.config key}} @label={{smart-humanize key}} @onToggle={{fn @options.setConfigKey key}} />
44
+ </div>
45
+ {{else}}
46
+ <InputGroup @name={{humanize key}}>
47
+ <Input class="form-input w-full" placeholder={{smart-humanize key}} @value={{get @options.gateway.config key}} {{on "blur" (fn @options.setConfigKey key)}} />
48
+ </InputGroup>
49
+ {{/if}}
50
+ {{/each-in}}
65
51
  </div>
66
52
  {{/if}}
67
53
  </div>
@@ -1,28 +1,32 @@
1
1
  <div class="schedule-manager-wrapper" ...attributes>
2
2
  {{#each-in this.schedule as |day hours|}}
3
- <div class="content-panel {{@contentPanelClass}} shadow-sm">
4
- <div class="content-panel-header items-center {{@contentPanelHeaderClass}}">
5
- <h4 class="font-semibold text-sm dark:text-gray-100">{{day}}</h4>
6
- <div>
7
- <Button
8
- @icon="calendar-week"
9
- @text={{t "storefront.component.schedule-manager.add-hours"}}
10
- @textClass="truncate text-xs"
11
- @size="sm"
12
- @onClick={{fn this.addHours @subject day}}
13
- class="{{@addHoursButtonClass}}"
14
- />
15
- </div>
16
- </div>
17
- <div class="content-panel-body {{@contentPanelBodyClass}}">
18
- {{#each hours as |hour|}}
19
- <div class="flex items-center justify-between mb-2">
20
- <div class="dark:text-gray-100">{{hour.humanReadableHours}}</div>
3
+ <div class="next-content-panel-wrapper bordered-classic is-open">
4
+ <div class="next-content-panel-container is-open">
5
+ <div class="next-content-panel {{@contentPanelClass}} shadow-sm">
6
+ <div class="next-content-panel-header items-center {{@contentPanelHeaderClass}}">
7
+ <h4 class="font-semibold text-sm dark:text-gray-100">{{day}}</h4>
21
8
  <div>
22
- <Button @iconPrefix="fas" @type="danger" @size="xs" @icon="times" @onClick={{fn this.removeHours hour}} class="{{@removeHoursButtonClass}}" />
9
+ <Button
10
+ @icon="calendar-week"
11
+ @text={{t "storefront.component.schedule-manager.add-hours"}}
12
+ @textClass="truncate text-xs"
13
+ @size="xs"
14
+ @onClick={{fn this.addHours @subject day}}
15
+ class="{{@addHoursButtonClass}}"
16
+ />
23
17
  </div>
24
18
  </div>
25
- {{/each}}
19
+ <div class="next-content-panel-body {{@contentPanelBodyClass}}">
20
+ {{#each hours as |hour|}}
21
+ <div class="flex items-center justify-between mb-2">
22
+ <div class="dark:text-gray-100">{{hour.humanReadableHours}}</div>
23
+ <div>
24
+ <Button @iconPrefix="fas" @type="danger" @size="xs" @icon="times" @onClick={{fn this.removeHours hour}} class="{{@removeHoursButtonClass}}" />
25
+ </div>
26
+ </div>
27
+ {{/each}}
28
+ </div>
29
+ </div>
26
30
  </div>
27
31
  </div>
28
32
  {{/each-in}}
@@ -1,7 +1,8 @@
1
1
  <div class="overflow-y-scroll h-screen">
2
- <div class="h-screen" {{increase-height-by 2000}}>
3
- <main class="h-screen max-w-xl mx-auto pt-10 pb-12 lg:pb-16" ...attributes>
2
+ <div class="h-screen">
3
+ <main class="h-screen max-w-xl mx-auto pt-4" ...attributes>
4
4
  {{yield}}
5
+ <Spacer @height="400px" />
5
6
  </main>
6
7
  </div>
7
8
  </div>
@@ -1,82 +1,60 @@
1
- {{#if (and this.loadCustomers.isRunning (not this.loaded))}}
2
- <div class="next-content-panel-wrapper">
3
- <div class="next-content-panel-container">
4
- <div class="next-content-panel next-content-panel-is-closed">
5
- <div class="next-content-panel-header next-content-panel-toggle next-content-panel-is-closed">
6
- <a href="javascript:;" class="next-content-panel-header-left">
7
- <span class="icon-container">
8
- <Spinner class="text-sky-400" @height="13" @width="13" />
9
- </span>
10
- <div class="next-content-panel-title-container">
11
- <div class="panel-title flex-shrink-0">
12
- <div class="flex flex-col">
13
- <span>{{this.title}}</span>
14
- </div>
15
- </div>
16
- </div>
17
- </a>
18
- </div>
19
- </div>
20
- </div>
1
+ <ContentPanel
2
+ @title={{this.title}}
3
+ @titleStatusRight={{this.customers.length}}
4
+ @titleStatusRightClass="info-status-badge"
5
+ @hideStatusDot={{true}}
6
+ @open={{this.loaded}}
7
+ @isLoading={{this.loadCustomers.isRunning}}
8
+ @pad={{false}}
9
+ @wrapperClass={{@wrapperClass}}
10
+ @panelBodyClass="p-0i"
11
+ >
12
+ <div class="flex justify-end px-4 pt-2 space-x-2">
13
+ <Button @icon="refresh" @size="xs" @onClick={{perform this.loadCustomers}} />
21
14
  </div>
22
- {{else}}
23
- <ContentPanel
24
- @title={{this.title}}
25
- @titleStatusRight={{this.customers.length}}
26
- @titleStatusRightClass="info-status-badge"
27
- @hideStatusDot={{true}}
28
- @open={{gt this.customers.length 0}}
29
- @isLoading={{this.loadCustomers.isRunning}}
30
- @pad={{false}}
31
- @wrapperClass={{@wrapperClass}}
32
- >
33
- <div class="flex justify-end px-4 py-2 space-x-2">
34
- <Button @icon="refresh" @size="xs" @onClick={{perform this.loadCustomers}} />
35
- </div>
36
- {{#if (media "isMobile")}}
37
- <div class="flex flex-col p-3 space-y-3">
38
- {{#each this.customers as |customer|}}
39
- <div class="py-2 px-3 rounded-md border border-gray-400 dark:border-gray-700">
40
- <div class="flex flex-row">
41
- <div>
42
- <Image src={{avatar-url customer.photo_url}} class="w-12 h-12 rounded-md shadow-sm mr-4" alt={{customer.name}} />
43
- </div>
44
- <div>
45
- <div class="text-xs font-bold dark:text-gray-100">{{customer.name}}</div>
46
- <div class="text-xs dark:text-gray-100">{{customer.email}}</div>
47
- <div class="text-xs dark:text-gray-100">{{customer.phone}}</div>
48
- </div>
15
+ {{#if (media "isMobile")}}
16
+ <div class="flex flex-col p-3 space-y-3">
17
+ {{#each this.customers as |customer|}}
18
+ <div class="py-2 px-3 rounded-md border border-gray-400 dark:border-gray-700">
19
+ <div class="flex flex-row">
20
+ <div>
21
+ <Image src={{avatar-url customer.photo_url}} class="w-12 h-12 rounded-md shadow-sm mr-4" alt={{customer.name}} />
22
+ </div>
23
+ <div>
24
+ <div class="text-xs font-bold dark:text-gray-100">{{customer.name}}</div>
25
+ <div class="text-xs dark:text-gray-100">{{customer.email}}</div>
26
+ <div class="text-xs dark:text-gray-100">{{customer.phone}}</div>
49
27
  </div>
50
28
  </div>
51
- {{/each}}
52
- </div>
53
- {{else}}
54
- <div class="table-wrapper table-fluid">
55
- <table class="storefront-widget-table">
56
- <thead>
57
- <tr class="h-12 text-left py-1">
58
- <th style={{"width: 20%"}}>{{t "storefront.common.id"}}</th>
59
- <th style={{"width: 15%"}}>{{t "storefront.common.name"}}</th>
60
- <th style={{"width: 20%"}}>{{t "storefront.common.phone"}}</th>
61
- <th style={{"width: 35%"}}>{{t "storefront.common.email"}}</th>
62
- <th style={{"width: 10%"}}>{{t "storefront.common.orders"}}</th>
63
- <th></th>
29
+ </div>
30
+ {{/each}}
31
+ </div>
32
+ {{else}}
33
+ <div class="table-wrapper table-fluid">
34
+ <table class="storefront-widget-table">
35
+ <thead>
36
+ <tr class="h-12 text-left py-1">
37
+ <th style={{"width: 20%"}}>{{t "storefront.common.id"}}</th>
38
+ <th style={{"width: 15%"}}>{{t "storefront.common.name"}}</th>
39
+ <th style={{"width: 20%"}}>{{t "storefront.common.phone"}}</th>
40
+ <th style={{"width: 35%"}}>{{t "storefront.common.email"}}</th>
41
+ <th style={{"width: 10%"}}>{{t "storefront.common.orders"}}</th>
42
+ <th></th>
43
+ </tr>
44
+ </thead>
45
+ <tbody>
46
+ {{#each this.customers as |customer|}}
47
+ <tr class="h-12">
48
+ <td><a href="javascript:;" {{on "click" (fn this.viewCustomer customer)}}>{{customer.public_id}}</a></td>
49
+ <td>{{n-a customer.name}}</td>
50
+ <td>{{n-a customer.phone}}</td>
51
+ <td>{{n-a customer.email}}</td>
52
+ <td>{{n-a customer.orders 0}}</td>
53
+ <td></td>
64
54
  </tr>
65
- </thead>
66
- <tbody>
67
- {{#each this.customers as |customer|}}
68
- <tr class="h-12">
69
- <td><a href="javascript:;" {{on "click" (fn this.viewCustomer customer)}}>{{customer.public_id}}</a></td>
70
- <td>{{n-a customer.name}}</td>
71
- <td>{{n-a customer.phone}}</td>
72
- <td>{{n-a customer.email}}</td>
73
- <td>{{n-a customer.orders 0}}</td>
74
- <td></td>
75
- </tr>
76
- {{/each}}
77
- </tbody>
78
- </table>
79
- </div>
80
- {{/if}}
81
- </ContentPanel>
82
- {{/if}}
55
+ {{/each}}
56
+ </tbody>
57
+ </table>
58
+ </div>
59
+ {{/if}}
60
+ </ContentPanel>