@licklist/design 0.58.2 → 0.58.3-dev.0
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/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +2 -2
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts.map +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/styles/report/ReportRunnerModal.scss +88 -82
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/package.json +3 -3
- package/src/auth/Login/LoginComponent.tsx +9 -1
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +0 -1
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +14 -14
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +5 -3
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +1 -1
- package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +35 -4
- package/src/sales/booking/results/components/ResultCard.tsx +0 -3
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/report/ReportRunnerModal.scss +88 -82
- package/src/styles/sales/BookingResults.scss +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Login/LoginComponent.tsx"],"names":[],"mappings":";AAuBA,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,cAAc,yCAGjB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"LoginComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Login/LoginComponent.tsx"],"names":[],"mappings":";AAuBA,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,cAAc,yCAGjB,mBAAmB,gBAkHrB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,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=require("tslib"),r=require("react"),i=e(r),n=require("react-router-dom"),o=e(require("@licklist/plugins/dist/context/user/hooks/useUser")),s=e(require("@licklist/plugins/dist/services/Route/RouteService")),a=e(require("@licklist/plugins/dist/context/user/hooks/useAuth")),c=require("../../static/loader/LoaderIndicator.js"),l=require("react-i18next"),u=require("../Router.js"),d=e(require("react-bootstrap/Row")),m=e(require("react-bootstrap/Col")),g=e(require("@licklist/plugins/dist/context/app/RequestContext")),
|
|
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=require("tslib"),r=require("react"),i=e(r),n=require("react-router-dom"),o=e(require("@licklist/plugins/dist/context/user/hooks/useUser")),s=e(require("@licklist/plugins/dist/services/Route/RouteService")),a=e(require("@licklist/plugins/dist/context/user/hooks/useAuth")),c=require("../../static/loader/LoaderIndicator.js"),l=require("react-i18next"),u=require("../Router.js"),d=e(require("react-bootstrap/Row")),m=e(require("react-bootstrap/Col")),g=e(require("@licklist/plugins/dist/context/app/RequestContext")),f=e(require("@licklist/plugins/dist/hooks/Api/useUserApi")),p=e(require("@licklist/plugins/dist/context/app/hooks/useNotification")),v=e(require("@licklist/plugins/dist/context/user/hooks/useInvite")),q=require("../Social/SocialFormComponent.js"),h=require("./LoginFormComponent.js"),E=require("../../static/FormCard.js"),k=require("../../logo/Logo.js"),_=require("../../assets/logo/bookedit.svg.js");exports.LoginComponent=function(e){var x=e.hideSignUpLink,L=void 0!==x&&x,S=e.showSocialLinks,j=void 0!==S&&S,b=l.useTranslation(["Notification","User"]).t,C=r.useContext(g),N=p(),F=a(),R=o(),w=v(),y=t.__read(r.useState(!1),2),I=y[0],T=y[1],U=f(C),A=function(e){N.danger({title:"Error",message:e.message})};return r.useEffect((function(){R.profile&&F.secrets&&s.redirectTo("/")}),[R.profile,F.secrets]),i.createElement(u.Router,null,i.createElement(d,{className:"justify-content-center"},i.createElement(m,{xs:!0,sm:12,md:7,lg:6,xl:5,className:"align-self-center"},i.createElement(i.Fragment,null,i.createElement("h1",{className:"text-center"},b("User:loginTitle")),i.createElement("div",{className:"login d-flex pb-4 justify-content-center"},i.createElement(k.default,{logo:i.createElement(_.ReactComponent,null)})),!L&&i.createElement("h6",{className:"text-center"},i.createElement(l.Trans,{t:b,i18nKey:"loginPromo"},"Don't have account? ",i.createElement(n.Link,{to:"/register"},"Sign up"),".")),i.createElement(E.default,null,j&&i.createElement(i.Fragment,null,i.createElement(q.SocialFormComponent,{isLoading:I,setIsLoading:T}),i.createElement("hr",{className:"mb-2"})),i.createElement(h.LoginFormComponent,{isLoading:I,setIsLoading:T,onSubmit:function(e){return t.__awaiter(void 0,void 0,void 0,(function(){var r,i;return t.__generator(this,(function(n){switch(n.label){case 0:return[4,(o=e,t.__awaiter(void 0,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,U.login(o).catch(A)]}))})))];case 1:return(r=n.sent())?(function(e){F.setSecrets(e)}(r),U.setAuthorizationToken(r.access_token),[4,t.__awaiter(void 0,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,U.profile().catch(A)]}))}))]):[2];case 2:return(i=n.sent())?(R.login(i.data),w.clearInvitation(),N.success({title:"Success",message:b("Notification:loggedSuccessfully")}),s.redirectTo("/"),[2]):[2]}var o}))}))},invitation:w.invitation}),i.createElement(c.LoaderIndicator,{isLoaded:!I}))))))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../../src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EditEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../../src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACnE,aAAa,CAAC,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,mBAAmB,iCAG7B,wBAAwB,gBAgH1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper"),o=require("../../../product-set/utils/index.js");exports.getDefaultValues=function(n,i){var t,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper"),o=require("../../../product-set/utils/index.js");exports.getDefaultValues=function(n,i){var d,t,u,s,r,a,v,p,_,m,c,g;return{id:null!==(d=null==n?void 0:n.id)&&void 0!==d?d:0,name:null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"",type:null!==(u=null==n?void 0:n.type)&&void 0!==u?u:l.DEFAULT_PRODUCT_SET_TYPE,termsAndConditions:null!==(s=null==n?void 0:n.termsAndConditions)&&void 0!==s?s:"",operationalCost:null!==(r=null==n?void 0:n.operationalCost)&&void 0!==r?r:l.DEFAULT_OPERATIONAL_COST_TYPE,relyOnPeopleType:null!==(a=null==n?void 0:n.relyOnPeopleType)&&void 0!==a?a:null,thankYouPageUrl:null!==(v=null==n?void 0:n.thankYouPageUrl)&&void 0!==v?v:"",fieldSetId:null==n?void 0:n.fieldSetId,emailTemplates:(null==n?void 0:n.mailTemplates)&&(null===(p=null==n?void 0:n.mailTemplates)||void 0===p?void 0:p.length)>0?o.getFilteredTemplates(null==n?void 0:n.mailTemplates):void 0,smsTemplates:(null==n?void 0:n.smsTemplates)&&(null===(_=null==n?void 0:n.smsTemplates)||void 0===_?void 0:_.length)>0?o.getFilteredTemplates(null==n?void 0:n.smsTemplates):void 0,steps:null!==(c=null===(m=null==n?void 0:n.steps)||void 0===m?void 0:m.map((function(l){var o,n,i=l.productCategories,d=e.__rest(l,["productCategories"]);return e.__assign(e.__assign({},d),{productCategories:null!==(o=null==i?void 0:i.map((function(l){var o,n=l.products,i=e.__rest(l,["products"]);return e.__assign(e.__assign({},i),{products:null!==(o=null==n?void 0:n.map((function(l){var o=l.zoneId,n=l.subProducts,i=e.__rest(l,["zoneId","subProducts"]);return e.__assign(e.__assign({},i),{subProducts:null==n?void 0:n.map((function(l){var o=l.zoneId,n=e.__rest(l,["zoneId"]);return e.__assign(e.__assign({},n),{productCategoryId:void 0,zoneId:o})})),productCategoryId:void 0,zoneId:o})})))&&void 0!==o?o:[]})})))&&void 0!==o?o:[],venueMapSetId:(null==d?void 0:d.venueMapSet)?null===(n=null==d?void 0:d.venueMapSet)||void 0===n?void 0:n.id:null})})))&&void 0!==c?c:[],menuRecurrences:i?[]:null!==(g=null==n?void 0:n.menuRecurrences)&&void 0!==g?g:[]}};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ProductCategory } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
2
1
|
import { OrderItems } from "@licklist/plugins/dist/types/context/Iframe/orderItems";
|
|
2
|
+
import { ProductCategory } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
3
3
|
interface CategoryError {
|
|
4
4
|
message: string;
|
|
5
5
|
id?: number;
|
|
6
6
|
}
|
|
7
|
-
export declare const useCategoryVerification: () => (
|
|
7
|
+
export declare const useCategoryVerification: () => (orderItems: OrderItems, productCategories?: ProductCategory[], isLastPage?: boolean) => CategoryError | void;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=useCategoryVerification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCategoryVerification.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/utils/useCategoryVerification.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCategoryVerification.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/utils/useCategoryVerification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAEtF,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAGD,eAAO,MAAM,uBAAuB,qBAKpB,UAAU,sBACF,eAAe,EAAE,eACxB,OAAO,KACnB,aAAa,GAAG,IAiEpB,CAAC"}
|
|
@@ -21,7 +21,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
|
|
|
21
21
|
productGroups?: SelectItem[];
|
|
22
22
|
relyOnPeopleType?: RelyOnPeopleType | null;
|
|
23
23
|
fieldSetId?: number;
|
|
24
|
-
steps
|
|
24
|
+
steps: Step[];
|
|
25
25
|
emailTemplates?: TemplateItem[];
|
|
26
26
|
smsTemplates?: TemplateItem[];
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":";AAKA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAehC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,
|
|
1
|
+
{"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":";AAKA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAehC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,GAAU,EACV,SAAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,4BAAoC,GACrC,EAAE,sBAAsB,eA6RxB"}
|
|
@@ -15,7 +15,7 @@ export interface WithId {
|
|
|
15
15
|
id: number;
|
|
16
16
|
}
|
|
17
17
|
export interface ProductSetFormValues extends FormValues, WithId, ProductSetControlValues {
|
|
18
|
-
steps
|
|
18
|
+
steps: Step[];
|
|
19
19
|
}
|
|
20
20
|
export interface ProductSetFormProps extends WithIsLoading, ProductSetControlShared {
|
|
21
21
|
companyName: string;
|
|
@@ -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;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,
|
|
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,EAAE,IAAI,EAAE,CAAC;CACf;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,eAqIrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportRunnerModal.d.ts","sourceRoot":"","sources":["../../../src/report/ReportRunnerModal/ReportRunnerModal.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ReportRunnerModal.d.ts","sourceRoot":"","sources":["../../../src/report/ReportRunnerModal/ReportRunnerModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAKL,MAAM,EAEN,UAAU,EACX,MAAM,uCAAuC,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAG9F,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,mBAAmB,EAAE,CACnB,UAAU,CAAC,EAAE,UAAU,KACpB,uBAAuB,CAAC,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAClC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC3B,CAAC;AASF,eAAO,MAAM,iBAAiB,0FAS3B,sBAAsB,gBAmKxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),r=require("react"),a=(e=r)&&"object"==typeof e&&"default"in e?e.default:e;require("../../static/loader/LoaderIndicator.js");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),r=require("react"),a=(e=r)&&"object"==typeof e&&"default"in e?e.default:e;require("../../static/loader/LoaderIndicator.js");var o=require("../../static/loader/BlockLoader.js"),n=require("react-i18next"),i=require("react-bootstrap"),l=require("react-hook-form");require("../../static/loader/ButtonLoader.js"),require("../../static/loader/SnippetLoader.js"),require("../../static/loader/PaymentLoader.js");var d,s=require("lodash"),c=require("@licklist/core/dist/DataMapper/Report"),u=require("@licklist/plugins/dist/utils/report"),m=((d={})[c.PERIOD_BY_CREATION_DATE]="Design:reportPeriodByCreationDate",d[c.PERIOD_BY_BOOKING_DATE]="Design:reportPeriodByBookingDate",d);exports.ReportRunnerModal=function(e){var r,d,p=e.reportId,v=e.show,E=e.onHide,g=e.useShowReportFields,_=e.reports,f=e.generate,y=e.download,F=e.onEdit,b=n.useTranslation(["App","Design"]).t,D=null==_?void 0:_.find((function(e){return e.id===p})),q=g(null==D?void 0:D.type),B=q.data,k=void 0===B?[]:B,I=q.isLoading,h=l.useForm({mode:"onChange"}),C=h.handleSubmit,w=h.register,L=h.formState.errors,R=h.reset,T=(0,h.watch)("dateFrom"),N=C((function(e){y.execute(t.__assign(t.__assign({},e),{reportId:p,type:null==D?void 0:D.type}))})),O=C((function(e){return t.__awaiter(void 0,void 0,void 0,(function(){var r;return t.__generator(this,(function(a){switch(a.label){case 0:return[4,f.execute(t.__assign(t.__assign({},e),{reportId:p}))];case 1:return r=a.sent(),D&&r&&!f.isError?(u.openOnlineViewer({type:D.type,dateFrom:e.dateFrom,dateTo:e.dateTo,data:r}),[2]):[2]}}))}))})),P=function(){R(),E()},j=f.isLoading||y.isLoading||I;return a.createElement(i.Modal,{show:v,onHide:P,className:"report-runner-modal",centered:!0},a.createElement("header",null,a.createElement("h5",null,b("generateReport")),a.createElement(i.Button,{variant:"","data-testid":"cancel-button",onClick:P},b("cancel"))),j&&a.createElement(o.BlockLoader,null),!j&&a.createElement("div",null,a.createElement("div",{className:"report-type-label"},s.capitalize(null==D?void 0:D.type)),a.createElement("div",null,null==D?void 0:D.name),a.createElement("div",{className:"data-fields"},null==D?void 0:D.reportFieldValues.map((function(e){var t=null==k?void 0:k.find((function(t){return t.id===e.reportFieldId}));return t?a.createElement("span",{key:e.id},t.title):null}))),a.createElement(i.Button,{className:"edit-button",type:"button",variant:"","data-testid":"edit-button",onClick:F},b("Design:edit")),a.createElement("form",{noValidate:!0},a.createElement("div",{className:"period-by"},c.PERIOD_BY_TYPES.map((function(e){var r;return a.createElement("div",{key:e},a.createElement(i.Form.Group,null,a.createElement(i.Form.Check,t.__assign({inline:!0,isInvalid:!!L.periodBy,label:b(m[e]),type:"radio",id:e,value:e},w("periodBy"))),a.createElement(i.Form.Control.Feedback,{type:"invalid"},null===(r=L.periodBy)||void 0===r?void 0:r.message)))}))),a.createElement("div",{className:"controls"},a.createElement(i.Form.Group,{controlId:"from-input"},a.createElement(i.Form.Label,null,b("Design:from")),a.createElement(i.Form.Control,t.__assign({type:"datetime-local","data-testid":"date-from-input",isInvalid:!!L.dateFrom},w("dateFrom",{required:{value:!0,message:"".concat(b("Validation:fieldRequired",{attribute:b("Design:to")}))}}))),a.createElement(i.Form.Control.Feedback,{type:"invalid"},null===(r=L.dateFrom)||void 0===r?void 0:r.message)),a.createElement(i.Form.Group,{controlId:"to-input"},a.createElement(i.Form.Label,null,b("Design:to")),a.createElement(i.Form.Control,t.__assign({type:"datetime-local","data-testid":"date-to-input",isInvalid:!!L.dateTo},w("dateTo",{required:"".concat(b("Validation:fieldRequired",{attribute:b("Design:to")})),validate:function(e){return!T||(e>T||b("toDateAfterFrom"))}}))),a.createElement(i.Form.Control.Feedback,{type:"invalid"},null===(d=L.dateTo)||void 0===d?void 0:d.message))),a.createElement("div",{className:"controls"},a.createElement(i.Button,{"data-testid":"download-button",onClick:N},b("generateDownload")),a.createElement(i.Button,{"data-testid":"view-button",onClick:O},b("generateView"))))))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultCard.d.ts","sourceRoot":"","sources":["../../../../../src/sales/booking/results/components/ResultCard.tsx"],"names":[],"mappings":";AAKA,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"ResultCard.d.ts","sourceRoot":"","sources":["../../../../../src/sales/booking/results/components/ResultCard.tsx"],"names":[],"mappings":";AAKA,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oDAAoD,CAAC;AAO1E,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,UAAU,oDAKpB,eAAe,gBA2FjB,CAAC"}
|
|
@@ -1,95 +1,101 @@
|
|
|
1
1
|
.report-runner-modal {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
max-width: 45rem;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.modal-content {
|
|
2
|
+
.modal-dialog {
|
|
3
|
+
@include media-breakpoint-up(sm) {
|
|
9
4
|
max-width: 45rem;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
font-size: 0.875rem;
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
color: #0e8ce2;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.data-fields {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-wrap: wrap;
|
|
38
|
-
|
|
39
|
-
span {
|
|
40
|
-
position: relative;
|
|
41
|
-
font-size: 0.875rem;
|
|
42
|
-
font-weight: 500;
|
|
43
|
-
|
|
44
|
-
&:after {
|
|
45
|
-
content: "|";
|
|
46
|
-
margin: 0 0.25rem;
|
|
47
|
-
color: #dcdcdc;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:last-child:after {
|
|
51
|
-
display: none;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.modal-content {
|
|
9
|
+
max-width: 45rem;
|
|
10
|
+
margin: 0 auto;
|
|
11
|
+
padding: 1.25rem 1.5rem;
|
|
12
|
+
|
|
13
|
+
header {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
margin-bottom: 1rem;
|
|
18
|
+
border-bottom: 2px solid #dcdcdc;
|
|
19
|
+
|
|
20
|
+
h5 {
|
|
21
|
+
margin-bottom: 0;
|
|
22
|
+
font-size: 1.125rem;
|
|
23
|
+
font-weight: 500;
|
|
54
24
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
padding: 0;
|
|
25
|
+
|
|
26
|
+
button {
|
|
27
|
+
padding-top: 0.5rem;
|
|
28
|
+
padding-bottom: 0.5rem;
|
|
58
29
|
font-size: 0.875rem;
|
|
59
30
|
font-weight: 600;
|
|
60
31
|
color: #0e8ce2;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.data-fields {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
|
|
39
|
+
span {
|
|
40
|
+
position: relative;
|
|
41
|
+
font-size: 0.875rem;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
|
|
44
|
+
&:after {
|
|
45
|
+
content: "|";
|
|
46
|
+
margin: 0 0.25rem;
|
|
47
|
+
color: #dcdcdc;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:last-child:after {
|
|
51
|
+
display: none;
|
|
65
52
|
}
|
|
66
53
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.edit-button {
|
|
57
|
+
padding: 0;
|
|
58
|
+
font-size: 0.875rem;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
color: #0e8ce2;
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
|
|
63
|
+
&:focus {
|
|
64
|
+
box-shadow: none;
|
|
70
65
|
}
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
input {
|
|
69
|
+
border-radius: 0.5rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
form {
|
|
73
|
+
margin-top: 1.25rem;
|
|
74
|
+
|
|
75
|
+
.period-by {
|
|
76
|
+
display: flex;
|
|
77
|
+
gap: 2rem;
|
|
73
78
|
margin-top: 1.25rem;
|
|
74
|
-
|
|
75
|
-
.controls {
|
|
76
|
-
display: flex;
|
|
77
|
-
gap: 2rem;
|
|
78
|
-
align-items: flex-start;
|
|
79
|
-
flex-wrap: wrap;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.form-group {
|
|
83
|
-
flex: 1;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
button[type="submit"] {
|
|
87
|
-
white-space: nowrap;
|
|
88
|
-
}
|
|
89
79
|
}
|
|
90
|
-
|
|
91
|
-
.
|
|
92
|
-
|
|
80
|
+
|
|
81
|
+
.controls {
|
|
82
|
+
display: flex;
|
|
83
|
+
gap: 2rem;
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
flex-wrap: wrap;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.form-group {
|
|
89
|
+
flex: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
button[type="submit"] {
|
|
93
|
+
white-space: nowrap;
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
+
|
|
97
|
+
.loader {
|
|
98
|
+
height: 10rem;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.3-dev.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@fortawesome/free-brands-svg-icons": "5.15.2",
|
|
54
54
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
55
55
|
"@fortawesome/react-fontawesome": "0.1.9",
|
|
56
|
-
"@licklist/core": "
|
|
56
|
+
"@licklist/core": ">=0.22.1-dev.3 < 0.22.1",
|
|
57
57
|
"@licklist/eslint-config": "0.3.4",
|
|
58
|
-
"@licklist/plugins": "
|
|
58
|
+
"@licklist/plugins": ">=0.27.1-dev.0 < 0.27.1",
|
|
59
59
|
"@mdx-js/react": "1.6.22",
|
|
60
60
|
"@popperjs/core": "2.11.8",
|
|
61
61
|
"@react-aria/utils": "3.9.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useState } from "react";
|
|
1
|
+
import React, { useContext, useEffect, useState } from "react";
|
|
2
2
|
import Row from "react-bootstrap/Row";
|
|
3
3
|
import Col from "react-bootstrap/Col";
|
|
4
4
|
import { Trans, useTranslation } from "react-i18next";
|
|
@@ -90,6 +90,14 @@ const LoginComponent = ({
|
|
|
90
90
|
RouteService.redirectTo("/");
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (!user.profile || !auth.secrets) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
RouteService.redirectTo("/");
|
|
99
|
+
}, [user.profile, auth.secrets]);
|
|
100
|
+
|
|
93
101
|
return (
|
|
94
102
|
<Router>
|
|
95
103
|
<Row className="justify-content-center">
|
|
@@ -2,7 +2,6 @@ import React, { useEffect, useMemo } from "react";
|
|
|
2
2
|
import { Button, Form } from "react-bootstrap";
|
|
3
3
|
import { FormProvider, useForm } from "react-hook-form";
|
|
4
4
|
import { isEqual } from "lodash";
|
|
5
|
-
|
|
6
5
|
import { useParams } from "react-router-dom";
|
|
7
6
|
import { useEventEditProductSetContext } from "@licklist/plugins/dist/context/event/EventEditProductSetContext";
|
|
8
7
|
import { useTranslation } from "react-i18next";
|
|
@@ -29,22 +29,22 @@ export const getDefaultValues = (
|
|
|
29
29
|
steps:
|
|
30
30
|
productSet?.steps?.map(({ productCategories, ...step }) => ({
|
|
31
31
|
...step,
|
|
32
|
-
productCategories:
|
|
33
|
-
({ products, ...productCategory }) => ({
|
|
32
|
+
productCategories:
|
|
33
|
+
productCategories?.map(({ products, ...productCategory }) => ({
|
|
34
34
|
...productCategory,
|
|
35
|
-
products:
|
|
36
|
-
...product
|
|
37
|
-
|
|
38
|
-
...subProducts
|
|
35
|
+
products:
|
|
36
|
+
products?.map(({ zoneId, subProducts, ...product }) => ({
|
|
37
|
+
...product,
|
|
38
|
+
subProducts: subProducts?.map(({ zoneId, ...subProducts }) => ({
|
|
39
|
+
...subProducts,
|
|
40
|
+
productCategoryId: undefined,
|
|
41
|
+
zoneId,
|
|
42
|
+
})),
|
|
39
43
|
productCategoryId: undefined,
|
|
40
|
-
zoneId
|
|
41
|
-
})),
|
|
42
|
-
|
|
43
|
-
zoneId: zoneId as number,
|
|
44
|
-
})),
|
|
45
|
-
})
|
|
46
|
-
),
|
|
44
|
+
zoneId,
|
|
45
|
+
})) ?? [],
|
|
46
|
+
})) ?? [],
|
|
47
47
|
venueMapSetId: step?.venueMapSet ? step?.venueMapSet?.id : null,
|
|
48
|
-
})) ??
|
|
48
|
+
})) ?? [],
|
|
49
49
|
menuRecurrences: hasNoRecurrences ? [] : productSet?.menuRecurrences ?? [],
|
|
50
50
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ProductCategory } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
2
1
|
import { Currency } from "@licklist/core/dist/Config";
|
|
3
2
|
import { useIntl } from "react-intl";
|
|
4
3
|
import { useTranslation } from "react-i18next";
|
|
5
4
|
import { OrderItems } from "@licklist/plugins/dist/types/context/Iframe/orderItems";
|
|
5
|
+
import { ProductCategory } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
6
6
|
|
|
7
7
|
interface CategoryError {
|
|
8
8
|
message: string;
|
|
@@ -15,14 +15,16 @@ export const useCategoryVerification = () => {
|
|
|
15
15
|
const { formatNumber } = useIntl();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
|
|
18
|
+
orderItems: OrderItems,
|
|
19
19
|
productCategories?: ProductCategory[],
|
|
20
20
|
isLastPage?: boolean
|
|
21
21
|
): CategoryError | void => {
|
|
22
22
|
let errorMessage: { id?: number; message: string } | void;
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
const productArray = Object.values(orderItems).filter(
|
|
24
25
|
(product) => product?.quantity > 0
|
|
25
26
|
);
|
|
27
|
+
|
|
26
28
|
const sumOfMinSpends = productCategories.reduce((acc, productCategory) => {
|
|
27
29
|
const { products } = productCategory;
|
|
28
30
|
const selectedProducts = products.filter((product) =>
|
|
@@ -61,7 +61,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
|
|
|
61
61
|
productGroups?: SelectItem[];
|
|
62
62
|
relyOnPeopleType?: RelyOnPeopleType | null;
|
|
63
63
|
fieldSetId?: number;
|
|
64
|
-
steps
|
|
64
|
+
steps: Step[];
|
|
65
65
|
emailTemplates?: TemplateItem[];
|
|
66
66
|
smsTemplates?: TemplateItem[];
|
|
67
67
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
GenerateReportBody,
|
|
3
|
+
PERIOD_BY_BOOKING_DATE,
|
|
4
|
+
PERIOD_BY_CREATION_DATE,
|
|
5
|
+
PERIOD_BY_TYPES,
|
|
6
|
+
Report,
|
|
7
|
+
ReportPeriodBy,
|
|
8
|
+
ReportType,
|
|
9
|
+
} from "@licklist/core/dist/DataMapper/Report";
|
|
2
10
|
import { capitalize } from "lodash";
|
|
3
11
|
import React from "react";
|
|
4
12
|
import { Button, Form, Modal } from "react-bootstrap";
|
|
@@ -28,9 +36,11 @@ type ReportRunnerModalProps = {
|
|
|
28
36
|
reports?: Report[] | null;
|
|
29
37
|
};
|
|
30
38
|
|
|
31
|
-
type FormValues =
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
type FormValues = Pick<GenerateReportBody, "dateFrom" | "dateTo" | "periodBy">;
|
|
40
|
+
|
|
41
|
+
const labelByPeriodType: Record<ReportPeriodBy, string> = {
|
|
42
|
+
[PERIOD_BY_CREATION_DATE]: "Design:reportPeriodByCreationDate",
|
|
43
|
+
[PERIOD_BY_BOOKING_DATE]: "Design:reportPeriodByBookingDate",
|
|
34
44
|
};
|
|
35
45
|
|
|
36
46
|
export const ReportRunnerModal = ({
|
|
@@ -126,6 +136,27 @@ export const ReportRunnerModal = ({
|
|
|
126
136
|
</Button>
|
|
127
137
|
|
|
128
138
|
<form noValidate>
|
|
139
|
+
<div className="period-by">
|
|
140
|
+
{PERIOD_BY_TYPES.map((type) => (
|
|
141
|
+
<div key={type}>
|
|
142
|
+
<Form.Group>
|
|
143
|
+
<Form.Check
|
|
144
|
+
inline
|
|
145
|
+
isInvalid={!!errors.periodBy}
|
|
146
|
+
label={t(labelByPeriodType[type])}
|
|
147
|
+
type="radio"
|
|
148
|
+
id={type}
|
|
149
|
+
value={type}
|
|
150
|
+
{...register("periodBy")}
|
|
151
|
+
/>
|
|
152
|
+
<Form.Control.Feedback type="invalid">
|
|
153
|
+
{errors.periodBy?.message}
|
|
154
|
+
</Form.Control.Feedback>
|
|
155
|
+
</Form.Group>
|
|
156
|
+
</div>
|
|
157
|
+
))}
|
|
158
|
+
</div>
|
|
159
|
+
|
|
129
160
|
<div className="controls">
|
|
130
161
|
<Form.Group controlId="from-input">
|
|
131
162
|
<Form.Label>{t("Design:from")}</Form.Label>
|
|
@@ -12,7 +12,6 @@ import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
|
12
12
|
import * as Config from "@licklist/core/dist/Config";
|
|
13
13
|
import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
|
|
14
14
|
import { getOrderSourceTitle } from "@licklist/plugins/dist/utils/sourceTitle";
|
|
15
|
-
|
|
16
15
|
import Icon from "../../../../static/Icon";
|
|
17
16
|
|
|
18
17
|
export type ResultCardProps = {
|
|
@@ -22,8 +21,6 @@ export type ResultCardProps = {
|
|
|
22
21
|
onCardClick?: (id: number) => void;
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
// @TODO integrate when API will be available
|
|
26
|
-
// activity and staff keys
|
|
27
24
|
export const ResultCard = ({
|
|
28
25
|
order,
|
|
29
26
|
className,
|
|
@@ -23,7 +23,7 @@ export function BooleanSwitch({
|
|
|
23
23
|
const { t } = useTranslation("Design");
|
|
24
24
|
|
|
25
25
|
const options: SelectItem[] = [
|
|
26
|
-
{ id: 1, value: firstValueTitle ??
|
|
26
|
+
{ id: 1, value: firstValueTitle ?? t("yes") },
|
|
27
27
|
{ id: 0, value: secondValueTitle ?? t("no") },
|
|
28
28
|
];
|
|
29
29
|
|
|
@@ -1,95 +1,101 @@
|
|
|
1
1
|
.report-runner-modal {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
max-width: 45rem;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.modal-content {
|
|
2
|
+
.modal-dialog {
|
|
3
|
+
@include media-breakpoint-up(sm) {
|
|
9
4
|
max-width: 45rem;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
font-size: 0.875rem;
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
color: #0e8ce2;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.data-fields {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-wrap: wrap;
|
|
38
|
-
|
|
39
|
-
span {
|
|
40
|
-
position: relative;
|
|
41
|
-
font-size: 0.875rem;
|
|
42
|
-
font-weight: 500;
|
|
43
|
-
|
|
44
|
-
&:after {
|
|
45
|
-
content: "|";
|
|
46
|
-
margin: 0 0.25rem;
|
|
47
|
-
color: #dcdcdc;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:last-child:after {
|
|
51
|
-
display: none;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.modal-content {
|
|
9
|
+
max-width: 45rem;
|
|
10
|
+
margin: 0 auto;
|
|
11
|
+
padding: 1.25rem 1.5rem;
|
|
12
|
+
|
|
13
|
+
header {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
margin-bottom: 1rem;
|
|
18
|
+
border-bottom: 2px solid #dcdcdc;
|
|
19
|
+
|
|
20
|
+
h5 {
|
|
21
|
+
margin-bottom: 0;
|
|
22
|
+
font-size: 1.125rem;
|
|
23
|
+
font-weight: 500;
|
|
54
24
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
padding: 0;
|
|
25
|
+
|
|
26
|
+
button {
|
|
27
|
+
padding-top: 0.5rem;
|
|
28
|
+
padding-bottom: 0.5rem;
|
|
58
29
|
font-size: 0.875rem;
|
|
59
30
|
font-weight: 600;
|
|
60
31
|
color: #0e8ce2;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.data-fields {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
|
|
39
|
+
span {
|
|
40
|
+
position: relative;
|
|
41
|
+
font-size: 0.875rem;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
|
|
44
|
+
&:after {
|
|
45
|
+
content: "|";
|
|
46
|
+
margin: 0 0.25rem;
|
|
47
|
+
color: #dcdcdc;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:last-child:after {
|
|
51
|
+
display: none;
|
|
65
52
|
}
|
|
66
53
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.edit-button {
|
|
57
|
+
padding: 0;
|
|
58
|
+
font-size: 0.875rem;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
color: #0e8ce2;
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
|
|
63
|
+
&:focus {
|
|
64
|
+
box-shadow: none;
|
|
70
65
|
}
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
input {
|
|
69
|
+
border-radius: 0.5rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
form {
|
|
73
|
+
margin-top: 1.25rem;
|
|
74
|
+
|
|
75
|
+
.period-by {
|
|
76
|
+
display: flex;
|
|
77
|
+
gap: 2rem;
|
|
73
78
|
margin-top: 1.25rem;
|
|
74
|
-
|
|
75
|
-
.controls {
|
|
76
|
-
display: flex;
|
|
77
|
-
gap: 2rem;
|
|
78
|
-
align-items: flex-start;
|
|
79
|
-
flex-wrap: wrap;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.form-group {
|
|
83
|
-
flex: 1;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
button[type="submit"] {
|
|
87
|
-
white-space: nowrap;
|
|
88
|
-
}
|
|
89
79
|
}
|
|
90
|
-
|
|
91
|
-
.
|
|
92
|
-
|
|
80
|
+
|
|
81
|
+
.controls {
|
|
82
|
+
display: flex;
|
|
83
|
+
gap: 2rem;
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
flex-wrap: wrap;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.form-group {
|
|
89
|
+
flex: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
button[type="submit"] {
|
|
93
|
+
white-space: nowrap;
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
+
|
|
97
|
+
.loader {
|
|
98
|
+
height: 10rem;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|