@omniumretail/component-library 1.0.37 → 1.0.38

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.
Files changed (32) hide show
  1. package/dist/bundle.js +3 -3
  2. package/dist/types/components/AnalyticsBar/AnalyticsBar.stories.d.ts +5 -0
  3. package/dist/types/components/AnalyticsBar/helpers/codeMutation.d.ts +4 -0
  4. package/dist/types/components/AnalyticsBar/index.d.ts +3 -0
  5. package/dist/types/components/AnalyticsBar/interfaces/analyticsBar.d.ts +12 -0
  6. package/dist/types/components/CategoryResponse/CategoryResponse.stories.d.ts +4 -0
  7. package/dist/types/components/CategoryResponse/evaluationOptions.d.ts +10 -0
  8. package/dist/types/components/CategoryResponse/index.d.ts +9 -0
  9. package/dist/types/components/Menu/Menu.stories.d.ts +5 -0
  10. package/dist/types/components/Menu/helpers/codeMutation.d.ts +4 -0
  11. package/dist/types/components/Menu/index.d.ts +3 -0
  12. package/dist/types/constants/translationHelper.d.ts +2 -0
  13. package/package.json +1 -1
  14. package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +180 -0
  15. package/src/components/AnalyticsBar/helpers/codeMutation.tsx +19 -0
  16. package/src/components/AnalyticsBar/index.tsx +76 -0
  17. package/src/components/AnalyticsBar/interfaces/analyticsBar.tsx +13 -0
  18. package/src/components/AnalyticsBar/styles.module.scss +108 -0
  19. package/src/components/Category/Category.stories.tsx +64 -37
  20. package/src/components/Category/CategoryContent/index.tsx +9 -9
  21. package/src/components/CategoryResponse/CategoryResponse.stories.tsx +261 -0
  22. package/src/components/CategoryResponse/evaluationOptions.tsx +81 -0
  23. package/src/components/CategoryResponse/index.tsx +280 -0
  24. package/src/components/CategoryResponse/styles.module.scss +135 -0
  25. package/src/components/Menu/Menu.stories.tsx +178 -0
  26. package/src/components/Menu/helpers/codeMutation.tsx +19 -0
  27. package/src/components/Menu/index.tsx +23 -0
  28. package/src/components/Menu/styles.module.scss +0 -0
  29. package/src/constants/translationHelper.ts +7 -0
  30. package/src/locales/en.json +3 -0
  31. package/src/locales/es.json +3 -0
  32. package/src/locales/pt.json +3 -0
package/dist/bundle.js CHANGED
@@ -10804,7 +10804,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
10804
10804
  /***/ (function(module) {
10805
10805
 
10806
10806
  "use strict";
10807
- module.exports = JSON.parse('{"tableHeadings":{"key":"key","name":"name","mecanographicNumber":"Mecanographic Number","store":"Store","role":"Role","type":"Type","id":"Id"},"navigation":{"back":"Go Back","logout":"Log Out","home":"Home"},"actions":{"one":"one","two":"two"},"components":{"category":{"addQuestion":"Add Question","placeholderInfo":"Question Information","errorInfo":"Missing Question Information","placeholderQuestion":"Question","errorQuestion":"Missing Question","placeholderGrade":"Grade","errorGrade":"Missing Grade"}}}');
10807
+ module.exports = JSON.parse('{"tableHeadings":{"key":"key","name":"name","mecanographicNumber":"Mecanographic Number","store":"Store","role":"Role","type":"Type","id":"Id"},"navigation":{"back":"Go Back","logout":"Log Out","home":"Home"},"actions":{"one":"one","two":"two"},"components":{"category":{"addQuestion":"Add Question","placeholderInfo":"Question Information","errorInfo":"Missing Question Information","placeholderQuestion":"Question","errorQuestion":"Missing Question","placeholderGrade":"Grade","errorGrade":"Missing Grade"},"categoryResponse":{"notApplicable":"Not Applicable"}}}');
10808
10808
 
10809
10809
  /***/ }),
10810
10810
 
@@ -10815,7 +10815,7 @@ module.exports = JSON.parse('{"tableHeadings":{"key":"key","name":"name","mecano
10815
10815
  /***/ (function(module) {
10816
10816
 
10817
10817
  "use strict";
10818
- module.exports = JSON.parse('{"tableHeadings":{"key":"keyES","name":"nameES","mecanographicNumber":"Mecanographic NumberES","store":"StoreES","role":"RoleES","type":"TypeES","id":"IdES"},"navigation":{"back":"Go Back ES","logout":"Log Out ES","home":"Home ES"},"actions":{"one":"one ES","two":"two ES"},"components":{"category":{"addQuestion":"Add Question ES","placeholderInfo":"Question Information ES","errorInfo":"Missing Question Information ES","placeholderQuestion":"Question ES","errorQuestion":"Missing Question ES","placeholderGrade":"Grade ES","errorGrade":"Missing Grade ES"}}}');
10818
+ module.exports = JSON.parse('{"tableHeadings":{"key":"keyES","name":"nameES","mecanographicNumber":"Mecanographic NumberES","store":"StoreES","role":"RoleES","type":"TypeES","id":"IdES"},"navigation":{"back":"Go Back ES","logout":"Log Out ES","home":"Home ES"},"actions":{"one":"one ES","two":"two ES"},"components":{"category":{"addQuestion":"Add Question ES","placeholderInfo":"Question Information ES","errorInfo":"Missing Question Information ES","placeholderQuestion":"Question ES","errorQuestion":"Missing Question ES","placeholderGrade":"Grade ES","errorGrade":"Missing Grade ES"},"categoryResponse":{"notApplicable":"Not Applicable ES"}}}');
10819
10819
 
10820
10820
  /***/ }),
10821
10821
 
@@ -10826,7 +10826,7 @@ module.exports = JSON.parse('{"tableHeadings":{"key":"keyES","name":"nameES","me
10826
10826
  /***/ (function(module) {
10827
10827
 
10828
10828
  "use strict";
10829
- module.exports = JSON.parse('{"tableHeadings":{"key":"Chave","name":"Nome","mecanographicNumber":"Número Mecanográfico","store":"Loja","role":"Posição","type":"Tipo","id":"Id","action":"Ação"},"navigation":{"back":"Go Back PT","logout":"Log Out PT","home":"Home PT"},"actions":{"one":"one PT","two":"two PT"},"components":{"category":{"addQuestion":"Add Question PT","placeholderInfo":"Question Information PT","errorInfo":"Missing Question Information PT","placeholderQuestion":"Question PT","errorQuestion":"Missing Question PT","placeholderGrade":"Grade PT","errorGrade":"Missing Grade PT"}}}');
10829
+ module.exports = JSON.parse('{"tableHeadings":{"key":"Chave","name":"Nome","mecanographicNumber":"Número Mecanográfico","store":"Loja","role":"Posição","type":"Tipo","id":"Id","action":"Ação"},"navigation":{"back":"Go Back PT","logout":"Log Out PT","home":"Home PT"},"actions":{"one":"one PT","two":"two PT"},"components":{"category":{"addQuestion":"Add Question PT","placeholderInfo":"Question Information PT","errorInfo":"Missing Question Information PT","placeholderQuestion":"Question PT","errorQuestion":"Missing Question PT","placeholderGrade":"Grade PT","errorGrade":"Missing Grade PT"},"categoryResponse":{"notApplicable":"Não Aplicável"}}}');
10830
10830
 
10831
10831
  /***/ })
10832
10832
 
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from "@storybook/react";
2
+ import { AnalyticsBarProps } from './interfaces/analyticsBar';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<AnalyticsBarProps>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { MenuProps } from 'antd';
3
+ export type MenuItem = Required<MenuProps>['items'][number];
4
+ export declare function getItem(label: React.ReactNode, key: React.Key, icon?: React.ReactNode, children?: MenuItem[], type?: 'group'): MenuItem;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { AnalyticsBarProps } from './interfaces/analyticsBar';
3
+ export declare const AnalyticsBar: (props: AnalyticsBarProps) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ export interface AnalyticsBarProps {
2
+ data: any;
3
+ selectOptions: any;
4
+ selectDefault: any;
5
+ selectUserOption?: any;
6
+ sortedBy?: any;
7
+ activeListItem?: any;
8
+ }
9
+ export declare enum sortBy {
10
+ asc = "asc",
11
+ desc = "desc"
12
+ }
@@ -0,0 +1,4 @@
1
+ import { Meta, Story } from "@storybook/react";
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Primary: Story<any>;
@@ -0,0 +1,10 @@
1
+ export type EvaluationOption = {
2
+ value: string;
3
+ label: string;
4
+ };
5
+ export type EvaluationOptions = {
6
+ scale_0: EvaluationOption[];
7
+ scale_1: EvaluationOption[];
8
+ scale_2: EvaluationOption[];
9
+ };
10
+ export declare const evaluationOptions: EvaluationOptions;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface CategoryResponse {
3
+ data: any;
4
+ serverReadyData: any;
5
+ onNextCategoryAvailabilityChange: (hasNext: boolean) => void;
6
+ onPreviousCategoryAvailabilityChange: (hasPrevious: boolean) => void;
7
+ }
8
+ export declare const CategoryResponse: React.ForwardRefExoticComponent<CategoryResponse & React.RefAttributes<unknown>>;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from "@storybook/react";
2
+ import { MenuProps } from 'antd';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<MenuProps>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { MenuProps } from 'antd';
3
+ export type MenuItem = Required<MenuProps>['items'][number];
4
+ export declare function getItem(label: React.ReactNode, key: React.Key, icon?: React.ReactNode, children?: MenuItem[], type?: 'group'): MenuItem;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { MenuProps } from 'antd';
3
+ export declare const Menu: (props: MenuProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const translate: (key: any, options?: {}) => string;
2
+ export default translate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/component-library",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "private": false,
5
5
  "main": "dist/bundle.js",
6
6
  "typings": "./dist/types/index",
@@ -0,0 +1,180 @@
1
+ import { Meta, Story } from "@storybook/react";
2
+ import { AnalyticsBar } from '.';
3
+ import { AnalyticsBarProps } from './interfaces/analyticsBar';
4
+ import { getItem } from './helpers/codeMutation';
5
+ import { useMemo, useState } from "react";
6
+
7
+ export default {
8
+ title: 'AnalyticsBar',
9
+ component: AnalyticsBar,
10
+ } as Meta;
11
+
12
+ const Template: Story<AnalyticsBarProps> = (args) => {
13
+ const [sortedBy, setSortedBy] = useState<any>('');
14
+ const [optionInUse, setOptionInUse] = useState<any>();
15
+ const [activeListItem, setActiveListItem] = useState<any>();
16
+
17
+ const data = [
18
+ {
19
+ "Label": "PeriodOfExperimentation",
20
+ "Items": [
21
+ {
22
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
23
+ "Name": "Name"
24
+ }
25
+ ]
26
+ },
27
+ {
28
+ "Label": "PeriodOfExperimentation",
29
+ "Items": [
30
+ {
31
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
32
+ "Name": "Name"
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ "Label": "PeriodOfExperimentation",
38
+ "Items": [
39
+ {
40
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
41
+ "Name": "Name"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "Label": "PeriodOfExperimentation",
47
+ "Items": [
48
+ {
49
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
50
+ "Name": "Name"
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "Label": "PeriodOfExperimentation",
56
+ "Items": [
57
+ {
58
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
59
+ "Name": "Name"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "Label": "PeriodOfExperimentation",
65
+ "Items": [
66
+ {
67
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
68
+ "Name": "Name"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "Label": "PeriodOfExperimentation",
74
+ "Items": [
75
+ {
76
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
77
+ "Name": "Name"
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "Label": "PeriodOfExperimentation",
83
+ "Items": [
84
+ {
85
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
86
+ "Name": "Name"
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ "Label": "PeriodOfExperimentation",
92
+ "Items": [
93
+ {
94
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
95
+ "Name": "Name"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "Label": "PeriodOfExperimentation",
101
+ "Items": [
102
+ {
103
+ "Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
104
+ "Name": "Name"
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "Label": "Permanent",
110
+ "Items": [
111
+ {
112
+ "Id": "A3FE0C73-E771-40BB-B87D-1E40597841A6",
113
+ "Name": "Evaluation Cycle"
114
+ },
115
+ {
116
+ "Id": "05A411CC-4350-4779-93C4-B8A511CBBCCD",
117
+ "Name": "Evaluation Cycle 2"
118
+ },
119
+ {
120
+ "Id": "D5A77A3B-1163-4590-9C98-2E6D62442F62",
121
+ "Name": "EV2"
122
+ },
123
+ {
124
+ "Id": "42A6EFDD-6D74-4905-94AE-5B5588967BE6",
125
+ "Name": "EV2"
126
+ },
127
+ {
128
+ "Id": "E39FE86D-6CE1-400A-8BA2-AE31A8E9D9BE",
129
+ "Name": "Suuuup"
130
+ },
131
+ {
132
+ "Id": "7FC59CF0-9478-4705-B1E0-C1B709FFB81B",
133
+ "Name": "CicloParaRespostas1"
134
+ },
135
+ {
136
+ "Id": "767DF403-C33D-4074-B7CA-FE3F4E4B41DD",
137
+ "Name": "XPTO"
138
+ },
139
+ {
140
+ "Id": "DB821A00-D516-467C-8F22-710EA18BFD23",
141
+ "Name": "EvaluationCycle for Notifications"
142
+ }
143
+ ]
144
+ }
145
+ ];
146
+
147
+ const selectOptions = [
148
+ {
149
+ value: 'ano',
150
+ label: 'ANO',
151
+ },
152
+ {
153
+ value: 'tipo_de_ciclo',
154
+ label: 'TIPO DE CICLO',
155
+ },
156
+ ];
157
+
158
+ const items = useMemo(() => data.map((el: any, index: any) => {
159
+ return (
160
+ getItem(
161
+ el.Label,
162
+ index,
163
+ null,
164
+ el.Items?.map((item: any, subIndex: any) => {
165
+ return getItem(item.Name, item.Id);
166
+ })
167
+ )
168
+ )
169
+ }), [data]);
170
+
171
+ // console.log('stories:', sortedBy, optionInUse, activeListItem);
172
+
173
+ return <div style={{height: '500px'}}>
174
+ <AnalyticsBar {...args} data={items} selectOptions={selectOptions} selectDefault={selectOptions[0]} sortedBy={setSortedBy} selectUserOption={setOptionInUse} activeListItem={setActiveListItem}></AnalyticsBar>
175
+ </div>;
176
+ }
177
+
178
+ export const Primary = Template.bind({});
179
+ Primary.args = {
180
+ };
@@ -0,0 +1,19 @@
1
+ import type { MenuProps } from 'antd';
2
+
3
+ export type MenuItem = Required<MenuProps>['items'][number];
4
+
5
+ export function getItem(
6
+ label: React.ReactNode,
7
+ key: React.Key,
8
+ icon?: React.ReactNode,
9
+ children?: MenuItem[],
10
+ type?: 'group',
11
+ ): MenuItem {
12
+ return {
13
+ key,
14
+ icon,
15
+ children,
16
+ label,
17
+ type,
18
+ } as MenuItem;
19
+ }
@@ -0,0 +1,76 @@
1
+ import styles from './styles.module.scss';
2
+ import { MinusOutlined, PlusOutlined, SortAscendingOutlined, SortDescendingOutlined } from '@ant-design/icons';
3
+ import { Select } from 'components/Select';
4
+ import type { MenuProps } from 'antd';
5
+ import { Menu } from 'antd';
6
+ import { AnalyticsBarProps, sortBy } from './interfaces/analyticsBar';
7
+ import { useCallback, useEffect, useState } from 'react';
8
+
9
+ export const AnalyticsBar = (props: AnalyticsBarProps) => {
10
+ const {
11
+ data: items = [],
12
+ selectOptions,
13
+ selectDefault,
14
+ selectUserOption,
15
+ sortedBy,
16
+ activeListItem
17
+ } = props;
18
+
19
+ const [selectedKeys, setSelectedKeys] = useState<string[]>([]);
20
+ const [sortInfo, setSortInfo] = useState<any>(sortBy.desc);
21
+
22
+ const selectOnChange = useCallback((value: any) => {
23
+ selectUserOption(value);
24
+ }, [selectUserOption]);
25
+
26
+ const setSorter = useCallback(() => {
27
+ sortInfo === sortBy.desc
28
+ ? setSortInfo(sortBy.asc)
29
+ : setSortInfo(sortBy.desc);
30
+
31
+ sortedBy(sortInfo);
32
+ }, [sortInfo]);
33
+
34
+ const onClick: MenuProps['onClick'] = (e: any) => {
35
+ const { key } = e;
36
+ if (selectedKeys.includes(key)) {
37
+ setSelectedKeys([]);
38
+ } else {
39
+ setSelectedKeys([key]);
40
+ }
41
+
42
+ activeListItem(key);
43
+ };
44
+
45
+ console.log(sortInfo);
46
+ return (
47
+ <div className={styles.analyticsbar}>
48
+ <div className={styles.header}>
49
+ <Select
50
+ options={selectOptions}
51
+ customClass={styles.select}
52
+ onChange={selectOnChange}
53
+ defaultActiveFirstOption
54
+ defaultValue={selectDefault}
55
+ />
56
+
57
+ <div className={styles.sorterWrapper} onClick={() => setSorter()}>
58
+ {sortInfo === sortBy.desc
59
+ ? <>Decrescente <SortDescendingOutlined /></>
60
+ : <>Crescente <SortAscendingOutlined /></>
61
+ }
62
+ </div>
63
+ </div>
64
+
65
+ <div className={styles.content}>
66
+ <Menu
67
+ selectedKeys={selectedKeys}
68
+ onClick={onClick}
69
+ mode="inline"
70
+ items={items}
71
+ expandIcon={({ isOpen }) => (isOpen ? <MinusOutlined /> : <PlusOutlined />)}
72
+ />
73
+ </div>
74
+ </div>
75
+ );
76
+ };
@@ -0,0 +1,13 @@
1
+ export interface AnalyticsBarProps {
2
+ data: any;
3
+ selectOptions: any;
4
+ selectDefault: any;
5
+ selectUserOption?: any;
6
+ sortedBy?: any;
7
+ activeListItem?: any;
8
+ }
9
+
10
+ export enum sortBy {
11
+ asc = 'asc',
12
+ desc = 'desc',
13
+ }
@@ -0,0 +1,108 @@
1
+ .select {
2
+ width: 100%;
3
+ }
4
+
5
+ .analyticsbar {
6
+ background: #2C2D2E0D;
7
+ height: 100%;
8
+ position: relative;
9
+
10
+ :global {
11
+ .ant-menu-light {
12
+ background-color: transparent !important;
13
+ border-inline-end: none !important;
14
+ }
15
+
16
+ .ant-menu-title-content {
17
+ font-size: 17px;
18
+ line-height: 20px;
19
+ font-weight: var(--font-weight-semibold);
20
+
21
+ &:hover {
22
+ color: var(--color-orange);
23
+ }
24
+ }
25
+
26
+ .ant-menu-sub {
27
+ .ant-menu-title-content {
28
+ font-size: 15px;
29
+ line-height: 18px;
30
+ font-weight: var(--font-weight-medium);
31
+ }
32
+
33
+ .ant-menu-item {
34
+ height: 30px;
35
+ line-height: 30px;
36
+
37
+ &:first-child {
38
+ margin-top: -10px;
39
+ }
40
+ }
41
+ }
42
+
43
+ .ant-menu-submenu {
44
+ border-top: 1px solid var(--color-orange);
45
+ border-radius: 0;
46
+ }
47
+
48
+ .ant-menu-item {
49
+ &:hover {
50
+ background-color: initial !important;
51
+ }
52
+ }
53
+
54
+ .ant-menu-item-selected,
55
+ .ant-menu-submenu-selected >.ant-menu-submenu-title {
56
+ color: var(--color-orange);
57
+ background-color: initial;
58
+ }
59
+
60
+ .ant-menu-inline .ant-menu-sub.ant-menu-inline {
61
+ background: initial;
62
+ }
63
+
64
+ .ant-menu-submenu-title {
65
+ height: 50px !important;
66
+ line-height: 50px !important;
67
+
68
+ &:hover {
69
+ background-color: initial !important;
70
+ }
71
+
72
+ .anticon {
73
+ color: var(--color-orange);
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ .header {
80
+ position: absolute;
81
+ top: 24px;
82
+ left: 24px;
83
+ right: 24px;
84
+ height: 144px;
85
+ }
86
+
87
+ .sorterWrapper {
88
+ font-size: var(--font-size-body-2);
89
+ line-height: 14px;
90
+ font-weight: var(--font-weight-light);
91
+ display: inline-block;
92
+ padding: 12px;
93
+ cursor: pointer;
94
+ position: absolute;
95
+ right: 0;
96
+ top: 60px;
97
+ }
98
+
99
+ .content {
100
+ position: absolute;
101
+ top: 144px;
102
+ left: 24px;
103
+ right: 24px;
104
+ bottom: 0;
105
+ overflow-y: auto;
106
+ overflow-x: hidden;
107
+ padding-bottom: 24px;
108
+ }
@@ -10,11 +10,70 @@ export default {
10
10
  const Template: Story<any> = (args) => {
11
11
  const [serverData, setServerData] = useState<any>();
12
12
 
13
- // useEffect(() => {
14
- // console.log(serverData);
15
- // }, [serverData])
13
+ useEffect(() => {
14
+ console.log(serverData);
15
+ }, [serverData])
16
16
 
17
- return <Category {...args} serverReadyData={setServerData} data={[]}></Category>
17
+ return <Category {...args} serverReadyData={setServerData} data={[
18
+ {
19
+ "title": "opgg (Q: 1) ",
20
+ "key": "0",
21
+ "data": {
22
+ "categoryName": "opgg",
23
+ "openAnswer": true,
24
+ "questions": [
25
+ {
26
+ "question": "1",
27
+ "info": "2"
28
+ }
29
+ ]
30
+ },
31
+ "children": []
32
+ },
33
+ {
34
+ "title": "abcd (Q: 1) (G: 2)",
35
+ "key": "1",
36
+ "data": {
37
+ "categoryName": "abcd",
38
+ "openAnswer": false,
39
+ "questions": [
40
+ {
41
+ "question": "ax1",
42
+ "info": "se2",
43
+ "grade": "1s"
44
+ }
45
+ ],
46
+ "generalEvaluationLevel": "2",
47
+ "grade": "2"
48
+ },
49
+ "children": []
50
+ },
51
+ {
52
+ "title": "hasCHild (Q: 0) (G: 12)",
53
+ "key": "2",
54
+ "data": {
55
+ "categoryName": "hasCHild",
56
+ "openAnswer": false,
57
+ "generalEvaluationLevel": "0",
58
+ "grade": "12",
59
+ "questions": []
60
+ },
61
+ "children": [
62
+ {
63
+ "title": "theChild (Q: 0) (G: 12)",
64
+ "key": "2.0",
65
+ "children": [],
66
+ "data": {
67
+ "categoryName": "theChild",
68
+ "openAnswer": false,
69
+ "generalEvaluationLevel": "0",
70
+ "grade": "12",
71
+ "questions": []
72
+ }
73
+ }
74
+ ]
75
+ }
76
+ ]}></Category>
18
77
  };
19
78
 
20
79
  export const Primary = Template.bind({});
@@ -22,36 +81,4 @@ Primary.args = {
22
81
  };
23
82
 
24
83
 
25
- // [
26
- // {
27
- // "title": "opgg (Q: 1) ",
28
- // "key": "0",
29
- // "data": {
30
- // "categoryName": "opgg",
31
- // "openAnswer": true,
32
- // "questions": [
33
- // {
34
- // "question": "1",
35
- // "info": "2"
36
- // }
37
- // ]
38
- // }
39
- // },
40
- // {
41
- // "title": "abcd (Q: 1) (G: 2)",
42
- // "key": "1",
43
- // "data": {
44
- // "categoryName": "abcd",
45
- // "openAnswer": false,
46
- // "questions": [
47
- // {
48
- // "question": "ax1",
49
- // "info": "se2",
50
- // "grade": "1s"
51
- // }
52
- // ],
53
- // "generalEvaluationLevel": "2",
54
- // "grade": "2"
55
- // }
56
- // }
57
- // ]
84
+
@@ -92,15 +92,15 @@ export const CategoryContent = (props: categoryContent) => {
92
92
 
93
93
  {categorySidebarData?.data?.children?.length > 0 &&
94
94
  <div className={styles.grade}>
95
- <Label isUppercase>
96
- Ponderação
97
- </Label>
98
- <Form.Item
99
- name={['grade']}
100
- rules={[{ required: true, message: 'Grade is Missing' }]}
101
- >
102
- <InputField placeholder={'EX: 15%'} />
103
- </Form.Item>
95
+ <Label isUppercase>
96
+ Ponderação
97
+ </Label>
98
+ <Form.Item
99
+ name={['grade']}
100
+ rules={[{ required: true, message: 'Grade is Missing' }]}
101
+ >
102
+ <InputField placeholder={'EX: 15%'} />
103
+ </Form.Item>
104
104
  </div>
105
105
  }
106
106