@licklist/design 0.78.5-dev.54 → 0.78.5-dev.56

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.
Files changed (73) hide show
  1. package/dist/index.js +2 -7
  2. package/dist/v2/components/ActionMenu/ActionMenu.d.ts +1 -0
  3. package/dist/v2/components/ActionMenu/ActionMenu.d.ts.map +1 -1
  4. package/dist/v2/components/ActionMenu/ActionMenu.js +10 -3
  5. package/dist/v2/components/ActionMenu/ActionMenu.scss.js +1 -1
  6. package/dist/v2/components/Button/Button.d.ts +3 -2
  7. package/dist/v2/components/Button/Button.d.ts.map +1 -1
  8. package/dist/v2/components/Button/Button.js +12 -6
  9. package/dist/v2/components/Button/Button.scss.js +1 -1
  10. package/dist/v2/components/NewPageHeader/NewPageHeader.d.ts +2 -1
  11. package/dist/v2/components/NewPageHeader/NewPageHeader.d.ts.map +1 -1
  12. package/dist/v2/components/NewPageHeader/NewPageHeader.js +2 -2
  13. package/dist/v2/components/NewTable/NewTable.d.ts +1 -0
  14. package/dist/v2/components/NewTable/NewTable.d.ts.map +1 -1
  15. package/dist/v2/components/NewTable/NewTable.js +5 -0
  16. package/dist/v2/components/Pagination/Pagination.scss.js +1 -1
  17. package/dist/v2/components/index.d.ts +3 -10
  18. package/dist/v2/components/index.d.ts.map +1 -1
  19. package/dist/v2/icons/index.d.ts +18 -3
  20. package/dist/v2/icons/index.d.ts.map +1 -1
  21. package/dist/v2/icons/index.js +150 -7
  22. package/dist/v2/pages/Settings/components/SidebarCustomisation.js +7 -11
  23. package/dist/v2/pages/Settings/components/SidebarNavItem.js +6 -11
  24. package/dist/v2/styles/components/Button.scss +34 -2
  25. package/package.json +1 -1
  26. package/src/v2/components/ActionMenu/ActionMenu.scss +16 -5
  27. package/src/v2/components/ActionMenu/ActionMenu.tsx +6 -3
  28. package/src/v2/components/Button/Button.tsx +6 -3
  29. package/src/v2/components/Customer/{CustomerDetail/CustomerDetail.scss → CustomerDetail.scss} +7 -3
  30. package/src/v2/components/Customer/CustomersList.scss +308 -36
  31. package/src/v2/components/NewPageHeader/NewPageHeader.tsx +6 -4
  32. package/src/v2/components/NewTable/NewTable.tsx +6 -0
  33. package/src/v2/components/Pagination/Pagination.scss +24 -24
  34. package/src/v2/components/index.ts +19 -13
  35. package/src/v2/icons/index.tsx +35 -6
  36. package/src/v2/styles/components/Button.scss +34 -2
  37. package/dist/v2/components/Customer/CustomerCreate/CustomerCreate.d.ts +0 -11
  38. package/dist/v2/components/Customer/CustomerCreate/CustomerCreate.d.ts.map +0 -1
  39. package/dist/v2/components/Customer/CustomerCreate/CustomerCreate.js +0 -32
  40. package/dist/v2/components/Customer/CustomerCreate/index.d.ts +0 -2
  41. package/dist/v2/components/Customer/CustomerCreate/index.d.ts.map +0 -1
  42. package/dist/v2/components/Customer/CustomerDetail/CustomerDetail.d.ts +0 -35
  43. package/dist/v2/components/Customer/CustomerDetail/CustomerDetail.d.ts.map +0 -1
  44. package/dist/v2/components/Customer/CustomerDetail/CustomerDetail.js +0 -235
  45. package/dist/v2/components/Customer/CustomerDetail/CustomerDetail.scss.js +0 -6
  46. package/dist/v2/components/Customer/CustomerDetail/index.d.ts +0 -2
  47. package/dist/v2/components/Customer/CustomerDetail/index.d.ts.map +0 -1
  48. package/dist/v2/components/Customer/CustomerEdit/CustomerEdit.d.ts +0 -11
  49. package/dist/v2/components/Customer/CustomerEdit/CustomerEdit.d.ts.map +0 -1
  50. package/dist/v2/components/Customer/CustomerEdit/CustomerEdit.js +0 -32
  51. package/dist/v2/components/Customer/CustomerEdit/index.d.ts +0 -2
  52. package/dist/v2/components/Customer/CustomerEdit/index.d.ts.map +0 -1
  53. package/dist/v2/components/Customer/CustomerForm/CustomerForm.d.ts +0 -22
  54. package/dist/v2/components/Customer/CustomerForm/CustomerForm.d.ts.map +0 -1
  55. package/dist/v2/components/Customer/CustomerForm/CustomerForm.js +0 -535
  56. package/dist/v2/components/Customer/CustomerForm/index.d.ts +0 -2
  57. package/dist/v2/components/Customer/CustomerForm/index.d.ts.map +0 -1
  58. package/dist/v2/components/Customer/CustomersList.d.ts +0 -37
  59. package/dist/v2/components/Customer/CustomersList.d.ts.map +0 -1
  60. package/dist/v2/components/Customer/CustomersList.js +0 -204
  61. package/dist/v2/components/Customer/CustomersList.scss.js +0 -6
  62. package/dist/v2/components/Customer/index.d.ts +0 -6
  63. package/dist/v2/components/Customer/index.d.ts.map +0 -1
  64. package/src/v2/components/Customer/CustomerCreate/CustomerCreate.tsx +0 -36
  65. package/src/v2/components/Customer/CustomerCreate/index.ts +0 -1
  66. package/src/v2/components/Customer/CustomerDetail/CustomerDetail.tsx +0 -161
  67. package/src/v2/components/Customer/CustomerDetail/index.ts +0 -1
  68. package/src/v2/components/Customer/CustomerEdit/CustomerEdit.tsx +0 -37
  69. package/src/v2/components/Customer/CustomerEdit/index.ts +0 -1
  70. package/src/v2/components/Customer/CustomerForm/CustomerForm.tsx +0 -434
  71. package/src/v2/components/Customer/CustomerForm/index.ts +0 -1
  72. package/src/v2/components/Customer/CustomersList.tsx +0 -193
  73. package/src/v2/components/Customer/index.ts +0 -5
@@ -1,204 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import 'react';
3
- import { QuickFilter } from '../QuickFilter/QuickFilter.js';
4
- import { NewTable } from '../NewTable/NewTable.js';
5
- import { NewInput } from '../NewInput/NewInput.js';
6
- import { Pagination } from '../Pagination/Pagination.js';
7
- import { ExternalLinkIcon, ClearIcon, SearchIcon, ExportIcon, SendIcon, RefreshIcon } from '../../icons/index.js';
8
- import './CustomersList.scss.js';
9
-
10
- var CustomersList = function(param) {
11
- var t = param.t, customers = param.customers, isLoading = param.isLoading, kioskLink = param.kioskLink, search = param.search, onSearchChange = param.onSearchChange, quickFilters = param.quickFilters, onSearchIconClick = param.onSearchIconClick, onClearSearch = param.onClearSearch, onQuickFiltersChange = param.onQuickFiltersChange, onRefresh = param.onRefresh, onExport = param.onExport, onSendWaiverRequest = param.onSendWaiverRequest, onTabChange = param.onTabChange, activeTab = param.activeTab, tabs = param.tabs, columns = param.columns, pagination = param.pagination, waiversEnabled = param.waiversEnabled, onAddCustomer = param.onAddCustomer;
12
- var quickFilterOptions = waiversEnabled ? [
13
- {
14
- label: t('App:todayBookings'),
15
- value: 'today'
16
- },
17
- {
18
- label: t('App:signed', 'Signed'),
19
- value: 'signed'
20
- },
21
- {
22
- label: t('App:unsigned', 'Unsigned'),
23
- value: 'unsigned'
24
- }
25
- ] : [
26
- {
27
- label: t('App:todayBookings', 'Bookings for: Today'),
28
- value: 'today'
29
- }
30
- ];
31
- // Handle mutually exclusive signed/unsigned filters
32
- var handleQuickFiltersChange = function(newFilters) {
33
- var hasSigned = newFilters.includes('signed');
34
- var hasUnsigned = newFilters.includes('unsigned');
35
- var hadSigned = quickFilters.includes('signed');
36
- var hadUnsigned = quickFilters.includes('unsigned');
37
- // If both signed and unsigned are being selected, keep only the newly selected one
38
- if (hasSigned && hasUnsigned) {
39
- if (!hadSigned && hasUnsigned) {
40
- // signed was just added, remove unsigned
41
- onQuickFiltersChange(newFilters.filter(function(f) {
42
- return f !== 'unsigned';
43
- }));
44
- } else if (hasSigned && !hadUnsigned) {
45
- // unsigned was just added, remove signed
46
- onQuickFiltersChange(newFilters.filter(function(f) {
47
- return f !== 'signed';
48
- }));
49
- }
50
- } else {
51
- onQuickFiltersChange(newFilters);
52
- }
53
- };
54
- var _pagination_totalItems, _pagination_itemsPerPage;
55
- return /*#__PURE__*/ jsxs("div", {
56
- className: "waivers-page",
57
- children: [
58
- /*#__PURE__*/ jsx("header", {
59
- className: "waivers-page__header",
60
- children: tabs && tabs.length > 0 ? /*#__PURE__*/ jsxs("div", {
61
- className: "waivers-page__tabs-container",
62
- children: [
63
- /*#__PURE__*/ jsx("nav", {
64
- className: "waivers-page__tabs",
65
- children: tabs.map(function(tab) {
66
- return /*#__PURE__*/ jsxs("button", {
67
- className: "waivers-page__tab ".concat(tab.id === activeTab ? 'waivers-page__tab--active' : ''),
68
- onClick: function() {
69
- return onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange(tab.id);
70
- },
71
- children: [
72
- tab.label,
73
- tab.id === activeTab && /*#__PURE__*/ jsx("div", {
74
- className: "waivers-page__tab-indicator"
75
- })
76
- ]
77
- }, tab.id);
78
- })
79
- }),
80
- kioskLink && /*#__PURE__*/ jsxs("a", {
81
- href: kioskLink,
82
- target: "_blank",
83
- rel: "noopener noreferrer",
84
- className: "kiosk-link",
85
- children: [
86
- /*#__PURE__*/ jsx(ExternalLinkIcon, {}),
87
- t('App:launchKiosk', 'Launch Kiosk')
88
- ]
89
- })
90
- ]
91
- }) : /*#__PURE__*/ jsx("div", {
92
- className: "waivers-page__simple-header",
93
- children: onAddCustomer && /*#__PURE__*/ jsxs("button", {
94
- className: "waivers-page__add-customer-btn",
95
- onClick: onAddCustomer,
96
- children: [
97
- "+ ",
98
- t('App:addCustomer', 'Add Customer')
99
- ]
100
- })
101
- })
102
- }),
103
- /*#__PURE__*/ jsxs("main", {
104
- className: "waivers-page__content",
105
- children: [
106
- /*#__PURE__*/ jsxs("section", {
107
- className: "filter-section",
108
- children: [
109
- /*#__PURE__*/ jsx("div", {
110
- className: "search-row",
111
- children: /*#__PURE__*/ jsxs("div", {
112
- className: "search-input-wrapper",
113
- children: [
114
- /*#__PURE__*/ jsx(NewInput, {
115
- label: t('App:search', 'Search'),
116
- value: search,
117
- onChange: function(e) {
118
- return onSearchChange(e.target.value);
119
- },
120
- onIconClick: search ? onClearSearch : onSearchIconClick,
121
- icon: search ? /*#__PURE__*/ jsx(ClearIcon, {}) : /*#__PURE__*/ jsx(SearchIcon, {}),
122
- iconPosition: search ? 'right' : 'left'
123
- }),
124
- /*#__PURE__*/ jsx("p", {
125
- className: "search-helper-text",
126
- children: t('App:searchPlaceholder')
127
- })
128
- ]
129
- })
130
- }),
131
- /*#__PURE__*/ jsxs("div", {
132
- className: "filters-actions-row",
133
- children: [
134
- /*#__PURE__*/ jsx("div", {
135
- className: "quick-filters-wrapper",
136
- children: /*#__PURE__*/ jsx(QuickFilter, {
137
- label: t('App:quickFilters', 'Quick Filters:'),
138
- options: quickFilterOptions,
139
- selectedValues: quickFilters,
140
- onChange: handleQuickFiltersChange
141
- })
142
- }),
143
- /*#__PURE__*/ jsxs("div", {
144
- className: "action-buttons",
145
- children: [
146
- /*#__PURE__*/ jsxs("button", {
147
- className: "action-btn",
148
- onClick: onExport,
149
- children: [
150
- /*#__PURE__*/ jsx(ExportIcon, {}),
151
- t('App:exportData', 'Export')
152
- ]
153
- }),
154
- waiversEnabled && /*#__PURE__*/ jsxs("button", {
155
- className: "action-btn",
156
- onClick: onSendWaiverRequest,
157
- children: [
158
- /*#__PURE__*/ jsx(SendIcon, {}),
159
- t('App:requestWaiver', 'Request Waiver')
160
- ]
161
- }),
162
- /*#__PURE__*/ jsxs("button", {
163
- className: "action-btn",
164
- onClick: onRefresh,
165
- children: [
166
- /*#__PURE__*/ jsx(RefreshIcon, {}),
167
- t('App:refresh', 'Refresh')
168
- ]
169
- })
170
- ]
171
- })
172
- ]
173
- })
174
- ]
175
- }),
176
- /*#__PURE__*/ jsxs("section", {
177
- className: "table-section",
178
- children: [
179
- /*#__PURE__*/ jsx(NewTable, {
180
- columns: columns,
181
- data: customers,
182
- noDataText: !isLoading && customers.length === 0 ? t('App:noResultsFound') : undefined
183
- }),
184
- pagination && customers.length > 0 && /*#__PURE__*/ jsx("div", {
185
- className: "waivers-page__pagination",
186
- children: /*#__PURE__*/ jsx(Pagination, {
187
- currentPage: pagination.currentPage,
188
- totalPages: pagination.totalPages,
189
- totalItems: (_pagination_totalItems = pagination.totalItems) !== null && _pagination_totalItems !== void 0 ? _pagination_totalItems : 0,
190
- itemsPerPage: (_pagination_itemsPerPage = pagination.itemsPerPage) !== null && _pagination_itemsPerPage !== void 0 ? _pagination_itemsPerPage : 24,
191
- onPageChange: pagination.onPageChange,
192
- t: t,
193
- entityName: t('App:customersLowerCase', 'customers')
194
- })
195
- })
196
- ]
197
- })
198
- ]
199
- })
200
- ]
201
- });
202
- };
203
-
204
- export { CustomersList };
@@ -1,6 +0,0 @@
1
- import styleInject from '/opt/atlassian/pipelines/agent/build/node_modules/style-inject/dist/style-inject.es.js';
2
-
3
- var css_248z = ".waivers-page{background-color:#fff;font-family:var(--font-family-sans,\"Geist\",sans-serif);min-height:100vh;padding:24px}.waivers-page__header{margin:20px 0}.waivers-page__header,.waivers-page__tabs-container{align-items:center;display:flex;justify-content:space-between}.waivers-page__tabs-container{border-bottom:1px solid #e8e9ef;width:100%}.waivers-page__title-row{align-items:center;display:flex;justify-content:space-between;margin-bottom:24px}.waivers-page__title{color:#121e52;font-size:24px;font-weight:700;margin:0}.waivers-page .kiosk-link{align-items:center;color:#121e52;display:inline-flex!important;font-size:14px;font-weight:500;gap:8px;opacity:1!important;text-decoration:none;visibility:visible!important}.waivers-page .kiosk-link:hover{text-decoration:none}.waivers-page .kiosk-link svg{flex-shrink:0;height:30px;width:30px}.waivers-page__tabs{display:flex;gap:24px}.waivers-page__tab{background:none;border:none;color:#9399b3;cursor:pointer;font-size:16px;font-weight:500;padding:12px 0;position:relative;transition:color .2s ease}.waivers-page__tab:hover{color:#121e52}.waivers-page__tab--active{color:#121e52;font-weight:600}.waivers-page__tab-indicator{background-color:#121e52;bottom:-1px;height:3px;left:0;position:absolute;width:100%}.waivers-page__content{display:flex;flex-direction:column;gap:32px}.waivers-page .filter-section{display:flex;flex-direction:column;gap:24px}.waivers-page .filter-section .search-row{width:100%}.waivers-page .filter-section .search-input-wrapper{max-width:800px;width:100%}.waivers-page .filter-section .search-helper-text{color:var(--label-secondary,#626a90);font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:15px;font-weight:400;line-height:20px;margin-bottom:0;margin-top:8px}.waivers-page .filter-section .filters-actions-row{align-items:center;display:flex;gap:24px;justify-content:space-between;width:100%}.waivers-page .filter-section .quick-filters-wrapper{flex:1}.waivers-page .filter-section .action-buttons{align-items:center;display:flex;gap:16px}.waivers-page .filter-section .action-btn{align-items:center;background:none;border:none;border-radius:4px;color:#121e52;cursor:pointer;display:inline-flex;font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:14px;font-weight:500;gap:8px;padding:8px 12px;transition:background-color .2s ease}.waivers-page .filter-section .action-btn:hover{background-color:#f8f8fa}.waivers-page .filter-section .action-btn svg{flex-shrink:0;height:20px;width:20px}.waivers-page .filter-section__row{display:flex;gap:24px}.waivers-page .filter-section__col{flex:1}.waivers-page .filter-section__col--date{flex:0 0 50%;max-width:50%}.waivers-page .customer-cell__name{color:#121e52;font-weight:600}.waivers-page .customer-cell__email{color:#9399b3;font-size:13px}.waivers-page .customer-cell__id{color:#9399b3;display:none;font-size:13px}.waivers-page .customer-cell:hover .customer-cell__id{display:block}.waivers-page .customer-cell:hover .customer-cell__email{display:none}.waivers-page .type-cell__main{color:#121e52;font-weight:500}.waivers-page .type-cell__sub{color:#9399b3;font-size:13px}.waivers-page .date-cell__next{color:#121e52}.waivers-page .date-cell__expires{color:#9399b3;font-size:13px}.waivers-page .date-cell__expires--expired{color:#ef4444}.waivers-page .action-button{align-items:center;background:#f0f0f5;border:none;border-radius:50%;color:#6200ee;cursor:pointer;display:inline-flex;height:44px;justify-content:center;transition:background-color .2s ease;width:44px}.waivers-page .action-button:hover{background-color:#e0e0eb}.waivers-page .action-button svg{height:30px;width:30px}.waivers-page__pagination{align-items:center;border-top:1px solid #e8e9ef;display:flex;gap:12px;justify-content:center;margin-top:16px;padding-top:16px}.waivers-page__pagination .pagination__nav{background:none;border:1px solid #e0e1ea;border-radius:6px;color:#121e52;cursor:pointer;font-size:14px;padding:8px 12px}.waivers-page__pagination .pagination__nav:disabled{cursor:not-allowed;opacity:.5}.waivers-page__pagination .pagination__pages{display:flex;gap:8px}.waivers-page__pagination .pagination__page{align-items:center;background:#f8f8fa;border:1px solid #e0e1ea;border-radius:6px;color:#121e52;cursor:pointer;display:inline-flex;height:36px;justify-content:center;width:36px}.waivers-page__pagination .pagination__page--active{background:#121e52;border-color:#121e52;color:#fff}.waivers-page__pagination .pagination__ellipsis{align-items:center;color:#9399b3;display:inline-flex;font-weight:600;height:36px;justify-content:center;width:36px}.waivers-page .table-section{background-color:#fff;border-radius:8px;overflow:hidden}.waivers-page .no-results-content{align-items:center;background-color:#fff;border-radius:8px;display:none;justify-content:center;min-height:200px;padding:64px 24px}.waivers-page .no-results-content .no-results-found{color:#9399b3;font-size:16px;font-weight:500}.waivers-page__simple-header{align-items:center;display:flex;justify-content:flex-end;width:100%}.waivers-page__add-customer-btn{align-items:center;background-color:#121e52;border:none;border-radius:8px;color:#fff;cursor:pointer;display:inline-flex;font-family:var(--font-family-sans,\"Geist\",sans-serif);font-size:16px;font-weight:600;gap:8px;padding:12px 24px;transition:background-color .2s ease}.waivers-page__add-customer-btn:hover{background-color:#0f1940}@media (max-width:768px){.waivers-page{padding:16px}.waivers-page__header{margin:12px 0 16px}.waivers-page__tabs-container{align-items:flex-start;flex-direction:column;gap:16px}.waivers-page__tabs{-webkit-overflow-scrolling:touch;gap:16px;overflow-x:auto;width:100%}.waivers-page__tabs::-webkit-scrollbar{display:none}.waivers-page__tabs{scrollbar-width:none}.waivers-page__tab{flex-shrink:0;font-size:14px;padding:8px 0;white-space:nowrap}.waivers-page .kiosk-link{background-color:#f8f8fa;border-radius:8px;justify-content:center;padding:12px;width:100%}.waivers-page .kiosk-link svg{height:24px;width:24px}.waivers-page__simple-header{justify-content:center}.waivers-page__add-customer-btn{font-size:14px;justify-content:center;padding:10px 20px;width:100%}.waivers-page__content{gap:20px}.waivers-page .filter-section{gap:16px}.waivers-page .filter-section .search-input-wrapper{max-width:100%}.waivers-page .filter-section .search-helper-text{font-size:13px;margin-top:4px}.waivers-page .filter-section .filters-actions-row{align-items:stretch;flex-direction:column;gap:16px}.waivers-page .filter-section .quick-filters-wrapper{width:100%}.waivers-page .filter-section .action-buttons{flex-wrap:wrap;gap:8px;justify-content:flex-start}.waivers-page .filter-section .action-btn{flex:1;font-size:12px;justify-content:center;min-width:fit-content;padding:6px 10px}.waivers-page .filter-section .action-btn svg{height:16px;width:16px}.waivers-page__pagination{flex-direction:column;gap:12px;margin-top:12px;padding-top:12px}.waivers-page__pagination .pagination__nav{font-size:12px;padding:6px 10px}.waivers-page__pagination .pagination__pages{flex-wrap:wrap;gap:4px;justify-content:center}.waivers-page__pagination .pagination__ellipsis,.waivers-page__pagination .pagination__page{font-size:12px;height:32px;width:32px}.waivers-page .table-section{-webkit-overflow-scrolling:touch;overflow-x:auto}.waivers-page .customer-cell__name{font-size:14px}.waivers-page .customer-cell__email,.waivers-page .customer-cell__id{font-size:12px}.waivers-page .type-cell__main{font-size:14px}.waivers-page .type-cell__sub{font-size:12px}.waivers-page .date-cell__next{font-size:14px}.waivers-page .date-cell__expires{font-size:12px}.waivers-page .action-button{height:36px;width:36px}.waivers-page .action-button svg{height:24px;width:24px}}@media (max-width:480px){.waivers-page{padding:12px}.waivers-page__header{margin:8px 0 12px}.waivers-page__tabs{gap:12px}.waivers-page__tab{font-size:13px}.waivers-page__add-customer-btn{font-size:13px;padding:8px 16px}.waivers-page .filter-section .action-buttons{flex-direction:column;width:100%}.waivers-page .filter-section .action-btn{justify-content:center;width:100%}.waivers-page .customer-cell__name{font-size:13px}}";
4
- styleInject(css_248z);
5
-
6
- export { css_248z as default };
@@ -1,6 +0,0 @@
1
- export * from './CustomersList';
2
- export * from './CustomerCreate';
3
- export * from './CustomerDetail';
4
- export * from './CustomerEdit';
5
- export * from './CustomerForm';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/Customer/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
@@ -1,36 +0,0 @@
1
- import React from 'react'
2
- import { NewPageHeader } from '../../NewPageHeader'
3
- import { CustomerForm, CustomerData } from '../CustomerForm'
4
-
5
- export interface CustomerCreateProps {
6
- onCancel: () => void
7
- onSave: (data: CustomerData) => void
8
- initialData?: Partial<CustomerData>
9
- isLoading?: boolean
10
- submitButtonLabel?: string
11
- }
12
-
13
- export const CustomerCreate: React.FC<CustomerCreateProps> = ({
14
- onCancel,
15
- onSave,
16
- initialData,
17
- isLoading,
18
- submitButtonLabel = 'Create Customer',
19
- }) => {
20
- return (
21
- <div className="tw-bg-white tw-min-h-screen tw-font-sans">
22
- <div className='tw-max-w-4xl tw-mx-auto tw-w-full'>
23
- <NewPageHeader title="Add Customer" onCancel={onCancel} cancelLabel="Cancel" />
24
- </div>
25
-
26
- <div className="tw-max-w-4xl tw-mx-auto tw-w-full tw-bg-white tw-border-2 tw-border-[#e8e9ef] tw-rounded-lg tw-p-4 md:tw-p-8 tw-mt-8">
27
- <CustomerForm
28
- onSave={onSave}
29
- initialData={initialData}
30
- isLoading={isLoading}
31
- submitButtonLabel={submitButtonLabel}
32
- />
33
- </div>
34
- </div>
35
- )
36
- }
@@ -1 +0,0 @@
1
- export * from './CustomerCreate'
@@ -1,161 +0,0 @@
1
- import React from 'react'
2
- import { Badge } from '../../Badge'
3
- import { EditIcon, ArrowLeftIcon, InfoIcon } from '../../../icons'
4
- import './CustomerDetail.scss'
5
-
6
- export interface CustomerDetailProps {
7
- onBack: () => void
8
- onEdit?: () => void
9
- name: string
10
- customerId: string
11
- waiverStatus: string
12
- waiversEnabled?: boolean
13
- waiverStatusVariant?: 'success' | 'danger' | 'warning' | 'neutral'
14
- contactDetails: {
15
- email: string
16
- phone?: string
17
- age?: string
18
- }
19
- bookingDetails: {
20
- nextBooking: string
21
- customerSince: string
22
- }
23
- waiverDetails: {
24
- status: string
25
- statusVariant?: 'success' | 'danger' | 'warning' | 'neutral'
26
- expires: string
27
- }
28
- minors?: Array<{
29
- name: string
30
- age: string
31
- expires: string
32
- status: string
33
- statusVariant?: 'success' | 'danger' | 'warning' | 'neutral'
34
- }>
35
- customerSinceFooter: string
36
- }
37
-
38
- export const CustomerDetail: React.FC<CustomerDetailProps> = ({
39
- onBack,
40
- onEdit,
41
- name,
42
- customerId,
43
- waiverStatus,
44
- waiverStatusVariant = 'success',
45
- waiversEnabled = true,
46
- contactDetails,
47
- bookingDetails,
48
- waiverDetails,
49
- minors,
50
- customerSinceFooter,
51
- }) => {
52
- return (
53
- <div className="customer-detail">
54
- <div className="customer-detail__back" onClick={onBack}>
55
- <span className="customer-detail__back-icon"><ArrowLeftIcon width={24} height={24} /></span> Back to Customers
56
- </div>
57
-
58
- <div className="customer-detail__header">
59
- <div className="customer-detail__title-row">
60
- <h1 className="customer-detail__name">{name}</h1>
61
- </div>
62
- <div className="customer-detail__badges-row">
63
- <div className="customer-detail__badges">
64
- <span className="customer-detail__id-badge">{customerId}</span>
65
- {waiversEnabled && (
66
- <Badge
67
- variant={waiverStatusVariant}
68
- icon={(waiverStatus === 'Expired' || waiverStatus === 'Not Signed') ? <InfoIcon /> : undefined}
69
- >
70
- {waiverStatus}
71
- </Badge>
72
- )}
73
- </div>
74
- {onEdit && (
75
- <div className="customer-detail__edit" onClick={onEdit}>
76
- <EditIcon /> Edit
77
- </div>
78
- )}
79
- </div>
80
- </div>
81
-
82
- <div className="customer-detail__grid">
83
- <div className="customer-detail__card">
84
- <h2 className="customer-detail__card-title">Contact Details</h2>
85
- <div className="customer-detail__info-group">
86
- <label>Email</label>
87
- <span>{contactDetails.email}</span>
88
- </div>
89
- <div className="customer-detail__info-group">
90
- <label>Phone</label>
91
- <span>{contactDetails.phone || '-'}</span>
92
- </div>
93
- <div className="customer-detail__info-group">
94
- <label>Age</label>
95
- <span>{contactDetails.age || '-'}</span>
96
- </div>
97
- </div>
98
-
99
- <div className="customer-detail__card">
100
- <h2 className="customer-detail__card-title">Booking Details</h2>
101
- <div className="customer-detail__info-group">
102
- <label>Next Booking</label>
103
- <span>{bookingDetails.nextBooking}</span>
104
- </div>
105
- <div className="customer-detail__info-group">
106
- <label>Customer Since</label>
107
- <span>{bookingDetails.customerSince}</span>
108
- </div>
109
- </div>
110
-
111
- {waiversEnabled && (
112
- <div className="customer-detail__card">
113
- <h2 className="customer-detail__card-title">Waiver Details</h2>
114
- <div className="customer-detail__info-group">
115
- <label>Status</label>
116
- <span>
117
- <Badge
118
- variant={waiverDetails.statusVariant}
119
- icon={(waiverDetails.status === 'Expired' || waiverDetails.status === 'Not Signed') ? <InfoIcon /> : undefined}
120
- >
121
- {waiverDetails.status}
122
- </Badge>
123
- </span>
124
- </div>
125
- <div className="customer-detail__info-group">
126
- <label>Expires</label>
127
- <span>{waiverDetails.expires}</span>
128
- </div>
129
- </div>
130
- )}
131
- </div>
132
-
133
- {waiversEnabled && minors && minors.length > 0 && (
134
- <div className="customer-detail__card customer-detail__card--full">
135
- <h2 className="customer-detail__card-title">Minors Signed For</h2>
136
- {minors.map((minor, index) => (
137
- <div key={index} className="customer-detail__minor-row">
138
- <div className="customer-detail__minor-info">
139
- <div className="customer-detail__minor-name">{minor.name}</div>
140
- <div className="customer-detail__minor-age">{minor.age}</div>
141
- </div>
142
- <div className="customer-detail__minor-status-group">
143
- <span className="customer-detail__minor-expires">Expires: {minor.expires}</span>
144
- <Badge
145
- variant={minor.statusVariant}
146
- icon={(minor.status === 'Expired' || minor.status === 'Not Signed') ? <InfoIcon /> : undefined}
147
- >
148
- {minor.status}
149
- </Badge>
150
- </div>
151
- </div>
152
- ))}
153
- </div>
154
- )}
155
-
156
- <div className="customer-detail__footer">
157
- Customer since: {customerSinceFooter}
158
- </div>
159
- </div>
160
- )
161
- }
@@ -1 +0,0 @@
1
- export * from './CustomerDetail'
@@ -1,37 +0,0 @@
1
- import React from 'react'
2
- import { NewPageHeader } from '../../NewPageHeader'
3
- import { CustomerForm, CustomerData } from '../CustomerForm'
4
-
5
- export interface CustomerEditProps {
6
- onBack: () => void
7
- onCancel: () => void
8
- onSave: (data: CustomerData) => void
9
- initialData?: Partial<CustomerData>
10
- isLoading?: boolean
11
- }
12
-
13
- export const CustomerEdit: React.FC<CustomerEditProps> = ({
14
-
15
- onCancel,
16
- onSave,
17
- initialData,
18
- isLoading,
19
- }) => {
20
- return (
21
- <div className="tw-bg-white tw-min-h-screen tw-font-sans">
22
- <div className='tw-max-w-4xl tw-mx-auto tw-w-full'>
23
- <NewPageHeader title="Edit Customer" onCancel={onCancel} />
24
- </div>
25
-
26
- <div className="tw-max-w-4xl tw-mx-auto tw-w-full tw-bg-white tw-border-2 tw-border-[#e8e9ef] tw-rounded-lg tw-p-4 md:tw-p-8 tw-mt-8">
27
- <CustomerForm
28
- onSave={onSave}
29
- initialData={initialData}
30
- isLoading={isLoading}
31
- submitButtonLabel="Save Changes"
32
- isEditing={true}
33
- />
34
- </div>
35
- </div>
36
- )
37
- }
@@ -1 +0,0 @@
1
- export * from './CustomerEdit'