@bjsdistribution/dms-client-return 0.1.53-prod → 0.1.54-prod
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/dms-client-return.cjs.development.js +7 -12
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +7 -12
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-view/order-details/expanded-content/services-section/AssemblyType.tsx +9 -17
package/package.json
CHANGED
package/src/components/order-view/order-details/expanded-content/services-section/AssemblyType.tsx
CHANGED
|
@@ -12,11 +12,11 @@ function AssemblyType() {
|
|
|
12
12
|
const assemblyTypeOptions = orderStaticData?.order_service_list_category?.map(
|
|
13
13
|
(option: any) => ({
|
|
14
14
|
label: capitalize(option.type.replaceAll('_', ' ')),
|
|
15
|
-
value: option.type,
|
|
15
|
+
value: option.type.toLowerCase(),
|
|
16
16
|
})
|
|
17
17
|
);
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const newRadioGroupHandler = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
20
20
|
const newData: OrdersType = {
|
|
21
21
|
...orderData,
|
|
22
22
|
assembly_type: event.target.value,
|
|
@@ -24,30 +24,24 @@ function AssemblyType() {
|
|
|
24
24
|
setOrderData(newData);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const isServiceDisable = () =>
|
|
28
|
-
|
|
29
|
-
return true;
|
|
30
|
-
} else {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
27
|
+
const isServiceDisable = () =>
|
|
28
|
+
orderData?.assemble === false && orderData?.disassemble === false;
|
|
34
29
|
|
|
35
30
|
return (
|
|
36
31
|
<Container $isDisable={isServiceDisable()}>
|
|
37
32
|
<RadioButtonGroup
|
|
38
|
-
selectedValue={orderData?.assembly_type || ''}
|
|
33
|
+
selectedValue={orderData?.assembly_type?.toLowerCase() || ''}
|
|
39
34
|
heading="Assembly Type"
|
|
40
35
|
options={assemblyTypeOptions || []}
|
|
41
|
-
onChange={
|
|
36
|
+
onChange={newRadioGroupHandler}
|
|
42
37
|
required={false}
|
|
43
|
-
//@ts-ignore
|
|
44
38
|
isDisabled={true}
|
|
45
39
|
/>
|
|
46
40
|
</Container>
|
|
47
41
|
);
|
|
48
42
|
}
|
|
49
43
|
|
|
50
|
-
const Container = styled.div<{ $isDisable:
|
|
44
|
+
const Container = styled.div<{ $isDisable: boolean }>`
|
|
51
45
|
display: flex;
|
|
52
46
|
flex-direction: column;
|
|
53
47
|
gap: 6px;
|
|
@@ -56,10 +50,8 @@ const Container = styled.div<{ $isDisable: Boolean }>`
|
|
|
56
50
|
/* temporary change will add this in library */
|
|
57
51
|
> fieldset {
|
|
58
52
|
> div {
|
|
59
|
-
>
|
|
60
|
-
|
|
61
|
-
text-transform: capitalize;
|
|
62
|
-
}
|
|
53
|
+
> legend {
|
|
54
|
+
width: auto;
|
|
63
55
|
}
|
|
64
56
|
}
|
|
65
57
|
}
|