contentoh-components-library 21.0.91 → 21.0.96

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,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.0.91",
3
+ "version": "21.0.96",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -60,7 +60,7 @@ export const InputFormatter = ({
60
60
  value = valueFormater(value);
61
61
 
62
62
  let idInput = inputId;
63
- let dataSave = updatedDescriptions.slice();
63
+ let dataSave = updatedDescriptions?.slice();
64
64
  if (dataSave.length > 0) {
65
65
  if (dataSave.filter((e) => e.attributeId === idInput).length > 0) {
66
66
  dataSave.forEach((e) => {
@@ -21,147 +21,62 @@ ProviderProductEditionDefault.args = {
21
21
  category: 846,
22
22
  version: 2,
23
23
  productSelected: {
24
- orderId: 7,
25
- id_category: "684",
26
- status: "RECEPTION",
27
- datasheet_status: null,
28
- prio: "none",
29
- version: 4,
30
- description_status: null,
31
- images_status: null,
32
- brand: null,
33
- missing: {
34
- datasheet: 33,
35
- descriptions: 14,
36
- images: 3,
37
- },
38
- article: {
39
- category: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
40
- company_name: "COMPANY DEV",
41
- id_category: "684",
42
- id_article: 33249,
43
- name: "Crema dental ",
44
- timestamp: "2022-06-14T23:24:08.000Z",
45
- upc: "232435",
46
- },
47
- retailers: [
48
- {
49
- id: 4,
50
- name: "Walmart Super y Superama",
51
- },
52
- {
53
- id: 9,
54
- name: "Amazon",
55
- },
56
- {
57
- id: 1013,
58
- name: "Cencosud Colombia",
59
- },
60
- {
61
- id: 2005,
62
- name: "ClubCo",
63
- },
64
- ],
65
- services: {
66
- datasheets: 1,
67
- descriptions: 1,
68
- images: 1,
69
- },
24
+ id_article: 35319,
25
+ id_category: "2146",
26
+ name: "FOCO LED A19 (60W) LUZ AMARILLA",
27
+ upc: "120873",
28
+ timestamp: "2022-06-14T15:31:50.000Z",
29
+ status: "NULL",
30
+ categoryName: "ILUMINACIÓN|FOCOS|LEDS",
31
+ asignations: [],
32
+ version: 2,
33
+ version_status: "AA",
70
34
  retailersAvailable: [
71
35
  {
72
- id: 4,
73
- name: "Walmart Super y Superama",
74
- },
75
- {
76
- id: 9,
77
- name: "Amazon",
78
- },
79
- {
80
- id: 1013,
81
- name: "Cencosud Colombia",
82
- },
83
- {
84
- id: 2005,
85
- name: "ClubCo",
36
+ id: 58,
37
+ name: "The Home Depot Golden",
38
+ country: "México",
39
+ id_region: 1,
40
+ active: 1,
86
41
  },
87
42
  ],
88
- id_article: 33249,
89
- categoryName: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
90
- version_status: "RECEPTION",
43
+ missing: {
44
+ datasheet: 33,
45
+ description: 0,
46
+ image: 23,
47
+ },
91
48
  },
92
49
  productToEdit: {
93
- ArticleId: 33249,
94
- idCategory: "684",
95
- product: {
96
- orderId: 7,
97
- id_category: "684",
98
- status: "RECEPTION",
99
- datasheet_status: null,
100
- prio: "none",
101
- version: 4,
102
- description_status: null,
103
- images_status: null,
104
- brand: null,
105
- missing: {
106
- datasheet: 33,
107
- descriptions: 14,
108
- images: 3,
109
- },
110
- article: {
111
- category: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
112
- company_name: "COMPANY DEV",
113
- id_category: "684",
114
- id_article: 33249,
115
- name: "Crema dental ",
116
- timestamp: "2022-06-14T23:24:08.000Z",
117
- upc: "232435",
118
- },
119
- retailers: [
120
- {
121
- id: 4,
122
- name: "Walmart Super y Superama",
123
- },
124
- {
125
- id: 9,
126
- name: "Amazon",
127
- },
128
- {
129
- id: 1013,
130
- name: "Cencosud Colombia",
131
- },
132
- {
133
- id: 2005,
134
- name: "ClubCo",
50
+ idCategory: "2146",
51
+ ArticleId: 35319,
52
+ product: [
53
+ {
54
+ id_article: 35319,
55
+ id_category: "2146",
56
+ name: "FOCO LED A19 (60W) LUZ AMARILLA",
57
+ upc: "120873",
58
+ timestamp: "2022-06-14T15:31:50.000Z",
59
+ status: "NULL",
60
+ categoryName: "ILUMINACIÓN|FOCOS|LEDS",
61
+ asignations: [],
62
+ version: 2,
63
+ version_status: "AA",
64
+ retailersAvailable: [
65
+ {
66
+ id: 58,
67
+ name: "The Home Depot Golden",
68
+ country: "México",
69
+ id_region: 1,
70
+ active: 1,
71
+ },
72
+ ],
73
+ missing: {
74
+ datasheet: 33,
75
+ description: 0,
76
+ image: 23,
135
77
  },
136
- ],
137
- services: {
138
- datasheets: 1,
139
- descriptions: 1,
140
- images: 1,
141
78
  },
142
- retailersAvailable: [
143
- {
144
- id: 4,
145
- name: "Walmart Super y Superama",
146
- },
147
- {
148
- id: 9,
149
- name: "Amazon",
150
- },
151
- {
152
- id: 1013,
153
- name: "Cencosud Colombia",
154
- },
155
- {
156
- id: 2005,
157
- name: "ClubCo",
158
- },
159
- ],
160
- id_article: 33249,
161
- categoryName:
162
- "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
163
- version_status: "RECEPTION",
164
- },
79
+ ],
165
80
  },
166
81
  location: {
167
82
  product: { articleId: 109485, versionId: 3 },
@@ -99,19 +99,21 @@ export const ProviderProductEdition = ({
99
99
  const ext = e.srcElement.fileName.split(".");
100
100
  const img = new Image();
101
101
  img.src = e.target.result;
102
- const width = img.width;
103
- const height = img.height;
104
- const newImg = {
105
- action: "addImg",
106
- img: {
107
- src: e.target.result,
108
- name: e.target.fileName,
109
- ext: ext[ext.length - 1],
110
- width: width,
111
- height: width,
112
- },
113
- };
114
- setImages(newImg);
102
+ setTimeout(() => {
103
+ const width = img.width;
104
+ const height = img.height;
105
+ const newImg = {
106
+ action: "addImg",
107
+ img: {
108
+ src: e.target.result,
109
+ name: e.target.fileName,
110
+ ext: ext[ext.length - 1],
111
+ width: width,
112
+ height: height,
113
+ },
114
+ };
115
+ setImages(newImg);
116
+ }, 500);
115
117
  };
116
118
  reader.onerror = function (error) {
117
119
  console.log("dropzoneError: ", error);
@@ -359,7 +361,7 @@ export const ProviderProductEdition = ({
359
361
  }, [activeRetailer, services]);
360
362
 
361
363
  const thumbs = () => {
362
- const imageInputs = socketType.slice();
364
+ const imageInputs = socketType?.slice();
363
365
  const imageType = images?.imageType?.map((e) => ({
364
366
  value: e?.id,
365
367
  name: e?.name,
@@ -26,71 +26,57 @@ RetailerProductEditionDefault.args = {
26
26
  descriptions: 1,
27
27
  images: 1,
28
28
  },
29
- orderId: 9,
30
- status: "QF",
31
- datasheet_status: "QF",
29
+ orderId: 13,
30
+ status: "IN_PROGRESS",
31
+ datasheet_status: "IN_PROGRESS",
32
32
  prio: "none",
33
33
  version: 2,
34
- description_status: "QF",
35
- images_status: "QF",
34
+ description_status: "IN_PROGRESS",
35
+ images_status: "IN_PROGRESS",
36
36
  article: {
37
- id_article: 35698,
38
- id_category: "2143",
39
- name: "FOCO LED A19 (60W) LUZ AMARILLA",
40
- upc: "12087311",
41
- timestamp: "2022-06-15T14:35:46.000Z",
42
- id_user: 59,
37
+ id_article: 35703,
38
+ id_category: "4",
39
+ name: "Manzana",
40
+ upc: "89898989",
41
+ timestamp: "2022-06-15T22:16:56.000Z",
42
+ id_user: 28,
43
43
  status: "NULL",
44
44
  active: 1,
45
45
  company_id: 1,
46
- company_name: "Cadena Ismael",
46
+ company_name: "COMPANY DEV",
47
47
  country: "México",
48
- id_order: 9,
48
+ id_order: 13,
49
49
  id_datasheet_especialist: 54,
50
50
  id_datasheet_facilitator: 52,
51
51
  id_description_especialist: 54,
52
52
  id_description_facilitator: 52,
53
53
  id_images_especialist: 55,
54
54
  id_images_facilitator: 53,
55
- id_auditor: 30,
55
+ id_auditor: null,
56
56
  id_recepcionist: null,
57
- category: "ILUMINACIÓN|FOCOS|FOCOS",
58
- missingAttributes: 0,
59
- missingDescriptions: 0,
60
- missingImages: -1,
57
+ category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
58
+ missingAttributes: -4,
59
+ missingDescriptions: 2,
60
+ missingImages: 2,
61
61
  },
62
62
  retailers: [
63
63
  {
64
- id: 58,
65
- name: "The Home Depot Golden",
64
+ id: 3,
65
+ name: "Sam´s Club",
66
66
  country: "México",
67
67
  id_region: 1,
68
68
  active: 1,
69
69
  },
70
70
  {
71
- id: 59,
72
- name: "The Home Depot Platinum",
73
- country: "México",
74
- id_region: 1,
75
- active: 1,
76
- },
77
- {
78
- id: 60,
79
- name: "The Home Depot Resizing",
80
- country: "México",
81
- id_region: 1,
82
- active: 1,
83
- },
84
- {
85
- id: 61,
86
- name: "Home Depot TAB",
71
+ id: 9,
72
+ name: "Amazon",
87
73
  country: "México",
88
74
  id_region: 1,
89
75
  active: 1,
90
76
  },
91
77
  ],
92
78
  country: "México",
93
- upc: "12087311",
79
+ upc: "89898989",
94
80
  },
95
81
  location: {
96
82
  product: { articleId: 109485, versionId: 3 },
@@ -88,23 +88,25 @@ export const RetailerProductEdition = ({
88
88
  acceptedFiles.map((file) => {
89
89
  const reader = new FileReader();
90
90
  reader.fileName = file.name;
91
- reader.onload = async function (e) {
91
+ reader.onload = function (e) {
92
92
  const ext = e.srcElement.fileName.split(".");
93
93
  const img = new Image();
94
94
  img.src = e.target.result;
95
- const width = img.width;
96
- const height = img.height;
97
- const newImg = {
98
- action: "addImg",
99
- img: {
100
- src: e.target.result,
101
- name: e.target.fileName,
102
- ext: ext[ext.length - 1],
103
- width: width,
104
- height: width,
105
- },
106
- };
107
- setImages(newImg);
95
+ setTimeout(() => {
96
+ const width = img.width;
97
+ const height = img.height;
98
+ const newImg = {
99
+ action: "addImg",
100
+ img: {
101
+ src: e.target.result,
102
+ name: e.target.fileName,
103
+ ext: ext[ext.length - 1],
104
+ width: width,
105
+ height: height,
106
+ },
107
+ };
108
+ setImages(newImg);
109
+ }, 500);
108
110
  };
109
111
  reader.onerror = function (error) {
110
112
  console.log("dropzoneError: ", error);
@@ -1079,7 +1081,7 @@ export const RetailerProductEdition = ({
1079
1081
  service.id_retailer === activeRetailer?.id &&
1080
1082
  service.service === concept
1081
1083
  );
1082
- return retailerService ? retailerService.status : "NA";
1084
+ return retailerService ? retailerService.status : "NS";
1083
1085
  };
1084
1086
 
1085
1087
  useEffect(() => {