@omniumretail/component-library 1.2.29 → 1.2.31
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/bundle.js +1 -1
- package/dist/main.css +3 -3
- package/dist/types/components/ResponseType/ResponseType.stories.d.ts +4 -0
- package/package.json +1 -1
- package/src/components/BellNotifications/BellNotifications.stories.tsx +89 -19
- package/src/components/BellNotifications/index.tsx +33 -51
- package/src/components/BellNotifications/styles.module.scss +30 -11
- package/src/components/Button/styles.module.scss +0 -14
- package/src/components/CategoryResponse/index.tsx +34 -22
- package/src/components/CategoryResponse/styles.module.scss +7 -1
- package/src/components/Header/Header.stories.tsx +173 -0
- package/src/components/Questions/index.tsx +4 -1
- package/src/components/ResponseType/ResponseType.stories.tsx +393 -0
- package/src/components/ResponseType/index.tsx +1 -0
- package/src/components/ResponseType/Category.stories.tsx +0 -29
|
@@ -51,6 +51,177 @@ const mockMenu = [
|
|
|
51
51
|
}
|
|
52
52
|
];
|
|
53
53
|
|
|
54
|
+
const notifications = [
|
|
55
|
+
{
|
|
56
|
+
"Id": "662C390B-A38F-45AB-B97C-2D00F0A8ACAD",
|
|
57
|
+
"Title": "Creation of an Evaluation Cycle",
|
|
58
|
+
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
59
|
+
"RedirectURL": "https://www.google.pt",
|
|
60
|
+
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
61
|
+
"ExpirationDate": 1736899200,
|
|
62
|
+
"Criticality": {
|
|
63
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
64
|
+
"Name": "High",
|
|
65
|
+
"ColorHex": "#E05151"
|
|
66
|
+
},
|
|
67
|
+
"IsRead": true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"Id": "0AF18720-1C94-48CD-8DF3-D254077E8363",
|
|
71
|
+
"Title": "Creation of an Evaluation Cycle",
|
|
72
|
+
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
73
|
+
"RedirectURL": "https://www.google.pt",
|
|
74
|
+
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
75
|
+
"ExpirationDate": 1736899200,
|
|
76
|
+
"Criticality": {
|
|
77
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
78
|
+
"Name": "High",
|
|
79
|
+
"ColorHex": "#E05151"
|
|
80
|
+
},
|
|
81
|
+
"IsRead": true
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"Id": "0419654F-66FE-41EA-BBA4-D8BB6E3D6B33",
|
|
85
|
+
"Title": "Creation of an Evaluation Cycle",
|
|
86
|
+
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
87
|
+
"RedirectURL": "https://www.google.pt",
|
|
88
|
+
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
89
|
+
"ExpirationDate": 1736899200,
|
|
90
|
+
"Criticality": {
|
|
91
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
92
|
+
"Name": "High",
|
|
93
|
+
"ColorHex": "#E05151"
|
|
94
|
+
},
|
|
95
|
+
"IsRead": true
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"Id": "CC98EDA1-0461-4D08-982E-8424EF4AFB3B",
|
|
99
|
+
"Title": "Creation of an Evaluation Cycle",
|
|
100
|
+
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
101
|
+
"RedirectURL": "https://www.google.pt",
|
|
102
|
+
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
103
|
+
"ExpirationDate": 1736899200,
|
|
104
|
+
"Criticality": {
|
|
105
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
106
|
+
"Name": "High",
|
|
107
|
+
"ColorHex": "#E05151"
|
|
108
|
+
},
|
|
109
|
+
"IsRead": false
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"Id": "3DB9310A-4BF8-4B90-8D5A-7583473664BB",
|
|
113
|
+
"Title": "Creation of an Evaluation Cycle",
|
|
114
|
+
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
115
|
+
"RedirectURL": "https://www.google.pt",
|
|
116
|
+
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
117
|
+
"ExpirationDate": 1736899200,
|
|
118
|
+
"Criticality": {
|
|
119
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
120
|
+
"Name": "High",
|
|
121
|
+
"ColorHex": "#E05151"
|
|
122
|
+
},
|
|
123
|
+
"IsRead": false
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"Id": "D6FB93EE-3255-42B2-8EC1-27E7AC3F5249",
|
|
127
|
+
"Title": "Creation of a new user",
|
|
128
|
+
"Description": "A new user was created in the platform with the mecanographic number 8111.",
|
|
129
|
+
"RedirectURL": "https://www.google.pt",
|
|
130
|
+
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
131
|
+
"ExpirationDate": 1736985600,
|
|
132
|
+
"Criticality": {
|
|
133
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
134
|
+
"Name": "High",
|
|
135
|
+
"ColorHex": "#E05151"
|
|
136
|
+
},
|
|
137
|
+
"IsRead": false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"Id": "D6FB96EE-3255-42B2-8EC1-27E7AC3F5249",
|
|
141
|
+
"Title": "Creation of a new action of inspection",
|
|
142
|
+
"Description": "A new inspection action was created.",
|
|
143
|
+
"RedirectURL": "https://www.google.pt",
|
|
144
|
+
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
145
|
+
"ExpirationDate": 1736985600,
|
|
146
|
+
"Criticality": {
|
|
147
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
148
|
+
"Name": "High",
|
|
149
|
+
"ColorHex": "#E05151"
|
|
150
|
+
},
|
|
151
|
+
"IsRead": false
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"Id": "D6FB96EE-3655-42B2-8EC1-27E7AC3F5249",
|
|
155
|
+
"Title": "Creation of a new action of inspection",
|
|
156
|
+
"Description": "A new inspection action was created.",
|
|
157
|
+
"RedirectURL": "https://www.google.pt",
|
|
158
|
+
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
159
|
+
"ExpirationDate": 1736985600,
|
|
160
|
+
"Criticality": {
|
|
161
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
162
|
+
"Name": "High",
|
|
163
|
+
"ColorHex": "#E05151"
|
|
164
|
+
},
|
|
165
|
+
"IsRead": false
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"Id": "D6FB96EE-3255-46B2-8EC1-27E7AC3F5249",
|
|
169
|
+
"Title": "Creation of a new action of inspection",
|
|
170
|
+
"Description": "A new inspection action was created.",
|
|
171
|
+
"RedirectURL": "https://www.google.pt",
|
|
172
|
+
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
173
|
+
"ExpirationDate": 1736985600,
|
|
174
|
+
"Criticality": {
|
|
175
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
176
|
+
"Name": "High",
|
|
177
|
+
"ColorHex": "#E05151"
|
|
178
|
+
},
|
|
179
|
+
"IsRead": false
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"Id": "D9FB96EE-3255-42B2-8EC1-27E7AC3F5249",
|
|
183
|
+
"Title": "Creation of a new action of inspection",
|
|
184
|
+
"Description": "A new inspection action was created.",
|
|
185
|
+
"RedirectURL": "https://www.google.pt",
|
|
186
|
+
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
187
|
+
"ExpirationDate": 1736985600,
|
|
188
|
+
"Criticality": {
|
|
189
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
190
|
+
"Name": "High",
|
|
191
|
+
"ColorHex": "#E05151"
|
|
192
|
+
},
|
|
193
|
+
"IsRead": false
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"Id": "D6FB96EE-5955-42B2-8EC1-27E7AC3F5249",
|
|
197
|
+
"Title": "Creation of a new action of inspection",
|
|
198
|
+
"Description": "A new inspection action was created.",
|
|
199
|
+
"RedirectURL": "https://www.google.pt",
|
|
200
|
+
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
201
|
+
"ExpirationDate": 1736985600,
|
|
202
|
+
"Criticality": {
|
|
203
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
204
|
+
"Name": "High",
|
|
205
|
+
"ColorHex": "#E05151"
|
|
206
|
+
},
|
|
207
|
+
"IsRead": false
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"Id": "D6FB96EE-3255-42B7-8EC1-27E7AC3F5249",
|
|
211
|
+
"Title": "Creation of a new action of inspection",
|
|
212
|
+
"Description": "A new inspection action was created.",
|
|
213
|
+
"RedirectURL": "https://www.google.pt",
|
|
214
|
+
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
215
|
+
"ExpirationDate": 1736985600,
|
|
216
|
+
"Criticality": {
|
|
217
|
+
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
218
|
+
"Name": "High",
|
|
219
|
+
"ColorHex": "#E05151"
|
|
220
|
+
},
|
|
221
|
+
"IsRead": false
|
|
222
|
+
}
|
|
223
|
+
];
|
|
224
|
+
|
|
54
225
|
export const Primary = Template.bind({});
|
|
55
226
|
Primary.args = {
|
|
56
227
|
menuList: mockMenu,
|
|
@@ -59,5 +230,7 @@ Primary.args = {
|
|
|
59
230
|
profileUrl: profileUrl,
|
|
60
231
|
userName: 'Diogo Carvalho',
|
|
61
232
|
pageTitle: 'Page Title',
|
|
233
|
+
notifications: notifications,
|
|
234
|
+
|
|
62
235
|
};
|
|
63
236
|
|
|
@@ -44,9 +44,12 @@ export const Questions = (props: QuestionsProps) => {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const newItems: any = [...items];
|
|
47
|
+
|
|
47
48
|
const [removed] = newItems.splice(result?.source?.index, 1);
|
|
49
|
+
|
|
48
50
|
newItems.splice(result.destination?.index, 0, removed);
|
|
49
|
-
|
|
51
|
+
|
|
52
|
+
console.log(props?.form?.setFieldValue('questions', newItems), "props?.form?.setFieldValue('questions', newItems)");
|
|
50
53
|
};
|
|
51
54
|
|
|
52
55
|
return (
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { Meta, Story } from "@storybook/react";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { ResponseType } from '.';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'ResponseType',
|
|
7
|
+
component: ResponseType,
|
|
8
|
+
} as Meta;
|
|
9
|
+
|
|
10
|
+
const Template: Story<any> = (args) => {
|
|
11
|
+
const [categoryContentInfo, setCategoryContentInfo] = useState<any>();
|
|
12
|
+
|
|
13
|
+
const getAnswer = {
|
|
14
|
+
"Id": "57859452-4B79-4005-BB6C-3695C78270FD",
|
|
15
|
+
"Name": "Levi's Stores",
|
|
16
|
+
"IsOpenAnswer": false,
|
|
17
|
+
"IsCheckBox": false,
|
|
18
|
+
"IsNumeric": false,
|
|
19
|
+
"IsDate": false,
|
|
20
|
+
"HasGrade": false,
|
|
21
|
+
"IsEmphasis": false,
|
|
22
|
+
"IsMultipleChoise": false,
|
|
23
|
+
"IsStore": false,
|
|
24
|
+
"State": "Finished",
|
|
25
|
+
"Grade": 0,
|
|
26
|
+
"Rank": 8,
|
|
27
|
+
"Options": [
|
|
28
|
+
{
|
|
29
|
+
"Value": "2 - LS Via Catarina Shopping",
|
|
30
|
+
"Grade": "N/A",
|
|
31
|
+
"Color": "#000000",
|
|
32
|
+
"NeedsAction": false
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"Value": "4 - LS Amoreiras Shopping",
|
|
36
|
+
"Grade": "N/A",
|
|
37
|
+
"Color": "#000000",
|
|
38
|
+
"NeedsAction": false
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"Value": "5 - Levis GaiaShopping",
|
|
42
|
+
"Grade": "N/A",
|
|
43
|
+
"Color": "#000000",
|
|
44
|
+
"NeedsAction": false
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"Value": "6 - LS Arrábida Shopping",
|
|
48
|
+
"Grade": "N/A",
|
|
49
|
+
"Color": "#00000",
|
|
50
|
+
"NeedsAction": false
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"Value": "9 - LS Artea",
|
|
54
|
+
"Grade": "N/A",
|
|
55
|
+
"Color": "#00000",
|
|
56
|
+
"NeedsAction": false
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"Value": "10 - LS Nova Arcada",
|
|
60
|
+
"Grade": "N/A",
|
|
61
|
+
"Color": "#00000",
|
|
62
|
+
"NeedsAction": false
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"Value": "11 - LS Rio Shopping",
|
|
66
|
+
"Grade": "N/A",
|
|
67
|
+
"Color": "#00000",
|
|
68
|
+
"NeedsAction": false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"Value": "12 - LS Garbera",
|
|
72
|
+
"Grade": "N/A",
|
|
73
|
+
"Color": "#00000",
|
|
74
|
+
"NeedsAction": false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"Value": "13 - LS La Maquinista",
|
|
78
|
+
"Grade": "N/A",
|
|
79
|
+
"Color": "#00000",
|
|
80
|
+
"NeedsAction": false
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"Value": "14 - LS GuimarãesShopping",
|
|
84
|
+
"Grade": "N/A",
|
|
85
|
+
"Color": "#00000",
|
|
86
|
+
"NeedsAction": false
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"Value": "15 - LS Moyua",
|
|
90
|
+
"Grade": "N/A",
|
|
91
|
+
"Color": "#00000",
|
|
92
|
+
"NeedsAction": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"Value": "17 - LS As Cancelas",
|
|
96
|
+
"Grade": "N/A",
|
|
97
|
+
"Color": "#00000",
|
|
98
|
+
"NeedsAction": false
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"Value": "19 - LS Intu-Asturias",
|
|
102
|
+
"Grade": "N/A",
|
|
103
|
+
"Color": "#00000",
|
|
104
|
+
"NeedsAction": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"Value": "20 - LS Gran Via II",
|
|
108
|
+
"Grade": "N/A",
|
|
109
|
+
"Color": "#00000",
|
|
110
|
+
"NeedsAction": false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"Value": "21 - LS NorteShopping",
|
|
114
|
+
"Grade": "N/A",
|
|
115
|
+
"Color": "#00000",
|
|
116
|
+
"NeedsAction": false
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"Value": "22 - LS Forum Coimbra",
|
|
120
|
+
"Grade": "N/A",
|
|
121
|
+
"Color": "#00000",
|
|
122
|
+
"NeedsAction": false
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"Value": "24 - LS Marineda City",
|
|
126
|
+
"Grade": "N/A",
|
|
127
|
+
"Color": "#00000",
|
|
128
|
+
"NeedsAction": false
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"Value": "26 - LS Girona",
|
|
132
|
+
"Grade": "N/A",
|
|
133
|
+
"Color": "#00000",
|
|
134
|
+
"NeedsAction": false
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"Value": "27 - LS Vasco da Gama",
|
|
138
|
+
"Grade": "N/A",
|
|
139
|
+
"Color": "#00000",
|
|
140
|
+
"NeedsAction": false
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"Value": "30 - LS Alameda Shop & Spot",
|
|
144
|
+
"Grade": "N/A",
|
|
145
|
+
"Color": "#00000",
|
|
146
|
+
"NeedsAction": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"Value": "31 - LS AlgarveShopping",
|
|
150
|
+
"Grade": "N/A",
|
|
151
|
+
"Color": "#00000",
|
|
152
|
+
"NeedsAction": false
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"Value": "32 - LS CascaiShopping",
|
|
156
|
+
"Grade": "N/A",
|
|
157
|
+
"Color": "#00000",
|
|
158
|
+
"NeedsAction": false
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"Value": "33 - LS Vitoria Boulevard",
|
|
162
|
+
"Grade": "N/A",
|
|
163
|
+
"Color": "#00000",
|
|
164
|
+
"NeedsAction": false
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"Value": "34 - LS Oeiras Parque",
|
|
168
|
+
"Grade": "N/A",
|
|
169
|
+
"Color": "#00000",
|
|
170
|
+
"NeedsAction": false
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"Value": "35 - LS LeiriaShopping",
|
|
174
|
+
"Grade": "N/A",
|
|
175
|
+
"Color": "#00000",
|
|
176
|
+
"NeedsAction": false
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"Value": "36 - LS Braga Parque",
|
|
180
|
+
"Grade": "N/A",
|
|
181
|
+
"Color": "#00000",
|
|
182
|
+
"NeedsAction": false
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"Value": "37 - LS Alegro Sintra",
|
|
186
|
+
"Grade": "N/A",
|
|
187
|
+
"Color": "#00000",
|
|
188
|
+
"NeedsAction": false
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"Value": "42 - LS Palácio do Gelo",
|
|
192
|
+
"Grade": "N/A",
|
|
193
|
+
"Color": "#00000",
|
|
194
|
+
"NeedsAction": false
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"Value": "44 - LS Chiado",
|
|
198
|
+
"Grade": "N/A",
|
|
199
|
+
"Color": "#00000",
|
|
200
|
+
"NeedsAction": false
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"Value": "45 - LS Colombo",
|
|
204
|
+
"Grade": "N/A",
|
|
205
|
+
"Color": "#00000",
|
|
206
|
+
"NeedsAction": false
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"Value": "47 - LS Almada Forum",
|
|
210
|
+
"Grade": "N/A",
|
|
211
|
+
"Color": "#00000",
|
|
212
|
+
"NeedsAction": false
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"Value": "48 - LS MarShopping",
|
|
216
|
+
"Grade": "N/A",
|
|
217
|
+
"Color": "#00000",
|
|
218
|
+
"NeedsAction": false
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"Value": "49 - LS Forum Aveiro",
|
|
222
|
+
"Grade": "N/A",
|
|
223
|
+
"Color": "#00000",
|
|
224
|
+
"NeedsAction": false
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"Value": "50 - LS Berceo Mall",
|
|
228
|
+
"Grade": "N/A",
|
|
229
|
+
"Color": "#00000",
|
|
230
|
+
"NeedsAction": false
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"Value": "51 - LS Sant Cugat",
|
|
234
|
+
"Grade": "N/A",
|
|
235
|
+
"Color": "#00000",
|
|
236
|
+
"NeedsAction": false
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"Value": "53 - LS Anec Blau",
|
|
240
|
+
"Grade": "N/A",
|
|
241
|
+
"Color": "#00000",
|
|
242
|
+
"NeedsAction": false
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"Value": "54 - LS Puerto Venecia",
|
|
246
|
+
"Grade": "N/A",
|
|
247
|
+
"Color": "#00000",
|
|
248
|
+
"NeedsAction": false
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"Value": "55 - LS FAN Mallorca",
|
|
252
|
+
"Grade": "N/A",
|
|
253
|
+
"Color": "#00000",
|
|
254
|
+
"NeedsAction": false
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"Value": "56 - LS Ramblas",
|
|
258
|
+
"Grade": "N/A",
|
|
259
|
+
"Color": "#00000",
|
|
260
|
+
"NeedsAction": false
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"Value": "57 - LS Ubbo",
|
|
264
|
+
"Grade": "N/A",
|
|
265
|
+
"Color": "#00000",
|
|
266
|
+
"NeedsAction": false
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"Value": "58 - LS Forum Algarve",
|
|
270
|
+
"Grade": "N/A",
|
|
271
|
+
"Color": "#00000",
|
|
272
|
+
"NeedsAction": false
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"Value": "59 - LS Parc Central",
|
|
276
|
+
"Grade": "N/A",
|
|
277
|
+
"Color": "#00000",
|
|
278
|
+
"NeedsAction": false
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"Value": "60 - LS Pamplona La Morea",
|
|
282
|
+
"Grade": "N/A",
|
|
283
|
+
"Color": "#00000",
|
|
284
|
+
"NeedsAction": false
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"Value": "65 - LS Santander",
|
|
288
|
+
"Grade": "N/A",
|
|
289
|
+
"Color": "#00000",
|
|
290
|
+
"NeedsAction": false
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"Value": "68 - LS Principe",
|
|
294
|
+
"Grade": "N/A",
|
|
295
|
+
"Color": "#00000",
|
|
296
|
+
"NeedsAction": false
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"Value": "69 - LS Restauradores",
|
|
300
|
+
"Grade": "N/A",
|
|
301
|
+
"Color": "#00000",
|
|
302
|
+
"NeedsAction": false
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"Value": "78 - LS Espacio Leon",
|
|
306
|
+
"Grade": "N/A",
|
|
307
|
+
"Color": "#00000",
|
|
308
|
+
"NeedsAction": false
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"Value": "80 - LS Salamanca",
|
|
312
|
+
"Grade": "N/A",
|
|
313
|
+
"Color": "#00000",
|
|
314
|
+
"NeedsAction": false
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"Value": "81 - LS Porto Pi",
|
|
318
|
+
"Grade": "N/A",
|
|
319
|
+
"Color": "#00000",
|
|
320
|
+
"NeedsAction": false
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"Value": "82 - LS Mataró Parc",
|
|
324
|
+
"Grade": "N/A",
|
|
325
|
+
"Color": "#00000",
|
|
326
|
+
"NeedsAction": false
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"Value": "83 - LS Diagonal 605",
|
|
330
|
+
"Grade": "N/A",
|
|
331
|
+
"Color": "#00000",
|
|
332
|
+
"NeedsAction": false
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"Value": "85 - LS Arcs",
|
|
336
|
+
"Grade": "N/A",
|
|
337
|
+
"Color": "#00000",
|
|
338
|
+
"NeedsAction": false
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"Value": "86 - LS Lleida",
|
|
342
|
+
"Grade": "N/A",
|
|
343
|
+
"Color": "#00000",
|
|
344
|
+
"NeedsAction": false
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"Value": "88 - LS Valle Real Santander",
|
|
348
|
+
"Grade": "N/A",
|
|
349
|
+
"Color": "#00000",
|
|
350
|
+
"NeedsAction": false
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"Value": "25 - Levis La Vaguada",
|
|
354
|
+
"Grade": "N/A",
|
|
355
|
+
"Color": "#00000",
|
|
356
|
+
"NeedsAction": false
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"CreateDate": "2024-07-04T11:32:36.118Z",
|
|
360
|
+
"UpdateDate": "2024-12-26T13:18:23.016Z",
|
|
361
|
+
"StartDate": "2024-12-26T13:18:23.016Z",
|
|
362
|
+
"Status": "A",
|
|
363
|
+
"ShowAnswerType": true,
|
|
364
|
+
"IsInUse": false,
|
|
365
|
+
"UseName": true
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
let initialValues;
|
|
369
|
+
|
|
370
|
+
initialValues = {
|
|
371
|
+
name: getAnswer?.Name,
|
|
372
|
+
questions: getAnswer?.Options?.map((option) => ({
|
|
373
|
+
question: option?.Value,
|
|
374
|
+
score: option?.Grade,
|
|
375
|
+
color: option?.Color,
|
|
376
|
+
flagged: option?.NeedsAction
|
|
377
|
+
|
|
378
|
+
}))
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
useEffect(() => {
|
|
382
|
+
console.log(categoryContentInfo);
|
|
383
|
+
}, [categoryContentInfo])
|
|
384
|
+
|
|
385
|
+
return <ResponseType {...args} categoryContentInfo={setCategoryContentInfo} data={initialValues} ></ResponseType>
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
export const Primary = Template.bind({});
|
|
389
|
+
Primary.args = {
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Meta, Story } from "@storybook/react";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
import { ResponseType } from '.';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'ResponseType',
|
|
7
|
-
component: ResponseType,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
const Template: Story<any> = (args) => {
|
|
11
|
-
const [serverData, setServerData] = useState<any>();
|
|
12
|
-
const [categoryContentInfo, setCategoryContentInfo] = useState<any>();
|
|
13
|
-
const [categorySidebarInfo, setCategorySidebarInfo] = useState<any>();
|
|
14
|
-
const [showContent, setShowContent] = useState<boolean>(false);
|
|
15
|
-
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
console.log(serverData);
|
|
18
|
-
}, [serverData])
|
|
19
|
-
|
|
20
|
-
return <ResponseType {...args} categoryContentInfo={setCategoryContentInfo} categoryContentShow={showContent}
|
|
21
|
-
categorySidebarData={categorySidebarInfo} serverReadyData={setServerData} ></ResponseType>
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const Primary = Template.bind({});
|
|
25
|
-
Primary.args = {
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|