@omniumretail/shared-resources 0.0.24 → 0.0.25
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/.eslintrc.json +31 -31
- package/README.md +44 -44
- package/dist/bundle.js +259 -193
- package/dist/types/components/BottomDrawer/index.d.ts +9 -9
- package/dist/types/components/Button/index.d.ts +2 -2
- package/dist/types/components/Footer/index.d.ts +3 -3
- package/dist/types/components/Form/FormInputField/index.d.ts +8 -8
- package/dist/types/components/Form/FormSelectField/index.d.ts +9 -9
- package/dist/types/components/Form/index.d.ts +2 -2
- package/dist/types/components/Header/index.d.ts +4 -4
- package/dist/types/components/Link/index.d.ts +6 -6
- package/dist/types/components/Navigation/index.d.ts +8 -8
- package/dist/types/components/Page/index.d.ts +13 -13
- package/dist/types/components/SharedContextProvider/index.d.ts +7 -7
- package/dist/types/components/index.d.ts +9 -9
- package/dist/types/constants/Icons.d.ts +15 -14
- package/dist/types/constants/QueryClient.d.ts +2 -2
- package/dist/types/constants/index.d.ts +2 -2
- package/dist/types/contexts/useStore.d.ts +8 -8
- package/dist/types/hooks/activateEvaluationCycleQuery.hook.d.ts +2 -2
- package/dist/types/hooks/activateQuestionnaireQuery.hook.d.ts +2 -2
- package/dist/types/hooks/cancelEvaluationCycleQuery.hook.d.ts +2 -2
- package/dist/types/hooks/cancelQuestionnaireQuery.hook.d.ts +2 -2
- package/dist/types/hooks/deleteEvaluationCycleQuery.hook.d.ts +2 -2
- package/dist/types/hooks/deleteQuestionnaireQuery.hook.d.ts +2 -2
- package/dist/types/hooks/duplicateQuestionnaireQuery.hook.d.ts +2 -2
- package/dist/types/hooks/finishEvaluationCycleQuery.hook.d.ts +2 -2
- package/dist/types/hooks/finishQuestionnaireQuery.hook.d.ts +2 -2
- package/dist/types/hooks/index.d.ts +42 -39
- package/dist/types/hooks/useAllRolesQuery.hook.d.ts +11 -11
- package/dist/types/hooks/useAllStoreQuery.hook.d.ts +13 -11
- package/dist/types/hooks/useAnalyticsEvaluationCyclesQuery.hook.d.ts +7 -7
- package/dist/types/hooks/useAnalyticsQuestionsQuery.hook.d.ts +9 -9
- package/dist/types/hooks/useAnalyticsSideBarQuery.hook.d.ts +7 -7
- package/dist/types/hooks/useAnalyticsUserIdQuery.hook.d.ts +9 -9
- package/dist/types/hooks/useAnalyticsUserQuery.hook.d.ts +9 -9
- package/dist/types/hooks/useAnswerIdQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useAnswerMutateQuery.hook.d.ts +9 -9
- package/dist/types/hooks/useAnswersUserSupervisorQuery.hook.d.ts +7 -7
- package/dist/types/hooks/useApplicationDataQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useContractStatesQuery.hook.d.ts +7 -7
- package/dist/types/hooks/useCountriesQuery.hook.d.ts +7 -7
- package/dist/types/hooks/useCustomersQuery.hook.d.ts +138 -138
- package/dist/types/hooks/useEvaluationCycleIdQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useEvaluationCycleMutateQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useEvaluationCycleQuery.hook.d.ts +8 -8
- package/dist/types/hooks/useJobTitlesQuery.hook.d.ts +7 -7
- package/dist/types/hooks/useProductHierarchies.hook.d.ts +7 -7
- package/dist/types/hooks/useProductsQuery.hook.d.ts +138 -138
- package/dist/types/hooks/useQuestionnaireIdQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useQuestionnaireMutateQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useQuestionnaireQuery.hook.d.ts +9 -9
- package/dist/types/hooks/useSingleUserIdMutateQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useSingleUserIdQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useSingleUserResetPassword.hook.d.ts +2 -0
- package/dist/types/hooks/useStoreQuery.d.ts +7 -7
- package/dist/types/hooks/useTermNotificationQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useUserBlockQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useUserEmailVerifQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useUserIdQuery.hook.d.ts +2 -2
- package/dist/types/hooks/useUserListQuery.hook.d.ts +8 -8
- package/dist/types/hooks/useUserQuery.hook.d.ts +10 -10
- package/dist/types/index.d.ts +7 -7
- package/dist/types/interfaces/AnalyticsEvaluationCycle.d.ts +19 -19
- package/dist/types/interfaces/AnalyticsUserId.d.ts +11 -11
- package/dist/types/interfaces/Answer.d.ts +12 -12
- package/dist/types/interfaces/AnswersUserSupervisor.d.ts +42 -42
- package/dist/types/interfaces/ApplicationsByCategory.d.ts +16 -16
- package/dist/types/interfaces/Brand.d.ts +4 -4
- package/dist/types/interfaces/Cart.d.ts +10 -9
- package/dist/types/interfaces/Configuration.d.ts +6 -6
- package/dist/types/interfaces/ContractStates.d.ts +7 -7
- package/dist/types/interfaces/Countries.d.ts +10 -10
- package/dist/types/interfaces/Customer.d.ts +21 -21
- package/dist/types/interfaces/EvaluationCycle.d.ts +32 -32
- package/dist/types/interfaces/JobTitles.d.ts +7 -7
- package/dist/types/interfaces/Product.d.ts +15 -16
- package/dist/types/interfaces/ProductsHierarchies.d.ts +5 -5
- package/dist/types/interfaces/Questionnaire.d.ts +36 -36
- package/dist/types/interfaces/ResponseList.d.ts +5 -5
- package/dist/types/interfaces/Roles.d.ts +5 -5
- package/dist/types/interfaces/Store.d.ts +7 -7
- package/dist/types/interfaces/TermNotification.d.ts +5 -5
- package/dist/types/interfaces/User.d.ts +65 -65
- package/dist/types/interfaces/index.d.ts +21 -19
- package/dist/types/services/ApiService/index.d.ts +9 -9
- package/dist/types/services/InitService/index.d.ts +3 -3
- package/dist/types/services/index.d.ts +2 -2
- package/package.json +54 -54
- package/src/assets/sitoo.svg +9 -9
- package/src/components/BottomDrawer/index.tsx +32 -32
- package/src/components/BottomDrawer/styles.module.scss +59 -59
- package/src/components/Button/index.tsx +7 -7
- package/src/components/Footer/index.tsx +44 -44
- package/src/components/Footer/styles.module.scss +33 -33
- package/src/components/Form/FormInputField/index.tsx +18 -18
- package/src/components/Form/FormSelectField/index.tsx +16 -16
- package/src/components/Form/index.ts +2 -2
- package/src/components/Header/index.tsx +20 -20
- package/src/components/Header/styles.module.scss +16 -16
- package/src/components/Link/index.tsx +21 -21
- package/src/components/Link/styles.module.scss +24 -24
- package/src/components/Navigation/index.tsx +30 -30
- package/src/components/Navigation/styles.module.scss +34 -34
- package/src/components/Page/index.tsx +35 -35
- package/src/components/Page/styles.module.scss +26 -26
- package/src/components/SharedContextProvider/index.tsx +30 -30
- package/src/components/index.ts +9 -9
- package/src/constants/Icons.ts +23 -20
- package/src/constants/QueryClient.ts +10 -10
- package/src/constants/index.ts +2 -2
- package/src/contexts/useStore.tsx +20 -20
- package/src/global.scss +124 -124
- package/src/hooks/activateEvaluationCycleQuery.hook.ts +15 -15
- package/src/hooks/activateQuestionnaireQuery.hook.ts +15 -15
- package/src/hooks/cancelEvaluationCycleQuery.hook.ts +15 -15
- package/src/hooks/cancelQuestionnaireQuery.hook.ts +15 -15
- package/src/hooks/deleteEvaluationCycleQuery.hook.ts +15 -15
- package/src/hooks/deleteQuestionnaireQuery.hook.ts +15 -15
- package/src/hooks/duplicateQuestionnaireQuery.hook.ts +14 -14
- package/src/hooks/finishEvaluationCycleQuery.hook.ts +15 -15
- package/src/hooks/finishQuestionnaireQuery.hook.ts +15 -15
- package/src/hooks/index.ts +42 -41
- package/src/hooks/useAllRolesQuery.hook.ts +21 -21
- package/src/hooks/useAllStoreQuery.hook.ts +39 -27
- package/src/hooks/useAnalyticsEvaluationCyclesQuery.hook.ts +21 -21
- package/src/hooks/useAnalyticsQuestionsQuery.hook.ts +22 -22
- package/src/hooks/useAnalyticsSideBarQuery.hook.ts +21 -21
- package/src/hooks/useAnalyticsUserIdQuery.hook.ts +24 -24
- package/src/hooks/useAnalyticsUserQuery.hook.ts +27 -27
- package/src/hooks/useAnswerIdQuery.hook.ts +13 -13
- package/src/hooks/useAnswerMutateQuery.hook.ts +31 -31
- package/src/hooks/useAnswersUserSupervisorQuery.hook.tsx +21 -21
- package/src/hooks/useApplicationDataQuery.hook.ts +10 -10
- package/src/hooks/useContractStatesQuery.hook.ts +14 -14
- package/src/hooks/useCountriesQuery.hook.ts +14 -14
- package/src/hooks/useCustomersQuery.hook.ts +30 -30
- package/src/hooks/useEvaluationCycleIdQuery.hook.ts +13 -13
- package/src/hooks/useEvaluationCycleMutateQuery.hook.ts +17 -17
- package/src/hooks/useEvaluationCycleQuery.hook.ts +25 -25
- package/src/hooks/useJobTitlesQuery.hook.ts +14 -14
- package/src/hooks/useProductHierarchies.hook.ts +12 -12
- package/src/hooks/useProductsQuery.hook.ts +30 -30
- package/src/hooks/useQuestionnaireIdQuery.hook.ts +13 -13
- package/src/hooks/useQuestionnaireMutateQuery.hook.ts +17 -17
- package/src/hooks/useQuestionnaireQuery.hook.ts +27 -27
- package/src/hooks/useSingleUserIdMutateQuery.hook.ts +18 -18
- package/src/hooks/useSingleUserIdQuery.hook.ts +14 -14
- package/src/hooks/useSingleUserResetPassword.hook.ts +15 -0
- package/src/hooks/useStoreQuery.ts +13 -13
- package/src/hooks/useTermNotificationQuery.hook.ts +11 -11
- package/src/hooks/useUserBlockQuery.hook.ts +15 -15
- package/src/hooks/useUserEmailVerifQuery.hook.ts +15 -15
- package/src/hooks/useUserIdQuery.hook.ts +14 -14
- package/src/hooks/useUserListQuery.hook.ts +25 -25
- package/src/hooks/useUserQuery.hook.ts +29 -29
- package/src/index.ts +9 -9
- package/src/interfaces/AnalyticsEvaluationCycle.ts +24 -24
- package/src/interfaces/AnalyticsUserId.ts +12 -12
- package/src/interfaces/Answer.ts +13 -13
- package/src/interfaces/AnswersUserSupervisor.ts +45 -45
- package/src/interfaces/ApplicationsByCategory.ts +19 -19
- package/src/interfaces/Brand.ts +4 -4
- package/src/interfaces/Cart.ts +13 -12
- package/src/interfaces/Configuration.ts +7 -7
- package/src/interfaces/ContractStates.ts +7 -7
- package/src/interfaces/Countries.ts +10 -10
- package/src/interfaces/Customer.ts +23 -23
- package/src/interfaces/EvaluationCycle.ts +32 -32
- package/src/interfaces/JobTitles.ts +7 -7
- package/src/interfaces/Product.ts +17 -18
- package/src/interfaces/ProductsHierarchies.ts +6 -6
- package/src/interfaces/Questionnaire.ts +38 -38
- package/src/interfaces/ResponseList.ts +6 -6
- package/src/interfaces/Roles.ts +5 -5
- package/src/interfaces/Store.ts +8 -8
- package/src/interfaces/TermNotification.ts +5 -5
- package/src/interfaces/User.ts +69 -69
- package/src/interfaces/index.ts +21 -21
- package/src/services/ApiService/index.ts +125 -125
- package/src/services/InitService/index.ts +7 -7
- package/src/services/index.ts +3 -3
- package/src/types/Global.d.ts +4 -4
- package/tsconfig.json +27 -27
- package/webpack.config.js +48 -48
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
.navigation {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
padding: 0 24px;
|
|
6
|
-
height: 75px;
|
|
7
|
-
gap: 0 24px;
|
|
8
|
-
position: relative;
|
|
9
|
-
|
|
10
|
-
@media(max-width: 767px) {
|
|
11
|
-
padding-top: 32px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@media(min-width: 767px) {
|
|
15
|
-
padding: 0 40px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.title {
|
|
19
|
-
font-size: var(--font-size-body-4);
|
|
20
|
-
font-weight: var(--font-weight-semibold);
|
|
21
|
-
text-transform: uppercase;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.columnCenter {
|
|
25
|
-
@media(max-width: 767px) {
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: 12px;
|
|
28
|
-
margin: 0 auto;
|
|
29
|
-
left: 0;
|
|
30
|
-
right: 0;
|
|
31
|
-
text-align: center;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
.navigation {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
padding: 0 24px;
|
|
6
|
+
height: 75px;
|
|
7
|
+
gap: 0 24px;
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
@media(max-width: 767px) {
|
|
11
|
+
padding-top: 32px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media(min-width: 767px) {
|
|
15
|
+
padding: 0 40px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.title {
|
|
19
|
+
font-size: var(--font-size-body-4);
|
|
20
|
+
font-weight: var(--font-weight-semibold);
|
|
21
|
+
text-transform: uppercase;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.columnCenter {
|
|
25
|
+
@media(max-width: 767px) {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 12px;
|
|
28
|
+
margin: 0 auto;
|
|
29
|
+
left: 0;
|
|
30
|
+
right: 0;
|
|
31
|
+
text-align: center;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
import { Spin } from 'antd';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
import styles from './styles.module.scss';
|
|
5
|
-
|
|
6
|
-
interface PageContentProps extends PageBaseProps {
|
|
7
|
-
isLoading?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface PageBaseProps {
|
|
11
|
-
children?: React.ReactNode | React.ReactNode[];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const Page = ({ children }: PageBaseProps) => {
|
|
15
|
-
return (
|
|
16
|
-
<div className={ styles.pageContainer }>
|
|
17
|
-
{ children }
|
|
18
|
-
</div>
|
|
19
|
-
)
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const PageHeader = ({ children }: PageBaseProps) => (
|
|
23
|
-
<div className={ styles.header }>
|
|
24
|
-
{ children }
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const PageContent = ({ children, isLoading }: PageContentProps) => (
|
|
29
|
-
<div className={ classNames(styles.pageContent, { [styles.pageContentLoading]: isLoading }) }>
|
|
30
|
-
{ isLoading ? <Spin /> : children }
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
Page.Header = PageHeader;
|
|
35
|
-
Page.Content = PageContent;
|
|
1
|
+
|
|
2
|
+
import { Spin } from 'antd';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styles from './styles.module.scss';
|
|
5
|
+
|
|
6
|
+
interface PageContentProps extends PageBaseProps {
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface PageBaseProps {
|
|
11
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const Page = ({ children }: PageBaseProps) => {
|
|
15
|
+
return (
|
|
16
|
+
<div className={ styles.pageContainer }>
|
|
17
|
+
{ children }
|
|
18
|
+
</div>
|
|
19
|
+
)
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const PageHeader = ({ children }: PageBaseProps) => (
|
|
23
|
+
<div className={ styles.header }>
|
|
24
|
+
{ children }
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const PageContent = ({ children, isLoading }: PageContentProps) => (
|
|
29
|
+
<div className={ classNames(styles.pageContent, { [styles.pageContentLoading]: isLoading }) }>
|
|
30
|
+
{ isLoading ? <Spin /> : children }
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
Page.Header = PageHeader;
|
|
35
|
+
Page.Content = PageContent;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
$padding: 8.5px 20px;
|
|
2
|
-
|
|
3
|
-
.header {
|
|
4
|
-
background: var(--white-color);
|
|
5
|
-
height: 37px;
|
|
6
|
-
border-bottom: 2px solid var(--disabled-input);
|
|
7
|
-
color: var(--app-footer-bg-color);
|
|
8
|
-
display: flex;
|
|
9
|
-
gap: 21px;
|
|
10
|
-
align-items: center;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.pageContent, .header {
|
|
14
|
-
padding: $padding;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.pageContainer {
|
|
18
|
-
height: 100%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.pageContentLoading {
|
|
22
|
-
min-height: 50%;
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
}
|
|
1
|
+
$padding: 8.5px 20px;
|
|
2
|
+
|
|
3
|
+
.header {
|
|
4
|
+
background: var(--white-color);
|
|
5
|
+
height: 37px;
|
|
6
|
+
border-bottom: 2px solid var(--disabled-input);
|
|
7
|
+
color: var(--app-footer-bg-color);
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: 21px;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pageContent, .header {
|
|
14
|
+
padding: $padding;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pageContainer {
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pageContentLoading {
|
|
22
|
+
min-height: 50%;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { QueryClientProvider } from "@tanstack/react-query";
|
|
3
|
-
import { queryClient } from '../../constants';
|
|
4
|
-
import { StoreProvider } from '../../contexts/useStore';
|
|
5
|
-
|
|
6
|
-
export interface SharedContextProviderProps {
|
|
7
|
-
providers?: React.JSXElementConstructor<unknown>[];
|
|
8
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
9
|
-
disableInitialStoreRequest?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const DefaultProviders = [
|
|
13
|
-
StoreProvider,
|
|
14
|
-
[QueryClientProvider, { client: queryClient }],
|
|
15
|
-
] as React.JSXElementConstructor<unknown>[];
|
|
16
|
-
|
|
17
|
-
const ContextProvider = ({ providers, children }) => providers.reduceRight(
|
|
18
|
-
(children, parent) => React.cloneElement(parent, { children: children }),
|
|
19
|
-
children
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export const SharedContextProvider = ({ children, disableInitialStoreRequest }: SharedContextProviderProps) => {
|
|
23
|
-
return (
|
|
24
|
-
<QueryClientProvider client={ queryClient }>
|
|
25
|
-
<StoreProvider disableInitialStoreRequest={disableInitialStoreRequest}>
|
|
26
|
-
{ children }
|
|
27
|
-
</StoreProvider>
|
|
28
|
-
</QueryClientProvider>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { QueryClientProvider } from "@tanstack/react-query";
|
|
3
|
+
import { queryClient } from '../../constants';
|
|
4
|
+
import { StoreProvider } from '../../contexts/useStore';
|
|
5
|
+
|
|
6
|
+
export interface SharedContextProviderProps {
|
|
7
|
+
providers?: React.JSXElementConstructor<unknown>[];
|
|
8
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
9
|
+
disableInitialStoreRequest?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const DefaultProviders = [
|
|
13
|
+
StoreProvider,
|
|
14
|
+
[QueryClientProvider, { client: queryClient }],
|
|
15
|
+
] as React.JSXElementConstructor<unknown>[];
|
|
16
|
+
|
|
17
|
+
const ContextProvider = ({ providers, children }) => providers.reduceRight(
|
|
18
|
+
(children, parent) => React.cloneElement(parent, { children: children }),
|
|
19
|
+
children
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export const SharedContextProvider = ({ children, disableInitialStoreRequest }: SharedContextProviderProps) => {
|
|
23
|
+
return (
|
|
24
|
+
<QueryClientProvider client={ queryClient }>
|
|
25
|
+
<StoreProvider disableInitialStoreRequest={disableInitialStoreRequest}>
|
|
26
|
+
{ children }
|
|
27
|
+
</StoreProvider>
|
|
28
|
+
</QueryClientProvider>
|
|
29
|
+
);
|
|
30
|
+
};
|
package/src/components/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './SharedContextProvider';
|
|
2
|
-
export * from './Header';
|
|
3
|
-
export * from './Footer';
|
|
4
|
-
export * from './Page';
|
|
5
|
-
export * from './Button';
|
|
6
|
-
export * from './BottomDrawer';
|
|
7
|
-
export * from './Form';
|
|
8
|
-
export * from './Link';
|
|
9
|
-
export * from './Navigation';
|
|
1
|
+
export * from './SharedContextProvider';
|
|
2
|
+
export * from './Header';
|
|
3
|
+
export * from './Footer';
|
|
4
|
+
export * from './Page';
|
|
5
|
+
export * from './Button';
|
|
6
|
+
export * from './BottomDrawer';
|
|
7
|
+
export * from './Form';
|
|
8
|
+
export * from './Link';
|
|
9
|
+
export * from './Navigation';
|
package/src/constants/Icons.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
faBars, faUserTie, faPlus, faXmark, faUser, faUserPlus,
|
|
4
|
-
faCartShopping, faChevronDown, faFilter, faSearch, faQrcode, faCheck
|
|
5
|
-
} from '@fortawesome/free-solid-svg-icons'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
faBars, faUserTie, faPlus, faXmark, faUser, faUserPlus,
|
|
4
|
+
faCartShopping, faChevronDown, faFilter, faSearch, faQrcode, faCheck
|
|
5
|
+
} from '@fortawesome/free-solid-svg-icons'
|
|
6
|
+
|
|
7
|
+
import { faTrashAlt } from '@fortawesome/free-regular-svg-icons';
|
|
8
|
+
|
|
9
|
+
export const icons = {
|
|
10
|
+
faBars,
|
|
11
|
+
faUser,
|
|
12
|
+
faUserTie,
|
|
13
|
+
faPlus,
|
|
14
|
+
faUserPlus,
|
|
15
|
+
faXmark,
|
|
16
|
+
faCartShopping,
|
|
17
|
+
faChevronDown,
|
|
18
|
+
faFilter,
|
|
19
|
+
faSearch,
|
|
20
|
+
faQrcode,
|
|
21
|
+
faCheck,
|
|
22
|
+
'fa-thin': faTrashAlt
|
|
23
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
-
|
|
3
|
-
export const queryClient = new QueryClient({
|
|
4
|
-
defaultOptions: {
|
|
5
|
-
queries: {
|
|
6
|
-
refetchOnWindowFocus: false,
|
|
7
|
-
suspense: true,
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
});
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
|
|
3
|
+
export const queryClient = new QueryClient({
|
|
4
|
+
defaultOptions: {
|
|
5
|
+
queries: {
|
|
6
|
+
refetchOnWindowFocus: false,
|
|
7
|
+
suspense: true,
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
});
|
package/src/constants/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './QueryClient'
|
|
2
|
-
export * from './Icons';
|
|
1
|
+
export * from './QueryClient'
|
|
2
|
+
export * from './Icons';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { useSearchParams } from 'react-router-dom';
|
|
4
|
-
import { useStoreQuery } from '../hooks/useStoreQuery';
|
|
5
|
-
import { Store } from '../interfaces/Store';
|
|
6
|
-
|
|
7
|
-
const StoreContext = React.createContext<Store | null>(null);
|
|
8
|
-
|
|
9
|
-
const StoreProvider = ({ children, disableInitialStoreRequest }: { disableInitialStoreRequest?: boolean, children: React.ReactElement | React.ReactElement[] }) => {
|
|
10
|
-
const [params] = useSearchParams();
|
|
11
|
-
const { data: store } = useStoreQuery({ id: params.get('storeId') as string, enabled: !disableInitialStoreRequest });
|
|
12
|
-
|
|
13
|
-
return <StoreContext.Provider value={ store }> { children } </StoreContext.Provider>;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const useStoreContext = (): Store => {
|
|
17
|
-
return React.useContext(StoreContext) as Store;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export { StoreProvider, useStoreContext };
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useSearchParams } from 'react-router-dom';
|
|
4
|
+
import { useStoreQuery } from '../hooks/useStoreQuery';
|
|
5
|
+
import { Store } from '../interfaces/Store';
|
|
6
|
+
|
|
7
|
+
const StoreContext = React.createContext<Store | null>(null);
|
|
8
|
+
|
|
9
|
+
const StoreProvider = ({ children, disableInitialStoreRequest }: { disableInitialStoreRequest?: boolean, children: React.ReactElement | React.ReactElement[] }) => {
|
|
10
|
+
const [params] = useSearchParams();
|
|
11
|
+
const { data: store } = useStoreQuery({ id: params.get('storeId') as string, enabled: !disableInitialStoreRequest });
|
|
12
|
+
|
|
13
|
+
return <StoreContext.Provider value={ store }> { children } </StoreContext.Provider>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const useStoreContext = (): Store => {
|
|
17
|
+
return React.useContext(StoreContext) as Store;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { StoreProvider, useStoreContext };
|
package/src/global.scss
CHANGED
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* TODO: Update this code */
|
|
3
|
-
--primary-color: red;
|
|
4
|
-
--white-color: white;
|
|
5
|
-
--grad-bg-button-color: #DADADA;
|
|
6
|
-
--button-border-color: #707070;
|
|
7
|
-
--button-color: #37383A;
|
|
8
|
-
--customer-icon-color: #63B299;
|
|
9
|
-
--default-background-image-color: #D9D9D9;
|
|
10
|
-
--field-border-color: #D5D8D7;
|
|
11
|
-
--page-bg-color: #F9F9F9;
|
|
12
|
-
--page-border-color: #CECECE;
|
|
13
|
-
--page-footer-bg-color: #DEDEDE;
|
|
14
|
-
--app-footer-bg-color: #2C2D2E;
|
|
15
|
-
--app-footer-color: #F5F6F7;
|
|
16
|
-
--app-header-bg-1-color: #F7F7F7;
|
|
17
|
-
--app-header-bg-2-color: #E3E3E3;
|
|
18
|
-
--app-header-bg-3-color: #797979;
|
|
19
|
-
--app-header-bt-border-color: #090909;
|
|
20
|
-
--page-header-bg-color: #282c34;
|
|
21
|
-
--success-color: #64B298;
|
|
22
|
-
--error-color: #E05151;
|
|
23
|
-
--disabled-input: #E8E8E8;
|
|
24
|
-
--job-title-bg: #A83D3D;
|
|
25
|
-
--job-date-info-bg: #E0F0EA;
|
|
26
|
-
--job-date-edit-bg: #F0F0F0;
|
|
27
|
-
--header-border-color: #C7CAC9;
|
|
28
|
-
--grey: #E6E6E6;
|
|
29
|
-
--active-button-color: #35779D;
|
|
30
|
-
--sf-pro: normal normal bold 12px/14px SF Pro Text;
|
|
31
|
-
--delete-bg: #E15151;
|
|
32
|
-
|
|
33
|
-
/* New Code */
|
|
34
|
-
/*** Colors ***/
|
|
35
|
-
// Primary Colors
|
|
36
|
-
--color-black: #2c2d2e;
|
|
37
|
-
--color-black-rgb: 44, 45, 46;
|
|
38
|
-
--color-white: #FFFFFF;
|
|
39
|
-
--color-white-rgb: 255, 255, 255;
|
|
40
|
-
|
|
41
|
-
--color-orange: #FF674C;
|
|
42
|
-
--color-orange-rgb: 255, 103, 76;
|
|
43
|
-
|
|
44
|
-
--color-blue: #09168B;
|
|
45
|
-
--color-blue-rgb: 9, 22, 139;
|
|
46
|
-
|
|
47
|
-
--color-grey-light: #D9D9D9;
|
|
48
|
-
--color-grey-light-rgb: 217, 217, 217;
|
|
49
|
-
--color-grey: #C7CAC9;
|
|
50
|
-
--color-grey-rgb: 199, 202, 201;
|
|
51
|
-
--color-grey-dark: #797979;
|
|
52
|
-
--color-grey-dark-rgb: 121, 121, 121;
|
|
53
|
-
|
|
54
|
-
// Helper Colors
|
|
55
|
-
--color-warning-400: #E36262;
|
|
56
|
-
--color-warning-500: #E05151;
|
|
57
|
-
|
|
58
|
-
--color-confirmation-400: #73b9a2;
|
|
59
|
-
--color-confirmation-600: #64B298;
|
|
60
|
-
|
|
61
|
-
/*** Font Styles ***/
|
|
62
|
-
// Font Family
|
|
63
|
-
--font-family-primary: SF Pro;
|
|
64
|
-
|
|
65
|
-
// Font Weight
|
|
66
|
-
--font-weight-light: 300;
|
|
67
|
-
--font-weight-regular: 400;
|
|
68
|
-
--font-weight-medium: 500;
|
|
69
|
-
--font-weight-semibold: 600;
|
|
70
|
-
--font-weight-bold: 700;
|
|
71
|
-
|
|
72
|
-
// Font Styles
|
|
73
|
-
--font-style-normal: normal;
|
|
74
|
-
--font-style-italic: italic;
|
|
75
|
-
|
|
76
|
-
// Font Sizes
|
|
77
|
-
--font-size-body-1: 10px;
|
|
78
|
-
--font-size-body-2: 12px;
|
|
79
|
-
--font-size-body-3: 14px;
|
|
80
|
-
--font-size-body-4: 16px;
|
|
81
|
-
--font-size-body-5: 18px;
|
|
82
|
-
--font-size-body-6: 20px;
|
|
83
|
-
|
|
84
|
-
--font-size-h1: 46px;
|
|
85
|
-
--font-size-h2: 40px;
|
|
86
|
-
--font-size-h3: 36px;
|
|
87
|
-
--font-size-h4: 30px;
|
|
88
|
-
--font-size-h5: 24px;
|
|
89
|
-
|
|
90
|
-
--font-size-body-base: var(--font-size-body-4);
|
|
91
|
-
--font-size-label: var(--font-size-body-3);
|
|
92
|
-
|
|
93
|
-
/*** CTAs ***/
|
|
94
|
-
// Button Default
|
|
95
|
-
--button-default-background: var(--color-orange);
|
|
96
|
-
--button-default-text-color: var(--color-white);
|
|
97
|
-
--button-default-background-hover-color: rgba(var(--color-orange-rgb), .9);
|
|
98
|
-
--button-default-text-hover-color: var(--color-white);
|
|
99
|
-
--button-default-background-focus-color: var(--color-grey-dark);
|
|
100
|
-
--button-default-text-focus-color: rgba(var(--color-white-rgb), .8);
|
|
101
|
-
|
|
102
|
-
// Button Style 1
|
|
103
|
-
--button-style-1-background: var(--color-black);
|
|
104
|
-
--button-style-1-text-color: var(--color-white);
|
|
105
|
-
--button-style-1-background-hover-color: rgba(var(--color-black-rgb), .9);
|
|
106
|
-
--button-style-1-text-hover-color: var(--color-white);
|
|
107
|
-
--button-style-1-background-focus-color: var(--color-grey-dark);
|
|
108
|
-
--button-style-1-text-focus-color: rgba(var(--color-white-rgb), .8);
|
|
109
|
-
|
|
110
|
-
// Button Disabled
|
|
111
|
-
--button-disabled-background-color: var(--color-grey-dark);
|
|
112
|
-
--button-disabled-default-text-color: var(--color-white);
|
|
113
|
-
|
|
114
|
-
// Link
|
|
115
|
-
--link-color: var(--color-orange);
|
|
116
|
-
--link-hover-color: var(--color-black);
|
|
117
|
-
--link-focus-color: rgba(var(--color-orange), .9);
|
|
118
|
-
--link-disabled-color: rgba(var(--color-grey), .2);
|
|
119
|
-
|
|
120
|
-
// Transition Speed
|
|
121
|
-
--transition-slow: .2s;
|
|
122
|
-
--transition: .6s;
|
|
123
|
-
--transition-fast: 1s;
|
|
124
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
/* TODO: Update this code */
|
|
3
|
+
--primary-color: red;
|
|
4
|
+
--white-color: white;
|
|
5
|
+
--grad-bg-button-color: #DADADA;
|
|
6
|
+
--button-border-color: #707070;
|
|
7
|
+
--button-color: #37383A;
|
|
8
|
+
--customer-icon-color: #63B299;
|
|
9
|
+
--default-background-image-color: #D9D9D9;
|
|
10
|
+
--field-border-color: #D5D8D7;
|
|
11
|
+
--page-bg-color: #F9F9F9;
|
|
12
|
+
--page-border-color: #CECECE;
|
|
13
|
+
--page-footer-bg-color: #DEDEDE;
|
|
14
|
+
--app-footer-bg-color: #2C2D2E;
|
|
15
|
+
--app-footer-color: #F5F6F7;
|
|
16
|
+
--app-header-bg-1-color: #F7F7F7;
|
|
17
|
+
--app-header-bg-2-color: #E3E3E3;
|
|
18
|
+
--app-header-bg-3-color: #797979;
|
|
19
|
+
--app-header-bt-border-color: #090909;
|
|
20
|
+
--page-header-bg-color: #282c34;
|
|
21
|
+
--success-color: #64B298;
|
|
22
|
+
--error-color: #E05151;
|
|
23
|
+
--disabled-input: #E8E8E8;
|
|
24
|
+
--job-title-bg: #A83D3D;
|
|
25
|
+
--job-date-info-bg: #E0F0EA;
|
|
26
|
+
--job-date-edit-bg: #F0F0F0;
|
|
27
|
+
--header-border-color: #C7CAC9;
|
|
28
|
+
--grey: #E6E6E6;
|
|
29
|
+
--active-button-color: #35779D;
|
|
30
|
+
--sf-pro: normal normal bold 12px/14px SF Pro Text;
|
|
31
|
+
--delete-bg: #E15151;
|
|
32
|
+
|
|
33
|
+
/* New Code */
|
|
34
|
+
/*** Colors ***/
|
|
35
|
+
// Primary Colors
|
|
36
|
+
--color-black: #2c2d2e;
|
|
37
|
+
--color-black-rgb: 44, 45, 46;
|
|
38
|
+
--color-white: #FFFFFF;
|
|
39
|
+
--color-white-rgb: 255, 255, 255;
|
|
40
|
+
|
|
41
|
+
--color-orange: #FF674C;
|
|
42
|
+
--color-orange-rgb: 255, 103, 76;
|
|
43
|
+
|
|
44
|
+
--color-blue: #09168B;
|
|
45
|
+
--color-blue-rgb: 9, 22, 139;
|
|
46
|
+
|
|
47
|
+
--color-grey-light: #D9D9D9;
|
|
48
|
+
--color-grey-light-rgb: 217, 217, 217;
|
|
49
|
+
--color-grey: #C7CAC9;
|
|
50
|
+
--color-grey-rgb: 199, 202, 201;
|
|
51
|
+
--color-grey-dark: #797979;
|
|
52
|
+
--color-grey-dark-rgb: 121, 121, 121;
|
|
53
|
+
|
|
54
|
+
// Helper Colors
|
|
55
|
+
--color-warning-400: #E36262;
|
|
56
|
+
--color-warning-500: #E05151;
|
|
57
|
+
|
|
58
|
+
--color-confirmation-400: #73b9a2;
|
|
59
|
+
--color-confirmation-600: #64B298;
|
|
60
|
+
|
|
61
|
+
/*** Font Styles ***/
|
|
62
|
+
// Font Family
|
|
63
|
+
--font-family-primary: SF Pro;
|
|
64
|
+
|
|
65
|
+
// Font Weight
|
|
66
|
+
--font-weight-light: 300;
|
|
67
|
+
--font-weight-regular: 400;
|
|
68
|
+
--font-weight-medium: 500;
|
|
69
|
+
--font-weight-semibold: 600;
|
|
70
|
+
--font-weight-bold: 700;
|
|
71
|
+
|
|
72
|
+
// Font Styles
|
|
73
|
+
--font-style-normal: normal;
|
|
74
|
+
--font-style-italic: italic;
|
|
75
|
+
|
|
76
|
+
// Font Sizes
|
|
77
|
+
--font-size-body-1: 10px;
|
|
78
|
+
--font-size-body-2: 12px;
|
|
79
|
+
--font-size-body-3: 14px;
|
|
80
|
+
--font-size-body-4: 16px;
|
|
81
|
+
--font-size-body-5: 18px;
|
|
82
|
+
--font-size-body-6: 20px;
|
|
83
|
+
|
|
84
|
+
--font-size-h1: 46px;
|
|
85
|
+
--font-size-h2: 40px;
|
|
86
|
+
--font-size-h3: 36px;
|
|
87
|
+
--font-size-h4: 30px;
|
|
88
|
+
--font-size-h5: 24px;
|
|
89
|
+
|
|
90
|
+
--font-size-body-base: var(--font-size-body-4);
|
|
91
|
+
--font-size-label: var(--font-size-body-3);
|
|
92
|
+
|
|
93
|
+
/*** CTAs ***/
|
|
94
|
+
// Button Default
|
|
95
|
+
--button-default-background: var(--color-orange);
|
|
96
|
+
--button-default-text-color: var(--color-white);
|
|
97
|
+
--button-default-background-hover-color: rgba(var(--color-orange-rgb), .9);
|
|
98
|
+
--button-default-text-hover-color: var(--color-white);
|
|
99
|
+
--button-default-background-focus-color: var(--color-grey-dark);
|
|
100
|
+
--button-default-text-focus-color: rgba(var(--color-white-rgb), .8);
|
|
101
|
+
|
|
102
|
+
// Button Style 1
|
|
103
|
+
--button-style-1-background: var(--color-black);
|
|
104
|
+
--button-style-1-text-color: var(--color-white);
|
|
105
|
+
--button-style-1-background-hover-color: rgba(var(--color-black-rgb), .9);
|
|
106
|
+
--button-style-1-text-hover-color: var(--color-white);
|
|
107
|
+
--button-style-1-background-focus-color: var(--color-grey-dark);
|
|
108
|
+
--button-style-1-text-focus-color: rgba(var(--color-white-rgb), .8);
|
|
109
|
+
|
|
110
|
+
// Button Disabled
|
|
111
|
+
--button-disabled-background-color: var(--color-grey-dark);
|
|
112
|
+
--button-disabled-default-text-color: var(--color-white);
|
|
113
|
+
|
|
114
|
+
// Link
|
|
115
|
+
--link-color: var(--color-orange);
|
|
116
|
+
--link-hover-color: var(--color-black);
|
|
117
|
+
--link-focus-color: rgba(var(--color-orange), .9);
|
|
118
|
+
--link-disabled-color: rgba(var(--color-grey), .2);
|
|
119
|
+
|
|
120
|
+
// Transition Speed
|
|
121
|
+
--transition-slow: .2s;
|
|
122
|
+
--transition: .6s;
|
|
123
|
+
--transition-fast: 1s;
|
|
124
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { EvaluationCycle } from '../interfaces/EvaluationCycle';
|
|
3
|
-
import { putAuth0 } from '../services/ApiService';
|
|
4
|
-
|
|
5
|
-
export const activateEvaluationCycleQueryHook = () => {
|
|
6
|
-
const queryClient = useQueryClient();
|
|
7
|
-
return useMutation<EvaluationCycle, unknown, EvaluationCycle>((data: EvaluationCycle) => {
|
|
8
|
-
return putAuth0(`/APE/EvaluationCycle/Activate/${data.Id}`, undefined, data)
|
|
9
|
-
}, {
|
|
10
|
-
onSuccess: (data: EvaluationCycle) => {
|
|
11
|
-
queryClient.setQueryData(
|
|
12
|
-
['EVALUATION_CYCLE_ID_QUERY'], data);
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
}
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { EvaluationCycle } from '../interfaces/EvaluationCycle';
|
|
3
|
+
import { putAuth0 } from '../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export const activateEvaluationCycleQueryHook = () => {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
return useMutation<EvaluationCycle, unknown, EvaluationCycle>((data: EvaluationCycle) => {
|
|
8
|
+
return putAuth0(`/APE/EvaluationCycle/Activate/${data.Id}`, undefined, data)
|
|
9
|
+
}, {
|
|
10
|
+
onSuccess: (data: EvaluationCycle) => {
|
|
11
|
+
queryClient.setQueryData(
|
|
12
|
+
['EVALUATION_CYCLE_ID_QUERY'], data);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|