contentoh-components-library 21.0.90 → 21.0.94

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.90",
3
+ "version": "21.0.94",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -48,7 +48,10 @@ export const AvatarAndValidation = ({
48
48
  {showValidationButtons && (
49
49
  <Button
50
50
  buttonType={`circular-button ${buttonType}`}
51
- onClick={() => setShowValidationPanel(true)}
51
+ onClick={(e) => {
52
+ e.stopPropagation();
53
+ setShowValidationPanel(true);
54
+ }}
52
55
  />
53
56
  )}
54
57
  </div>
@@ -21,73 +21,60 @@ 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,
24
+ version: 1,
32
25
  brand: null,
33
26
  missing: {
34
- datasheet: 33,
35
- descriptions: 14,
36
- images: 3,
27
+ datasheet: null,
28
+ descriptions: null,
29
+ images: null,
37
30
  },
38
31
  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",
32
+ category:
33
+ "ORGANIZADORES Y CLOSETS|ACCESORIOS DE LAVANDERÍA|BURROS DE PLANCHAR",
34
+ company_name: "BROOKLITE MEXICO S DE RL DE CV",
35
+ company_id: 409,
36
+ id_category: "2520",
37
+ id_article: 1,
38
+ name: "SOPORTE PLANCHA-BURRO EN PUERTA",
39
+ upc: "339",
46
40
  },
41
+ asignations: [62],
47
42
  retailers: [
48
43
  {
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",
44
+ id: 61,
45
+ name: "Home Depot TAB",
46
+ country: "México",
47
+ id_region: 1,
48
+ active: 1,
63
49
  },
64
50
  ],
65
- services: {
66
- datasheets: 1,
67
- descriptions: 1,
68
- images: 1,
69
- },
51
+ percentage: 0,
70
52
  retailersAvailable: [
71
53
  {
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",
54
+ id: 61,
55
+ name: "Home Depot TAB",
56
+ country: "México",
57
+ id_region: 1,
58
+ active: 1,
82
59
  },
60
+ ],
61
+ upc: "339",
62
+ name: "SOPORTE PLANCHA-BURRO EN PUERTA",
63
+ categoryName:
64
+ "ORGANIZADORES Y CLOSETS|ACCESORIOS DE LAVANDERÍA|BURROS DE PLANCHAR",
65
+ id_category: "2520",
66
+ id_article: 1,
67
+ services: [
83
68
  {
84
- id: 2005,
85
- name: "ClubCo",
69
+ id_article: 1,
70
+ service: "datasheet",
71
+ quantity: 1,
72
+ price: 0,
73
+ id_user: 59,
74
+ datasheet_common: null,
75
+ discount: null,
86
76
  },
87
77
  ],
88
- id_article: 33249,
89
- categoryName: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
90
- version_status: "RECEPTION",
91
78
  },
92
79
  productToEdit: {
93
80
  ArticleId: 33249,
@@ -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,81 +26,78 @@ RetailerProductEditionDefault.args = {
26
26
  descriptions: 1,
27
27
  images: 1,
28
28
  },
29
- orderId: 233,
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: 190965,
38
- id_category: "697",
39
- name: "Shampoo hidratante",
40
- upc: "6545345",
41
- timestamp: "2022-06-10T15:05:56.000Z",
37
+ id_article: 35703,
38
+ id_category: "4",
39
+ name: "Manzana",
40
+ upc: "89898989",
41
+ timestamp: "2022-06-15T22:16:56.000Z",
42
42
  id_user: 28,
43
43
  status: "NULL",
44
44
  active: 1,
45
45
  company_id: 1,
46
46
  company_name: "COMPANY DEV",
47
47
  country: "México",
48
- id_order: 233,
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:
58
- "SALUD Y BELLEZA|CUIDADO DEL CABELLO|SHAMPOOS Y ACONDICIONADORES",
59
- missingAttributes: null,
60
- missingDescriptions: null,
61
- missingImages: null,
57
+ category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
58
+ missingAttributes: -4,
59
+ missingDescriptions: 2,
60
+ missingImages: 2,
62
61
  },
63
62
  retailers: [
64
63
  {
65
- id: 4,
66
- name: "Walmart Super y Superama",
64
+ id: 3,
65
+ name: "Sam´s Club",
67
66
  country: "México",
68
67
  id_region: 1,
69
68
  active: 1,
70
- percentage: 100,
71
69
  },
72
70
  {
73
- id: 26,
74
- name: "Mercado Libre",
71
+ id: 9,
72
+ name: "Amazon",
75
73
  country: "México",
76
74
  id_region: 1,
77
75
  active: 1,
78
- percentage: 100,
79
76
  },
80
77
  ],
81
78
  country: "México",
82
- upc: "6545345",
79
+ upc: "89898989",
83
80
  },
84
81
  location: {
85
82
  product: { articleId: 109485, versionId: 3 },
86
83
  },
87
84
  user: {
88
- id_user: 53,
89
- name: "FACILITADOR ED PRUEBA",
85
+ id_user: 52,
86
+ name: "FACILITADOR TXT PRUEBA",
90
87
  last_name: "",
91
- email: "arojas@contentoh.com",
88
+ email: "azarate@contentoh.com",
92
89
  position: null,
93
90
  telephone: null,
94
91
  country: null,
95
92
  id_company: 2,
96
- id_cognito: "c106e141-e221-49e8-a382-ce99385c6d88",
93
+ id_cognito: "b2ce5b2a-609c-4e79-9ea9-2f74cff43889",
97
94
  birth_Date: null,
98
95
  about_me: null,
99
96
  zip_code: null,
100
97
  address: null,
101
98
  job: null,
102
99
  id_stripe: null,
103
- id_role: 5,
100
+ id_role: 4,
104
101
  active: 1,
105
102
  is_retailer: 0,
106
103
  membership: {
@@ -114,6 +111,6 @@ RetailerProductEditionDefault.args = {
114
111
  products_limit: "3",
115
112
  type: "PyMES",
116
113
  },
117
- src: "https://content-management-profile.s3.amazonaws.com/id-53/53.png?1655161876316",
114
+ src: "https://content-management-profile.s3.amazonaws.com/id-52/52.png?1655320339846",
118
115
  },
119
116
  };
@@ -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(() => {