@licklist/design 0.44.486-dev.65 → 0.44.486-dev.67

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,11 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { FieldValues, RefCallBack, UseFormClearErrors } from "react-hook-form";
3
+ import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
3
4
  import { Product, ProductCategory } from "../../../../../../types";
4
5
  interface FormOrderItem {
5
6
  id: number;
6
7
  name: string;
7
8
  price: number;
8
9
  productsCategoryId: number;
10
+ zoneId?: Zone["id"];
9
11
  deposit?: number | null;
10
12
  quantity: number;
11
13
  capacity?: number | null;
@@ -20,6 +22,6 @@ interface ProductQuantityInputProps {
20
22
  invalid: boolean;
21
23
  productInfo: FormOrderItem;
22
24
  }
23
- export declare const ProductQuantityInput: ({ product, category, onChange, clearErrors, refCallback, productInfo, invalid, deposit, }: ProductQuantityInputProps) => JSX.Element;
25
+ export declare const ProductQuantityInput: ({ product, category, onChange: _onChange, clearErrors, refCallback, productInfo, invalid, deposit, }: ProductQuantityInputProps) => JSX.Element;
24
26
  export {};
25
27
  //# sourceMappingURL=ProductQuantityInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnE,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,oBAAoB,8FAS9B,yBAAyB,gBAqF3B,CAAC"}
1
+ {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAE9E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnE,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,oBAAoB,yGAS9B,yBAAyB,gBAgE3B,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")),i=require("react-i18next"),n=require("react-bootstrap"),a=e(require("clsx")),r=require("../NumberInput/NumberInput.js");exports.ProductQuantityInput=function(e){var o=e.product,c=e.category,u=e.onChange,d=e.clearErrors,l=e.refCallback,p=e.productInfo,s=e.invalid,y=e.deposit,m=i.useTranslation("Design").t;return o.isSoldOut?t.createElement("div",{className:"iframe-event__sold-out-wrapper"},m("Design:soldOut")):1===(null==o?void 0:o.maxAmount)?t.createElement(n.Button,{ref:l,disabled:o.isSoldOut,className:a("iframe-event__".concat((null==p?void 0:p.quantity)?"unselect-product":"select-product"),s&&"error"),onClick:function(){u({id:o.id,name:o.name,deposit:y,price:o.price,productsCategoryId:c.id,quantity:(null==p?void 0:p.quantity)?0:1,capacity:null==o?void 0:o.capacity})}},m("Design:".concat((null==p?void 0:p.quantity)?"unselect":"select"))):t.createElement(r.NumberInput,{ref:l,onChange:function(e){u({id:o.id,name:o.name,deposit:y,price:o.price,productsCategoryId:c.id,quantity:e||null,capacity:null==o?void 0:o.capacity}),d("".concat(o.id))},onArrowDown:function(){u({id:o.id,name:o.name,deposit:y,price:o.price,productsCategoryId:c.id,quantity:(null==p?void 0:p.quantity)-1||0,capacity:null==o?void 0:o.capacity}),d("".concat(o.id))},onArrowUp:function(){var e;u({id:o.id,name:o.name,deposit:y,price:o.price,productsCategoryId:c.id,quantity:(null!==(e=null==p?void 0:p.quantity)&&void 0!==e?e:0)+1,capacity:null==o?void 0:o.capacity}),d("".concat(o.id))},min:0,placeholder:"0",disabled:o.isSoldOut,value:null==p?void 0:p.quantity,className:a(s&&"error")})};
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")),n=require("react-i18next"),r=require("react-bootstrap"),o=e(require("clsx")),i=require("../NumberInput/NumberInput.js");exports.ProductQuantityInput=function(e){var u=e.product,a=e.category,l=e.onChange,c=e.clearErrors,d=e.refCallback,s=e.productInfo,p=e.invalid,v=e.deposit,f=n.useTranslation("Design").t,m=function(e){var t;l({id:u.id,name:u.name,deposit:v,price:u.price,productsCategoryId:a.id,zoneId:null===(t=a.zone)||void 0===t?void 0:t.id,quantity:e,capacity:null==u?void 0:u.capacity})};return u.isSoldOut?t.createElement("div",{className:"iframe-event__sold-out-wrapper"},f("Design:soldOut")):1===(null==u?void 0:u.maxAmount)?t.createElement(r.Button,{ref:d,disabled:u.isSoldOut,className:o("iframe-event__".concat((null==s?void 0:s.quantity)?"unselect-product":"select-product"),p&&"error"),onClick:function(){return m((null==s?void 0:s.quantity)?0:1)}},f("Design:".concat((null==s?void 0:s.quantity)?"unselect":"select"))):t.createElement(i.NumberInput,{ref:d,onChange:function(e){m(e||null),c("".concat(u.id))},onArrowDown:function(){m((null==s?void 0:s.quantity)-1||0),c("".concat(u.id))},onArrowUp:function(){var e;m((null!==(e=null==s?void 0:s.quantity)&&void 0!==e?e:0)+1),c("".concat(u.id))},min:0,placeholder:"0",disabled:u.isSoldOut,value:null==s?void 0:s.quantity,className:o(p&&"error")})};
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAI1F,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAK5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAC;AACtI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAI5D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;CACZ;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,MAAM,EACN,uBAAuB;IACzB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,4BAA4B,CAAC,EAAE,gCAAgC,CAAC,sBAAsB,CAAC,CAAC;IACxF,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAsB,EACtB,YAAiB,EACjB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,SAAS,EACT,GAAG,MAAM,EACV,EAAE,mBAAmB,eA2HrB"}
1
+ {"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAI1F,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAK5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAC;AACtI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAG5D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;CACZ;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,MAAM,EACN,uBAAuB;IACzB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,4BAA4B,CAAC,EAAE,gCAAgC,CAAC,sBAAsB,CAAC,CAAC;IACxF,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAsB,EACtB,YAAiB,EACjB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,SAAS,EACT,GAAG,MAAM,EACV,EAAE,mBAAmB,eA0HrB"}
@@ -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
+ }
@@ -4,5 +4,5 @@ export type ZoneControlProps = {
4
4
  isLoading: boolean;
5
5
  workHours?: WorkHour[];
6
6
  };
7
- export declare const ZoneControl: ({ isLoading, }: ZoneControlProps) => JSX.Element;
7
+ export declare const ZoneControl: ({ isLoading }: ZoneControlProps) => JSX.Element;
8
8
  //# sourceMappingURL=ZoneControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ZoneControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneControl.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAStF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,WAAW,mBAErB,gBAAgB,gBA0BlB,CAAC"}
1
+ {"version":3,"file":"ZoneControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneControl.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAStF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,gBA0B1D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.44.486-dev.65",
3
+ "version": "0.44.486-dev.67",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -3,6 +3,7 @@ import clsx from "clsx";
3
3
  import { Button } from "react-bootstrap";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { FieldValues, RefCallBack, UseFormClearErrors } from "react-hook-form";
6
+ import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
6
7
  import { NumberInput } from "../NumberInput";
7
8
  import { Product, ProductCategory } from "../../../../../../types";
8
9
 
@@ -11,6 +12,7 @@ interface FormOrderItem {
11
12
  name: string;
12
13
  price: number;
13
14
  productsCategoryId: number;
15
+ zoneId?: Zone["id"];
14
16
  deposit?: number | null;
15
17
  quantity: number;
16
18
  capacity?: number | null;
@@ -30,7 +32,7 @@ interface ProductQuantityInputProps {
30
32
  export const ProductQuantityInput = ({
31
33
  product,
32
34
  category,
33
- onChange,
35
+ onChange: _onChange,
34
36
  clearErrors,
35
37
  refCallback,
36
38
  productInfo,
@@ -39,14 +41,15 @@ export const ProductQuantityInput = ({
39
41
  }: ProductQuantityInputProps) => {
40
42
  const { t } = useTranslation("Design");
41
43
 
42
- const onClick = () => {
43
- onChange({
44
+ const onChange = (quantity: number | null) => {
45
+ _onChange({
44
46
  id: product.id,
45
47
  name: product.name,
46
48
  deposit,
47
49
  price: product.price,
48
50
  productsCategoryId: category.id,
49
- quantity: productInfo?.quantity ? 0 : 1,
51
+ zoneId: category.zone?.id,
52
+ quantity,
50
53
  capacity: product?.capacity,
51
54
  });
52
55
  };
@@ -58,6 +61,7 @@ export const ProductQuantityInput = ({
58
61
  </div>
59
62
  );
60
63
  }
64
+
61
65
  if (product?.maxAmount === 1) {
62
66
  return (
63
67
  <Button
@@ -69,49 +73,26 @@ export const ProductQuantityInput = ({
69
73
  }`,
70
74
  invalid && "error"
71
75
  )}
72
- onClick={onClick}
76
+ onClick={() => onChange(productInfo?.quantity ? 0 : 1)}
73
77
  >
74
78
  {t(`Design:${productInfo?.quantity ? "unselect" : "select"}`)}
75
79
  </Button>
76
80
  );
77
81
  }
82
+
78
83
  return (
79
84
  <NumberInput
80
85
  ref={refCallback}
81
86
  onChange={(val) => {
82
- onChange({
83
- id: product.id,
84
- name: product.name,
85
- deposit,
86
- price: product.price,
87
- productsCategoryId: category.id,
88
- quantity: val || null,
89
- capacity: product?.capacity,
90
- });
87
+ onChange(val || null);
91
88
  clearErrors(`${product.id}` as const);
92
89
  }}
93
90
  onArrowDown={() => {
94
- onChange({
95
- id: product.id,
96
- name: product.name,
97
- deposit,
98
- price: product.price,
99
- productsCategoryId: category.id,
100
- quantity: productInfo?.quantity - 1 || 0,
101
- capacity: product?.capacity,
102
- });
91
+ onChange(productInfo?.quantity - 1 || 0);
103
92
  clearErrors(`${product.id}` as const);
104
93
  }}
105
94
  onArrowUp={() => {
106
- onChange({
107
- id: product.id,
108
- name: product.name,
109
- deposit,
110
- price: product.price,
111
- productsCategoryId: category.id,
112
- quantity: (productInfo?.quantity ?? 0) + 1,
113
- capacity: product?.capacity,
114
- });
95
+ onChange((productInfo?.quantity ?? 0) + 1);
115
96
  clearErrors(`${product.id}` as const);
116
97
  }}
117
98
  min={0}
@@ -23,7 +23,6 @@ import { ProductSetContextProvider, ProductSetLoadingContext } from "./context";
23
23
  import { SelectItem } from "../../types/generic/SelectItem";
24
24
  import { getFilteredTemplates } from "../utils";
25
25
 
26
-
27
26
  export interface WithIsLoading {
28
27
  isLoading: boolean;
29
28
  }
@@ -79,7 +78,6 @@ export function ProductSetForm({
79
78
  onDeclineDialog,
80
79
  } = useDialogContext();
81
80
 
82
-
83
81
  const form = useForm<ProductSetFormValues>({
84
82
  defaultValues,
85
83
  mode: "onChange",
@@ -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
+ }
@@ -54,7 +54,7 @@ export const ZoneForm = ({
54
54
  return (
55
55
  <FormProvider {...form}>
56
56
  <Form onSubmit={handleSubmit(onFormSubmit)}>
57
- <ZoneControl isLoading={isLoading}/>
57
+ <ZoneControl isLoading={isLoading} />
58
58
  <Row>
59
59
  <Col md={6} sm={12} />
60
60
  <Col
@@ -14,9 +14,7 @@ export type ZoneControlProps = {
14
14
  workHours?: WorkHour[];
15
15
  };
16
16
 
17
- export const ZoneControl = ({
18
- isLoading,
19
- }: ZoneControlProps) => {
17
+ export const ZoneControl = ({ isLoading }: ZoneControlProps) => {
20
18
  return (
21
19
  <Row>
22
20
  <Col md={6} sm={12} className="pr-5">