@licklist/design 0.59.0-dev.0 → 0.59.0-dev.1

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
- "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"),n=require("react"),a=e(n),r=require("react-i18next"),l=require("react-bootstrap"),o=require("react-hook-form"),c=e(require("@licklist/plugins/dist/services/Form/HookFormService")),m=require("@react-aria/utils"),i=require("../../static/switch/Switch.js"),u=require("../../static/switch/BooleanSwitch.js"),s=require("../../assets/dashboard/increment.svg.js");require("../../static/index.js");var d=require("../form/context.js"),E=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),p=[E.CATEGORY_TYPE_TICKETS,E.CATEGORY_TYPE_FIXED_DURATION,E.CATEGORY_TYPE_GAME];exports.ProductCategoryControl=function(e){var v,I,C,b,f=e.isLoading,g=e.categoryName,h=e.onCategoryNameChange,F=e.productCategoryIndex,y=e.stepIndex,x=e.isOverride,T=void 0!==x&&x,G=o.useFormContext(),k=G.control,N=G.formState.errors,S=G.register,w=G.clearErrors,_=G.setValue,q=G.getValues,R=G.watch,A=G.trigger,P=r.useTranslation("Design").t,D=t.__read(n.useState(!1),2),L=D[0],V=D[1],Y="steps.".concat(y,".productCategories.").concat(F),O=o.useWatch({name:Y}),B=R("".concat(Y,".maxSubItems"))||0,M=R("".concat(Y,".minSubItems"))||0,Q=R("".concat(Y,".allowDeposits")),j=p.includes(O.type),z=null===(b=null===(C=null===(I=null===(v=null==N?void 0:N.steps)||void 0===v?void 0:v[y])||void 0===I?void 0:I.productCategories)||void 0===C?void 0:C[F])||void 0===b?void 0:b.products,U=m.useId(),H=m.useId(),K=m.useId(),X=m.useId(),W=m.useId(),J=m.useId(),Z=m.useId(),$=m.useId(),ee=m.useId(),te=m.useId(),ne=m.useId(),ae=m.useId(),re=n.useContext(d.ProductSetLoadingContext),le=re.providerHasBookingManagement,oe=re.zones,ce=void 0===oe?[]:oe,me=n.useCallback((function(){return V((function(e){return!e}))}),[]);n.useEffect((function(){A("".concat(Y,".maxSubItems"))}),[M,Y]),n.useEffect((function(){A("".concat(Y,".minSubItems"))}),[B,Y]);var ie=O.type===E.CATEGORY_TYPE_FIXED_DURATION||O.type===E.CATEGORY_TYPE_GAME;return a.createElement(a.Fragment,null,a.createElement(l.Col,{md:12,xl:!0,className:"p-0"},a.createElement(l.Form.Group,{controlId:H},a.createElement(l.Form.Label,null,P("nameOfTheCategory")),a.createElement(l.Form.Control,t.__assign({},S("".concat(Y,".name"),{required:P("Validation:fieldRequired",{attribute:P("name")}),validate:function(){return(null==z?void 0:z.type)===c.manualErrorType&&w("".concat(Y,".products")),!0}}),{value:g,onChange:h,isInvalid:c.isInvalid("".concat(Y,".name"),N),placeholder:P("name"),disabled:f||T})),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".name"),N))),a.createElement(l.Form.Group,{controlId:W},a.createElement(o.Controller,{control:k,name:"".concat(Y,".quantityType"),render:function(e){var t=e.field;return a.createElement(l.Form.Group,{className:"d-flex flex-column flex-grow-1 align-items-start"},a.createElement(l.Form.Label,null,P("quantityType")),a.createElement(i.Switch,{name:t.name,options:E.QUANTITY_TYPES.map((function(e){return{key:e,id:e,value:P(e)}})),value:t.value,onChange:t.onChange,disabled:f||T}))}})),a.createElement(l.Row,null,a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:K},a.createElement(l.Form.Label,null,P("minItems")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(q("".concat(Y,".minSubItems"))||0);_("".concat(Y,".minSubItems"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",min:0,step:1,value:null===n?"":n,onChange:r,isInvalid:c.isInvalid("".concat(Y,".minSubItems"),N),disabled:f||T,name:o})},control:k,name:"".concat(Y,".minSubItems"),rules:{min:{value:0,message:P("Validation:fieldMinNumber",{attribute:P("minItems"),min:0})},max:B?{value:Number(B),message:P("Validation:fieldMaxNumber",{attribute:P("minItems"),max:P("maxItems")})}:void 0}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".minSubItems"),N))))),a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:X},a.createElement(l.Form.Label,null,P("maxItems")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(q("".concat(Y,".maxSubItems"))||0);_("".concat(Y,".maxSubItems"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",step:1,name:o,value:null===n?"":n,onChange:r,isInvalid:c.isInvalid("".concat(Y,".maxSubItems"),N),disabled:f||T})},control:k,name:"".concat(Y,".maxSubItems"),rules:{min:{value:Number(M),message:P("Validation:fieldGreaterMinNumber",{attribute:P("maxItems"),min:P("minItems")})}}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".maxSubItems"),N)))))),ie&&a.createElement(a.Fragment,null,a.createElement(l.Row,null,a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:te},a.createElement(l.Form.Label,null,P("Design:overallQuantity")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(q("".concat(Y,".overallQuantity"))||0);_("".concat(Y,".overallQuantity"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{control:k,name:"".concat(Y,".overallQuantity"),render:function(e){var n=e.field;return a.createElement(l.Form.Control,t.__assign({min:0,step:1,type:"number",disabled:T,isInvalid:c.isInvalid("".concat(Y,".overallQuantity"),N)},n))},rules:{min:{value:0,message:P("Validation:fieldMinNumber",{attribute:P("overallQuantity"),min:0})}}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".overallQuantity"),N)))))),a.createElement(l.Row,null,a.createElement(l.Col,null,a.createElement(l.Form.Group,{controlId:ee},a.createElement(l.Form.Label,null,P("Design:zone")),a.createElement(o.Controller,{control:k,name:"".concat(Y,".zoneId"),render:function(e){var n=e.field;return a.createElement(l.Form.Control,t.__assign({as:"select",disabled:T,isInvalid:c.isInvalid("".concat(Y,".zoneId"),N)},n),a.createElement("option",{value:null},P("Design:choose")),ce.map((function(e){return a.createElement("option",{key:e.id,value:e.id},e.name)})))},rules:{required:{value:le,message:P("Validation:fieldRequired",{attribute:P("zone")})}}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".zoneId"),N))))))),a.createElement(l.Col,{md:12,xl:!0,className:"p-0"},a.createElement(l.Form.Group,{controlId:U,className:"custom-checkbox"},a.createElement(l.Form.Check,{custom:!0,type:"checkbox",name:U,disabled:f,id:"check-api"},a.createElement(l.Form.Check.Input,{checked:L,onChange:me,disabled:T,type:"checkbox"}),a.createElement(l.Form.Check.Label,null,P("showAdvancedOptions")))),a.createElement(l.Collapse,{in:L},a.createElement("div",null,j&&a.createElement(l.Form.Group,{controlId:$,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,P("hasTicket")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:O.type===E.CATEGORY_TYPE_TICKETS})},control:k,name:"".concat(Y,".hasTicket")}))),O.hasTicket&&a.createElement(l.Form.Group,{controlId:Z,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,P("collectUserInfo")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:f||T})},control:k,name:"".concat(Y,".collectUserInfo")}))),!O.hasTicket&&a.createElement(l.Form.Group,{controlId:J,className:"advanced-switch-container"},a.createElement(a.Fragment,null,a.createElement(l.Form.Label,null,P("isTimeRelated")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:f||T})},control:k,name:"".concat(Y,".isTimeRelated")})))),a.createElement(l.Form.Group,{controlId:ne,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,P("allowDeposits")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:f||T})},control:k,name:"".concat(Y,".allowDeposits")}))),Q&&a.createElement(l.Form.Group,{controlId:ae,className:"deposit-days"},a.createElement(l.Form.Label,null,P("depositDays")),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",min:0,step:1,value:n,onChange:r,isInvalid:c.isInvalid("".concat(Y,".remainderExpireAfter"),N),disabled:f||T,name:o})},control:k,name:"".concat(Y,".remainderExpireAfter")}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".remainderExpireAfter"),N)))))))};
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"),n=require("react"),a=e(n),r=require("react-i18next"),l=require("react-bootstrap"),o=require("react-hook-form"),c=e(require("@licklist/plugins/dist/services/Form/HookFormService")),m=require("@react-aria/utils"),i=require("../../static/switch/Switch.js"),u=require("../../static/switch/BooleanSwitch.js"),s=require("../../assets/dashboard/increment.svg.js");require("../../static/index.js");var d=require("../form/context.js"),E=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),p=[E.CATEGORY_TYPE_TICKETS,E.CATEGORY_TYPE_FIXED_DURATION,E.CATEGORY_TYPE_GAME];exports.ProductCategoryControl=function(e){var v,I,C,b,f=e.isLoading,g=e.categoryName,h=e.onCategoryNameChange,F=e.productCategoryIndex,y=e.stepIndex,x=e.isOverride,T=void 0!==x&&x,G=o.useFormContext(),k=G.control,N=G.formState.errors,S=G.register,w=G.clearErrors,_=G.setValue,q=G.getValues,R=G.watch,A=G.trigger,P=r.useTranslation("Design").t,D=t.__read(n.useState(!1),2),L=D[0],V=D[1],Y="steps.".concat(y,".productCategories.").concat(F),O=o.useWatch({name:Y}),B=R("".concat(Y,".maxSubItems"))||0,M=R("".concat(Y,".minSubItems"))||0,Q=R("".concat(Y,".allowDeposits")),j=p.includes(O.type),z=null===(b=null===(C=null===(I=null===(v=null==N?void 0:N.steps)||void 0===v?void 0:v[y])||void 0===I?void 0:I.productCategories)||void 0===C?void 0:C[F])||void 0===b?void 0:b.products,U=m.useId(),H=m.useId(),K=m.useId(),X=m.useId(),W=m.useId(),J=m.useId(),Z=m.useId(),$=m.useId(),ee=m.useId(),te=m.useId(),ne=m.useId(),ae=m.useId(),re=n.useContext(d.ProductSetLoadingContext),le=re.providerHasBookingManagement,oe=re.zones,ce=void 0===oe?[]:oe,me=n.useCallback((function(){return V((function(e){return!e}))}),[]);n.useEffect((function(){A("".concat(Y,".maxSubItems"))}),[M,Y]),n.useEffect((function(){A("".concat(Y,".minSubItems"))}),[B,Y]);var ie=O.type===E.CATEGORY_TYPE_FIXED_DURATION||O.type===E.CATEGORY_TYPE_GAME;return a.createElement(a.Fragment,null,a.createElement(l.Col,{md:12,xl:!0,className:"p-0"},a.createElement(l.Form.Group,{controlId:H},a.createElement(l.Form.Label,null,P("nameOfTheCategory")),a.createElement(l.Form.Control,t.__assign({},S("".concat(Y,".name"),{required:P("Validation:fieldRequired",{attribute:P("name")}),validate:function(){return(null==z?void 0:z.type)===c.manualErrorType&&w("".concat(Y,".products")),!0}}),{value:g,onChange:h,isInvalid:c.isInvalid("".concat(Y,".name"),N),placeholder:P("name"),disabled:f||T})),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".name"),N))),a.createElement(l.Form.Group,{controlId:W},a.createElement(o.Controller,{control:k,name:"".concat(Y,".quantityType"),render:function(e){var t=e.field;return a.createElement(l.Form.Group,{className:"d-flex flex-column flex-grow-1 align-items-start"},a.createElement(l.Form.Label,null,P("quantityType")),a.createElement(i.Switch,{name:t.name,options:E.QUANTITY_TYPES.map((function(e){return{key:e,id:e,value:P(e)}})),value:t.value,onChange:t.onChange,disabled:f||T}))}})),a.createElement(l.Row,null,a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:K},a.createElement(l.Form.Label,null,P("minItems")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(q("".concat(Y,".minSubItems"))||0);_("".concat(Y,".minSubItems"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",min:0,step:1,value:null===n?"":n,onChange:r,isInvalid:c.isInvalid("".concat(Y,".minSubItems"),N),disabled:f||T,name:o})},control:k,name:"".concat(Y,".minSubItems"),rules:{min:{value:0,message:P("Validation:fieldMinNumber",{attribute:P("minItems"),min:0})},max:B?{value:Number(B),message:P("Validation:fieldMaxNumber",{attribute:P("minItems"),max:P("maxItems")})}:void 0}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".minSubItems"),N))))),a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:X},a.createElement(l.Form.Label,null,P("maxItems")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(q("".concat(Y,".maxSubItems"))||0);_("".concat(Y,".maxSubItems"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",step:1,name:o,value:null===n?"":n,onChange:r,isInvalid:c.isInvalid("".concat(Y,".maxSubItems"),N),disabled:f||T})},control:k,name:"".concat(Y,".maxSubItems"),rules:{min:{value:Number(M),message:P("Validation:fieldGreaterMinNumber",{attribute:P("maxItems"),min:P("minItems")})}}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".maxSubItems"),N)))))),a.createElement(l.Row,null,a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:te},a.createElement(l.Form.Label,null,P("Design:overallQuantity")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(q("".concat(Y,".overallQuantity"))||0);_("".concat(Y,".overallQuantity"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{control:k,name:"".concat(Y,".overallQuantity"),render:function(e){var n=e.field;return a.createElement(l.Form.Control,t.__assign({min:0,step:1,type:"number",disabled:T,isInvalid:c.isInvalid("".concat(Y,".overallQuantity"),N)},n))},rules:{min:{value:0,message:P("Validation:fieldMinNumber",{attribute:P("overallQuantity"),min:0})}}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".overallQuantity"),N)))))),ie&&a.createElement(a.Fragment,null,a.createElement(l.Row,null,a.createElement(l.Col,null,a.createElement(l.Form.Group,{controlId:ee},a.createElement(l.Form.Label,null,P("Design:zone")),a.createElement(o.Controller,{control:k,name:"".concat(Y,".zoneId"),render:function(e){var n=e.field;return a.createElement(l.Form.Control,t.__assign({as:"select",disabled:T,isInvalid:c.isInvalid("".concat(Y,".zoneId"),N)},n),a.createElement("option",{value:null},P("Design:choose")),ce.map((function(e){return a.createElement("option",{key:e.id,value:e.id},e.name)})))},rules:{required:{value:le,message:P("Validation:fieldRequired",{attribute:P("zone")})}}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".zoneId"),N))))))),a.createElement(l.Col,{md:12,xl:!0,className:"p-0"},a.createElement(l.Form.Group,{controlId:U,className:"custom-checkbox"},a.createElement(l.Form.Check,{custom:!0,type:"checkbox",name:U,disabled:f,id:"check-api"},a.createElement(l.Form.Check.Input,{checked:L,onChange:me,disabled:T,type:"checkbox"}),a.createElement(l.Form.Check.Label,null,P("showAdvancedOptions")))),a.createElement(l.Collapse,{in:L},a.createElement("div",null,j&&a.createElement(l.Form.Group,{controlId:$,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,P("hasTicket")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:O.type===E.CATEGORY_TYPE_TICKETS})},control:k,name:"".concat(Y,".hasTicket")}))),O.hasTicket&&a.createElement(l.Form.Group,{controlId:Z,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,P("collectUserInfo")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:f||T})},control:k,name:"".concat(Y,".collectUserInfo")}))),!O.hasTicket&&a.createElement(l.Form.Group,{controlId:J,className:"advanced-switch-container"},a.createElement(a.Fragment,null,a.createElement(l.Form.Label,null,P("isTimeRelated")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:f||T})},control:k,name:"".concat(Y,".isTimeRelated")})))),a.createElement(l.Form.Group,{controlId:ne,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,P("allowDeposits")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:f||T})},control:k,name:"".concat(Y,".allowDeposits")}))),Q&&a.createElement(l.Form.Group,{controlId:ae,className:"deposit-days"},a.createElement(l.Form.Label,null,P("depositDays")),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",min:0,step:1,value:n,onChange:r,isInvalid:c.isInvalid("".concat(Y,".remainderExpireAfter"),N),disabled:f||T,name:o})},control:k,name:"".concat(Y,".remainderExpireAfter")}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(Y,".remainderExpireAfter"),N)))))))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.59.0-dev.0",
3
+ "version": "0.59.0-dev.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -103,7 +103,7 @@ export function ProductCategoryControl({
103
103
  const collectUserInfoId = useId();
104
104
  const hasTicketId = useId();
105
105
  const zoneId = useId();
106
- const overallCapacityId = useId();
106
+ const overallQuantityId = useId();
107
107
 
108
108
  const allowDepositsId = useId();
109
109
  const remainderExpireAfterId = useId();
@@ -329,67 +329,67 @@ export function ProductCategoryControl({
329
329
  </Form.Group>
330
330
  </Col>
331
331
  </Row>
332
-
333
- {isZoneCategory && (
334
- <>
335
- <Row>
336
- <Col md={6} sm={6} xs={6}>
337
- <Form.Group controlId={overallCapacityId}>
338
- <Form.Label>{t("Design:overallQuantity")}</Form.Label>
339
- <InputGroup hasValidation>
340
- <InputGroup.Prepend
341
- className="arrow-up-btn"
342
- onClick={() => {
343
- const currentOverallCapacity = Number(
344
- getValues(`${fieldNamePrefix}.overallQuantity`) || 0
345
- );
346
- setValue(
347
- `${fieldNamePrefix}.overallQuantity`,
348
- currentOverallCapacity + 1,
349
- { shouldValidate: true }
350
- );
351
- }}
352
- >
353
- <InputGroup.Text className="py-0 px-3">
354
- <IncrementIcon />
355
- </InputGroup.Text>
356
- </InputGroup.Prepend>
357
- <Controller
358
- control={control}
359
- name={`${fieldNamePrefix}.overallQuantity`}
360
- render={({ field }) => (
361
- <Form.Control
362
- min={0}
363
- step={1}
364
- type="number"
365
- disabled={isOverride}
366
- isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
367
- `${fieldNamePrefix}.overallQuantity`,
368
- errors
369
- )}
370
- {...field}
371
- />
372
- )}
373
- rules={{
374
- min: {
375
- value: 0,
376
- message: t("Validation:fieldMinNumber", {
377
- attribute: t("overallQuantity"),
378
- min: 0,
379
- }) as string,
380
- },
381
- }}
382
- />
383
- <Form.Control.Feedback type="invalid">
384
- {HookFormService.getErrors<ProductSetFormValues>(
332
+ <Row>
333
+ <Col md={6} sm={6} xs={6}>
334
+ <Form.Group controlId={overallQuantityId}>
335
+ <Form.Label>{t("Design:overallQuantity")}</Form.Label>
336
+ <InputGroup hasValidation>
337
+ <InputGroup.Prepend
338
+ className="arrow-up-btn"
339
+ onClick={() => {
340
+ const currentOverallCapacity = Number(
341
+ getValues(`${fieldNamePrefix}.overallQuantity`) || 0
342
+ );
343
+ setValue(
344
+ `${fieldNamePrefix}.overallQuantity`,
345
+ currentOverallCapacity + 1,
346
+ { shouldValidate: true }
347
+ );
348
+ }}
349
+ >
350
+ <InputGroup.Text className="py-0 px-3">
351
+ <IncrementIcon />
352
+ </InputGroup.Text>
353
+ </InputGroup.Prepend>
354
+ <Controller
355
+ control={control}
356
+ name={`${fieldNamePrefix}.overallQuantity`}
357
+ render={({ field }) => (
358
+ <Form.Control
359
+ min={0}
360
+ step={1}
361
+ type="number"
362
+ disabled={isOverride}
363
+ isInvalid={HookFormService.isInvalid<ProductSetFormValues>(
385
364
  `${fieldNamePrefix}.overallQuantity`,
386
365
  errors
387
366
  )}
388
- </Form.Control.Feedback>
389
- </InputGroup>
390
- </Form.Group>
391
- </Col>
392
- </Row>
367
+ {...field}
368
+ />
369
+ )}
370
+ rules={{
371
+ min: {
372
+ value: 0,
373
+ message: t("Validation:fieldMinNumber", {
374
+ attribute: t("overallQuantity"),
375
+ min: 0,
376
+ }) as string,
377
+ },
378
+ }}
379
+ />
380
+ <Form.Control.Feedback type="invalid">
381
+ {HookFormService.getErrors<ProductSetFormValues>(
382
+ `${fieldNamePrefix}.overallQuantity`,
383
+ errors
384
+ )}
385
+ </Form.Control.Feedback>
386
+ </InputGroup>
387
+ </Form.Group>
388
+ </Col>
389
+ </Row>
390
+
391
+ {isZoneCategory && (
392
+ <>
393
393
  <Row>
394
394
  <Col>
395
395
  <Form.Group controlId={zoneId}>