@licklist/design 0.44.539 → 0.44.540

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ResultCard.d.ts","sourceRoot":"","sources":["../../../../../src/sales/booking/results/components/ResultCard.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAK7E,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAIF,eAAO,MAAM,UAAU,uCAIpB,eAAe,gBAmDjB,CAAC"}
1
+ {"version":3,"file":"ResultCard.d.ts","sourceRoot":"","sources":["../../../../../src/sales/booking/results/components/ResultCard.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAM7E,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAIF,eAAO,MAAM,UAAU,uCAIpB,eAAe,gBAsDjB,CAAC"}
@@ -1 +1 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),r=require("@licklist/core/dist/Config"),l=require("react-i18next"),a=require("../../../../static/Icon.js"),n=e(require("clsx")),i=require("luxon"),s=require("@licklist/plugins/dist/utils/formatDate");exports.ResultCard=function(e){var c,u,o,m=e.order,d=e.className,p=e.onCardClick,E=l.useTranslation("Design").t,f=m.id,v=m.people,N=m.user,q=m.status,D=m.startDate,x=(null===(c=m.products.map((function(e){return e.name})))||void 0===c?void 0:c.join(", "))||"",g=function(){p&&p(f)};return t.createElement("div",{className:n("result-card",d),onClick:g,onKeyUp:g,role:"button",tabIndex:0},t.createElement("div",{className:"card-content"},t.createElement("div",{className:"order-id"},f),t.createElement("div",{className:"order-people"},t.createElement(a.default,{type:"user",width:"10",height:"11"}),v),t.createElement("div",{className:"order-description"},t.createElement("p",{className:"name"},N.firstName," ",N.lastName),N.email&&t.createElement("p",null,N.email),(null===(u=N.userDetail)||void 0===u?void 0:u.phone)&&t.createElement("p",null,null===(o=N.userDetail)||void 0===o?void 0:o.phone),t.createElement("p",null,"------"),t.createElement("p",null,E("activity"),": "),t.createElement("p",null,E("staff"),": "),t.createElement("p",null,E("status"),": ",E(q)),t.createElement("p",null,E("date"),": ",s.formatDateStringForEvent(D,!1)),t.createElement("p",null,E("time"),": ",i.DateTime.fromISO(D).toFormat(r.TIME_FORMAT)),t.createElement("p",{className:"products",title:x},E("products"),": ",x))))};
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),r=require("@licklist/core/dist/Config"),l=require("react-i18next"),a=require("../../../../static/Icon.js"),i=e(require("clsx")),n=require("luxon"),s=require("@licklist/plugins/dist/utils/formatDate"),c=require("@licklist/plugins/dist/utils/sourceTitle");exports.ResultCard=function(e){var u,o,m,d=e.order,p=e.className,E=e.onCardClick,f=l.useTranslation("Design").t,v=d.id,N=d.people,q=d.user,g=d.status,D=d.startDate,x=d.products,T=d.source,h=(null===(u=x.map((function(e){return e.name})))||void 0===u?void 0:u.join(", "))||"",k=function(){E&&E(v)};return t.createElement("div",{className:i("result-card",p),onClick:k,onKeyUp:k,role:"button",tabIndex:0},t.createElement("div",{className:"card-content"},t.createElement("div",{className:"order-id"},v),t.createElement("div",{className:"order-people"},t.createElement(a.default,{type:"user",width:"10",height:"11"}),N),t.createElement("div",{className:"order-description"},t.createElement("p",{className:"name"},q.firstName," ",q.lastName),q.email&&t.createElement("p",null,q.email),(null===(o=q.userDetail)||void 0===o?void 0:o.phone)&&t.createElement("p",null,null===(m=q.userDetail)||void 0===m?void 0:m.phone),t.createElement("p",null,"------"),t.createElement("p",null,f("activity"),": "),t.createElement("p",null,f("staff"),": "),t.createElement("p",null,f("status"),": ",f(g)),t.createElement("p",null,f("date"),": ",s.formatDateStringForEvent(D,!1)),t.createElement("p",null,f("time"),": ",n.DateTime.fromISO(D).toFormat(r.TIME_FORMAT)),t.createElement("p",{className:"products",title:h},f("products"),": ",h),t.createElement("p",null,f("source"),": ",f(c.getOrderSourceTitle(T))))))};
@@ -5,14 +5,14 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 12.125rem;
8
+ height: 12.825rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
12
12
  transition: ease-in 0.25s;
13
13
  border-radius: 0.25rem;
14
14
  box-shadow: 0px 0px 0.125rem 0px rgb(0 0 0 / 20%);
15
-
15
+
16
16
  .card-content {
17
17
  width: 100%;
18
18
  height: 100%;
@@ -28,7 +28,7 @@
28
28
  position: absolute;
29
29
  left: 0.5rem;
30
30
  top: 0.125rem;
31
- font-weight: 600;
31
+ font-weight: 600;
32
32
  }
33
33
 
34
34
  .order-people {
@@ -43,7 +43,7 @@
43
43
  height: 1.75rem;
44
44
  font-size: 0.625rem;
45
45
  line-height: 0.625rem;
46
- color: #6D6D6D;
46
+ color: #6d6d6d;
47
47
  font-weight: 600;
48
48
 
49
49
  svg {
@@ -64,7 +64,7 @@
64
64
  }
65
65
 
66
66
  .products {
67
- display: inline-block;
67
+ display: block;
68
68
  width: 80%;
69
69
  white-space: nowrap;
70
70
  overflow: hidden;
@@ -74,7 +74,7 @@
74
74
 
75
75
  &:hover {
76
76
  box-shadow: 0px 0px 0.5rem 0px rgb(0 0 0 / 20%);
77
- cursor: pointer;
77
+ cursor: pointer;
78
78
  }
79
79
  }
80
80
 
@@ -93,4 +93,4 @@
93
93
  }
94
94
  }
95
95
  }
96
- }
96
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.44.539",
3
+ "version": "0.44.540",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -4,6 +4,10 @@ import { Event } from "@licklist/core/dist/DataMapper/Provider/EventDataMapper";
4
4
  import { User } from "@licklist/core/dist/DataMapper/User/UserDataMapper";
5
5
  import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
6
6
  import { Order } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
7
+ import {
8
+ ORDER_SOURCE_IFRAME,
9
+ ORDER_SOURCE_MANUAL,
10
+ } from "@licklist/core/src/DataMapper/Order/OrderDataMapper";
7
11
  import { BookingResults } from "./BookingResults";
8
12
 
9
13
  export default {
@@ -21,6 +25,7 @@ Default.args = {
21
25
  {
22
26
  id: 1,
23
27
  people: 2,
28
+ source: ORDER_SOURCE_MANUAL,
24
29
  products: [
25
30
  {
26
31
  id: 1,
@@ -60,6 +65,7 @@ Default.args = {
60
65
  {
61
66
  id: 2,
62
67
  people: 10,
68
+ source: ORDER_SOURCE_MANUAL,
63
69
  products: [
64
70
  {
65
71
  id: 2,
@@ -100,6 +106,8 @@ Default.args = {
100
106
  {
101
107
  id: 3,
102
108
  people: 10,
109
+ source: ORDER_SOURCE_MANUAL,
110
+
103
111
  products: [
104
112
  {
105
113
  id: 3,
@@ -151,6 +159,7 @@ Default.args = {
151
159
  {
152
160
  id: 4,
153
161
  people: 10,
162
+ source: ORDER_SOURCE_MANUAL,
154
163
  products: [
155
164
  {
156
165
  id: 3,
@@ -182,6 +191,7 @@ Default.args = {
182
191
  {
183
192
  id: 5,
184
193
  people: 10,
194
+ source: ORDER_SOURCE_IFRAME,
185
195
  products: [
186
196
  {
187
197
  id: 3,
@@ -209,6 +219,7 @@ Default.args = {
209
219
  {
210
220
  id: 6,
211
221
  people: 10,
222
+ source: ORDER_SOURCE_IFRAME,
212
223
  products: [
213
224
  {
214
225
  id: 3,
@@ -235,6 +246,7 @@ Default.args = {
235
246
  {
236
247
  id: 7,
237
248
  people: 10,
249
+ source: ORDER_SOURCE_IFRAME,
238
250
  products: [
239
251
  {
240
252
  id: 3,
@@ -5,6 +5,7 @@ import { DateTime } from "luxon";
5
5
  import { Order } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
6
6
  import { TIME_FORMAT } from "@licklist/core/dist/Config";
7
7
  import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
8
+ import { getOrderSourceTitle } from "@licklist/plugins/dist/utils/sourceTitle";
8
9
  import Icon from "../../../../static/Icon";
9
10
 
10
11
  export type ResultCardProps = {
@@ -21,7 +22,7 @@ export const ResultCard = ({
21
22
  onCardClick,
22
23
  }: ResultCardProps) => {
23
24
  const { t } = useTranslation("Design");
24
- const { id, people, user, status, startDate, products } = order;
25
+ const { id, people, user, status, startDate, products, source } = order;
25
26
 
26
27
  const productList = products.map((product) => product.name)?.join(", ") || "";
27
28
 
@@ -66,6 +67,9 @@ export const ResultCard = ({
66
67
  <p className="products" title={productList}>
67
68
  {t("products")}: {productList}
68
69
  </p>
70
+ <p>
71
+ {t("source")}: {t(getOrderSourceTitle(source))}
72
+ </p>
69
73
  </div>
70
74
  </div>
71
75
  </div>
@@ -5,14 +5,14 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 12.125rem;
8
+ height: 12.825rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
12
12
  transition: ease-in 0.25s;
13
13
  border-radius: 0.25rem;
14
14
  box-shadow: 0px 0px 0.125rem 0px rgb(0 0 0 / 20%);
15
-
15
+
16
16
  .card-content {
17
17
  width: 100%;
18
18
  height: 100%;
@@ -28,7 +28,7 @@
28
28
  position: absolute;
29
29
  left: 0.5rem;
30
30
  top: 0.125rem;
31
- font-weight: 600;
31
+ font-weight: 600;
32
32
  }
33
33
 
34
34
  .order-people {
@@ -43,7 +43,7 @@
43
43
  height: 1.75rem;
44
44
  font-size: 0.625rem;
45
45
  line-height: 0.625rem;
46
- color: #6D6D6D;
46
+ color: #6d6d6d;
47
47
  font-weight: 600;
48
48
 
49
49
  svg {
@@ -64,7 +64,7 @@
64
64
  }
65
65
 
66
66
  .products {
67
- display: inline-block;
67
+ display: block;
68
68
  width: 80%;
69
69
  white-space: nowrap;
70
70
  overflow: hidden;
@@ -74,7 +74,7 @@
74
74
 
75
75
  &:hover {
76
76
  box-shadow: 0px 0px 0.5rem 0px rgb(0 0 0 / 20%);
77
- cursor: pointer;
77
+ cursor: pointer;
78
78
  }
79
79
  }
80
80
 
@@ -93,4 +93,4 @@
93
93
  }
94
94
  }
95
95
  }
96
- }
96
+ }