@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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.53-prod",
2
+ "version": "0.1.54-prod",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -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 radioGroupHandler = (event: React.ChangeEvent<HTMLInputElement>) => {
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
- if (orderData?.assemble === false && orderData?.disassemble === false) {
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={radioGroupHandler}
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: Boolean }>`
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
- > div {
60
- > label {
61
- text-transform: capitalize;
62
- }
53
+ > legend {
54
+ width: auto;
63
55
  }
64
56
  }
65
57
  }