File size: 27,068 Bytes
a3d1c9c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 |
Filename,Content
index.tsx,"/* eslint-disable react/jsx-filename-extension */
import React from 'react';
import { createRoot } from 'react-dom/client';
import navigationService from '@common/navigation/NavigationService';
import App from './App';
import('./store');
const container = document.getElementById('root');
const root = createRoot(container);
root.render(<App />);
//@ts-ignore
if (module?.hot) {
//@ts-ignore
module.hot.accept(function (err) {
console.log('An error occurred while accepting new version: ', err);
});
}
window.onpopstate = () => {
navigationService.goBack();
};
"
App.tsx,"/* eslint-disable import/no-named-as-default */
/* eslint-disable no-useless-constructor */
/* eslint-disable import/no-named-as-default-member */
/* eslint-disable import/extensions */
import React from 'react';
import { Provider } from 'react-redux';
import BasePropTypes from '@common/models/BasePropTypes';
import { routeManager } from '@protolibrary/core';
import storeConfiguration from './store';
import './assets/css/tooltip.css';
import './assets/fonts/style.scss';
import './assets/colors/style.scss';
import './assets/css/main.scss';
import 'prototable/index.css';
import { ThemeApp } from './ThemeApp';
import { ErrorBoundary } from 'react-error-boundary';
import ErrorFallback from '@common/error/ErrorFallback';
import LocalStorage from '@common/storage/Storage';
class App extends React.Component<BasePropTypes, { theme: any }> {
constructor(props: BasePropTypes) {
super(props);
}
UNSAFE_componentWillMount(): void {
routeManager.generateRoutes('', {}, {}, '', {});
LocalStorage.delete('x-app-version');
}
render(): React.ReactNode {
return (
// eslint-disable-next-line react/jsx-filename-extension
<ErrorBoundary
FallbackComponent={ErrorFallback}
onReset={details => {
// Reset the state of your app so the error doesn't happen again
}}
onError={(error, componentStack) => {
// Do something with the runtime error
}}
>
<Provider store={storeConfiguration}>
<ThemeApp />
<div id=""portal-root"" style={{ position: 'relative' }} />
</Provider>
</ErrorBoundary>
);
}
}
export default App;
"
ThemeApp.tsx,"import ProtoContextProvider from '@common/hocs/ProtoContext';
import { ConnectedRouter } from '@protolibrary/core';
import React, { useEffect, useState } from 'react';
import AppMain from './AppMain';
import storeConfiguration from './store';
import { DARK_THEME, LIGHT_THEME } from './themes';
import { default as ProtoProvider } from '@protoweb/provider';
import { Route } from 'react-router-dom';
import { useStore } from '@core/states';
import Block from '@protoweb/block';
import NewVersionModal from '@common/modals/NewVersionModal';
import appState from '@core/states/AppState';
interface Props {}
export const ThemeApp = (props: Props) => {
const { theme, newVersion } = useStore('appState');
const [showModal, setShowModal] = useState(false);
useEffect(() => {
if (newVersion) {
setShowModal(true);
}
}, [newVersion]);
return (
<Block
className={theme === 'LIGHT' ? 'proto-light-theme' : 'proto-dark-theme'}
style={{ flexDirection: 'row', flex: 1, width: '100%', position: 'relative' }}
>
<ProtoProvider theme={theme === 'LIGHT' ? LIGHT_THEME : DARK_THEME}>
<ProtoContextProvider>
<ConnectedRouter store={storeConfiguration}>
<Route component={AppMain} />
</ConnectedRouter>
</ProtoContextProvider>
</ProtoProvider>
<NewVersionModal
show={showModal}
onClose={() => {
setShowModal(false);
appState.update({ newVersion: false });
}}
/>
</Block>
);
};
"
store.tsx,"import { configure, addAjaxEnricher, routeReducer } from '@protolibrary/core';
import setupAxiosInterceptors from './core/configuration/axios';
import ajaxEnricher from './core/configuration/enricher';
setupAxiosInterceptors();
addAjaxEnricher(ajaxEnricher);
const storeConfiguration = configure({ routing: routeReducer }, []);
export default storeConfiguration;
"
UserCreateUpdate.tsx,"import InputLayout from '@common/components/input-layout';
import PageHeader from '@common/components/page-header';
import RemoteSelect from '@common/components/remote-select';
import navigationService from '@common/navigation/NavigationService';
import { NavigationOperationType } from '@common/navigation/NavigationTypes';
import toastManager from '@common/toast/ToastManager';
import { TextField, Form, Col, Container, Row, Button } from '@protolibrary/components';
import { email, required } from '@protoweb/utils';
import roleService from '@services/RoleService';
import userService, { User } from '@services/UserService';
import { useLocationParams } from '@utils/LocationUtils';
import React, { useEffect, useState } from 'react';
import PasswordInput from '@common/components/password-input';
const UserCreateUpdate = props => {
const { operationType, id } = useLocationParams(props);
const [data, setData] = useState<User>(null);
const refForm = React.useRef(null);
const handleOnSubmit = () => {
const values = refForm.current.getValues();
if (operationType === NavigationOperationType.CREATE) {
const request: User = {
userName: values.userName,
firstName: values.firstName,
lastName: values.lastName,
roleIds: values.roleIds,
email: values.email,
};
userService.post(request, { password: values.password }).then(res => {
toastManager.show('success', 'Kullanıcı basariyla olusturuldu');
navigationService.push('/system-management/user-management');
});
} else if (operationType === NavigationOperationType.UPDATE) {
const request: User = {
id: data?.id,
userName: data?.userName,
firstName: values.firstName,
lastName: values.lastName,
email: values.email,
roleIds: values.roleIds,
};
userService.put(request).then(res => {
toastManager.show('success', 'Kullanıcı başarıyla guncellendi');
navigationService.push('/system-management/user-management');
});
}
};
useEffect(() => {
operationType === NavigationOperationType.UPDATE &&
userService.get(id).then(res => {
setData(res);
refForm.current.setValues(res);
});
}, []);
return (
<Container fluid>
<Form ref={refForm} onSubmit={handleOnSubmit}>
<PageHeader
backButton
title={
operationType === NavigationOperationType.CREATE
? 'Kullanıcı Olustur'
: 'Kullanıcı Güncelle'
}
>
<Button type=""submit"" text=""Kaydet"" className=""proto-button-secondary"" />
</PageHeader>
{operationType === NavigationOperationType.CREATE ? (
<Row>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Kullanıcı Adı"">
<TextField name=""userName"" validations={[required('')]} />
</InputLayout>
</Col>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Parola"">
<PasswordInput name=""password"" validations={[required('')]} />
</InputLayout>
</Col>
</Row>
) : null}
<Row>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Ad"">
<TextField name=""firstName"" validations={[required('')]} />
</InputLayout>
</Col>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Soyad"">
<TextField name=""lastName"" validations={[required('')]} />
</InputLayout>
</Col>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Email"">
<TextField name=""email"" validations={[required(''), email('')]} />
</InputLayout>
</Col>
</Row>
<Row>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Yetkili Roller"">
<RemoteSelect
placeholder=""Seciniz""
name=""roleIds""
mode=""multi""
validations={[required('')]}
service={roleService.getList}
/>
</InputLayout>
</Col>
</Row>
</Form>
</Container>
);
};
export default UserCreateUpdate;
import React from 'react';
import BasePropTypes from '@common/models/BasePropTypes';
import { Block, BackgroundImage, Label } from '@protolibrary/components';
import COLORS from '@resources/colors';
interface LoginPropTypes extends BasePropTypes {
fromCaptcha: boolean;
}
const WelcomePage: React.FC<LoginPropTypes> = () => {
return (
<BackgroundImage
path=""/public/images/login_background.jpg""
className=""""
style={{
backgroundSize: 'cover',
justifyContent: 'space-between',
display: 'flex',
flex: 1,
flexDirection: 'row',
}}
>
<Block style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Block style={{ padding: 75 }}>
<Block style={{ flexDirection: 'row' }}>
<Label
style={{
element: {
fontSize: 32,
fontWeight: 400,
color: COLORS.BLACK,
fontFamily: 'Poppins',
},
}}
text=""Proto""
/>
<Label
style={{
container: {
paddingLeft: 10,
},
element: {
fontSize: 32,
fontWeight: 600,
color: COLORS.BLACK,
fontFamily: 'Poppins',
},
}}
text=""Yazilim""
/>
</Block>
<Label
text=""UYGULAMASINA HOŞGELDİNİZ""
style={{
container: {
display: 'flex',
justifyContent: 'center',
},
element: {
fontSize: 30,
fontWeight: 275,
color: COLORS.BLACK,
fontFamily: 'Poppins',
},
}}
/>
</Block>
</Block>
</BackgroundImage>
);
};
export default WelcomePage;
import React from 'react';
import { Button, Col, Container, Form, Row } from '@protolibrary/components';
import PageHeader from '@common/components/page-header';
import InputLayout from '@common/components/input-layout';
import PasswordInput from '@common/components/password-input';
import { required } from '@protoweb/utils';
import userService from '@services/UserService';
import toastManager from '@common/toast/ToastManager';
import { useLocationParams } from '@utils/LocationUtils';
import navigationService from '@common/navigation/NavigationService';
const ResetPassword = props => {
const { id, userName, fullName } = useLocationParams(props);
const refForm = React.useRef(null);
const handleOnSubmit = () => {
const values = refForm.current.getValues();
userService.resetPassword(id, { newPassword: values.newPassword }).then(_ => {
toastManager.show('success', 'Şifre başarıyla sıfırlandı.');
navigationService.push('/system-management/user-management');
});
};
return (
<Container fluid>
<Form ref={refForm} onSubmit={handleOnSubmit}>
<PageHeader title={`${fullName} (${userName}) Kullanıcı Şifresi Sıfırla`}>
<Button type=""submit"" text=""Kaydet"" className=""proto-button-secondary"" />
</PageHeader>
<Row>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Yeni Şifre"">
<PasswordInput
name=""newPassword""
placeholder=""Yeni Şifre""
validations={[required('')]}
/>
</InputLayout>
</Col>
</Row>
</Form>
</Container>
);
};
export default ResetPassword;
import InputLayout from '@common/components/input-layout';
import PageHeader from '@common/components/page-header';
import toastManager from '@common/toast/ToastManager';
import { Form, Col, Container, Row, Button } from '@protolibrary/components';
import { required } from '@protoweb/utils';
import userService, { ChangePasswordData } from '@services/UserService';
import React from 'react';
import PasswordInput from '@common/components/password-input';
const ChangePassword = props => {
const refForm = React.useRef(null);
const handleOnSubmit = () => {
const values = refForm.current.getValues();
const request: ChangePasswordData = {
oldPassword: values.oldPassword,
newPassword: values.newPassword,
newPasswordValidation: values.newPasswordValidation,
};
userService.changePassword(request).then(res => {
toastManager.show('success', 'Şifre başarıyla değiştirildi.');
});
};
return (
<Container fluid>
<Form ref={refForm} onSubmit={handleOnSubmit}>
<PageHeader title=""Şifre Değiştir"">
<Button type=""submit"" text=""Kaydet"" className=""proto-button-secondary"" />
</PageHeader>
<Row>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Eski Şifre"">
<PasswordInput
name=""oldPassword""
placeholder=""Eski Şifre""
validations={[required('')]}
/>
</InputLayout>
</Col>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Yeni Şifre"">
<PasswordInput
name=""newPassword""
placeholder=""Yeni Şifre""
validations={[required('')]}
/>
</InputLayout>
</Col>
<Col xs={12} md={12} lg={4} xl={4}>
<InputLayout label=""Yeni Şifre Tekrar"">
<PasswordInput
name=""newPasswordValidation""
placeholder=""Yeni Şifre Tekrar""
validations={[required('')]}
/>
</InputLayout>
</Col>
</Row>
</Form>
</Container>
);
};
export default ChangePassword;
import { Container } from '@protolibrary/components';
import React from 'react';
import Countdown from '../../components/countdown';
const DashBoard = () => {
return (
<Container style={{ backgroundColor: 'transparent' }}>
<Container>
<Countdown
title=""Under Construction""
footerText=""We will let you know when it is ready!""
timeTillDate=""2024-02-15 00:00:00""
/>
</Container>
</Container>
);
};
export default DashBoard;
import React from 'react';
import BasePropTypes from '@common/models/BasePropTypes';
import {
Block,
Form,
Icon,
TextField,
BackgroundImage,
Label,
Checkbox,
} from '@protolibrary/components';
import Button from '@protoweb/button';
import authService from '@services/AuthService';
import PasswordInput from '@common/components/password-input';
import COLORS from '@resources/colors';
import { LOGO } from '../../layout/assets/icons';
import useLocalization from '@hooks/useLocalization';
interface LoginPropTypes extends BasePropTypes {
fromCaptcha: boolean;
}
const Login: React.FC<LoginPropTypes> = () => {
const formRef = React.useRef<any>();
const { t } = useLocalization();
const handleOnSubmit = (_, formValues): void => {
let values = { userName: formValues?.userName, password: formValues?.password };
authService.login(values, formValues?.rememberMe);
};
const textfieldStyle = () => {
return {
container: {
height: 60,
position: 'relative',
cursor: 'pointer',
},
element: {
paddingLeft: 20,
height: 60,
cursor: 'pointer',
borderRadius: 8,
background: 'white',
borderWidth: 1,
borderStyle: 'solid',
borderColor: COLORS.GRAY,
fontSize: 16,
},
};
};
return (
<Block className=""flex-row"">
<BackgroundImage
path=""/public/images/loginx1.jpg""
className=""""
style={{
backgroundSize: 'cover',
justifyContent: 'space-between',
display: 'flex',
flex: 1,
flexDirection: 'row',
}}
>
<Block style={{ flex: 1, justifyContent: 'flex-end' }}></Block>
</BackgroundImage>
<Block className=""login__container"">
<Block
style={{
justifyContent: 'space-between',
padding: 30,
paddingLeft: 66,
paddingRight: 66,
paddingTop: 200,
display: 'flex',
flex: 1,
width: 500,
margin: 'auto',
}}
>
<Block>
<Form onSubmit={handleOnSubmit} ref={formRef}>
<Block
className=""flex flex-1 justify-content-center""
style={{ width: 259, height: 89, marginBottom: 100, fontSize: 48, margin: 'auto' }}
>
<Icon
className=""flex justify-content-center""
style={{
container: {
marginBottom: 39,
marginLeft: -30,
cursor: 'pointer',
width: 280,
height: 80,
},
element: { width: 150, height: 50, cursor: 'pointer' },
}}
icon={LOGO}
/>
</Block>
<Block style={{ marginBottom: 10 }}>
<TextField
name=""userName""
placeholder={t('login_form_username_placeholder')}
style={textfieldStyle()}
/>
</Block>
<Block style={{ marginBottom: 25 }}>
<PasswordInput
className=""login-password""
name=""password""
placeholder={t('login_form_password_placeholder')}
style={textfieldStyle()}
/>
</Block>
<Block
style={{
flexDirection: 'row',
display: 'flex',
alignItems: 'center',
marginBottom: 70,
}}
>
<Checkbox name={'rememberMe'} />
<Label
text={t('login_form_remember_me')}
style={{
element: {
lineHeight: '21px',
fontWeight: '400',
fontSize: 14,
color: '#444444',
},
}}
/>
</Block>
<Button
text={t('login_form_submit')}
type=""submit""
fullWidth
style={{
element: {
background: COLORS.PRIMARY,
minHeight: 60,
},
container: {
border: '1px solid',
borderColor: COLORS.WHITE,
},
text: {
color: COLORS.WHITE,
fontSize: 20,
fontWeight: 600,
lineHeight: '28px',
},
}}
/>
</Form>
</Block>
</Block>
</Block>
</Block>
);
};
export default Login;
"
AppMain.tsx,"import ErrorManager from '@common/error/ErrorManager';
import * as React from 'react';
import { useSelector } from 'react-redux';
import { Route, Switch } from 'react-router-dom';
import 'react-tippy/dist/tippy.css';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import Loader from './components/Loader';
import { useStore } from '@core/states';
import DashBoard from './pages/authenticated/Dashboard';
import OrderPage from './pages/authenticated/order-management';
import NewOrderPage from './pages/authenticated/order-management/pages/NewOrder';
import Login from './pages/guest/Login';
import navigationService from '@common/navigation/NavigationService';
import 'primeflex/primeflex.css';
import 'react-toastify/dist/ReactToastify.css';
import './assets/css/custom.css';
import './assets/css/main.scss';
import './assets/css/tooltip.css';
import GenericModal from '@components/GenericModal';
import Layout from './layout';
import TaskManagement from './pages/authenticated/task-management';
import RoleManagement from './pages/authenticated/role-management';
import UserManagement from './pages/authenticated/user-management';
import UserCreateUpdate from './pages/authenticated/user-management/pages/UserCreateUpdate';
import CreateUpdateTask from './pages/authenticated/task-management/pages/CreateUpdateTask';
import CreateUpdateRole from './pages/authenticated/role-management/pages/CreateUpdateRole';
import authState from '@core/states/AuthState';
import accountService from '@services/Account';
import NAVIGATION_PATHS from '@common/navigation/NavigationPaths';
import OrderDetail from './pages/authenticated/order-management/pages/OrderDetail';
import OrderVehicleDetail from './pages/authenticated/order-management/pages/OrderVehicleDetail';
import ChangePassword from './pages/authenticated/user-management/pages/ChangePassword';
import ResetPassword from './pages/authenticated/user-management/pages/ResetPassword';
import en from 'public/lang/en.json';
import tr from 'public/lang/tr.json';
import LocalizedStrings from '@localization/LocalizedStrings';
import CustomerManagement from './pages/authenticated/customer-management';
import CustomerCreateUpdate from './pages/authenticated/customer-management/pages/CustomerCreateUpdate';
import ProjectManagement from './pages/authenticated/project-management';
import ProjectCreateUpdate from './pages/authenticated/project-management/pages/ProjectCreateUpdate';
export interface AppMainPropTypes {
authenticated: boolean;
isLoading: boolean;
location: any;
}
function AppMain({ location }: AppMainPropTypes) {
const isAuthenticated = useSelector<any, string>(state => state.authState.authenticated);
const modalStore = useStore('modalState');
const { open, type, closeAction, confirmAction } = modalStore;
const { open: loaderOpen } = useStore('loaderState');
React.useEffect(() => {
const lastRoute = sessionStorage.getItem('routePath');
accountService.getInfo().then(res => {
authState.update({ authenticated: true, roles: res.roles, fullName: res.fullName });
let routeParameters = sessionStorage.getItem('routeParameters');
if (routeParameters && typeof routeParameters === 'string') {
routeParameters = JSON.parse(routeParameters);
}
navigationService.push(
lastRoute || NAVIGATION_PATHS.SYSTEM_MANAGEMENT.ORDER.BASE,
routeParameters,
);
});
}, [isAuthenticated]);
React.useEffect(() => {
new LocalizedStrings({ EN: en, TR: tr });
}, []);
return (
<>
{loaderOpen && <Loader />}
{open && (
<GenericModal type={type} show={open} close={closeAction} confirmAction={confirmAction} />
)}
{isAuthenticated ? (
<Layout>
<Switch>
<Route exact path=""/dashboard"" component={DashBoard} />
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.ORDER.BASE}
component={OrderPage}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.ORDER.DETAIL}
component={OrderDetail}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.ORDER.VEHICLE_DETAIL}
component={OrderVehicleDetail}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.ORDER.CREATE}
component={NewOrderPage}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.TASK_MANAGEMENT.BASE}
component={TaskManagement}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.TASK_MANAGEMENT.CREATE_UPDATE}
component={CreateUpdateTask}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.USER_MANAGEMENT.BASE}
component={UserManagement}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.USER_MANAGEMENT.CREATE_UPDATE}
component={UserCreateUpdate}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.USER_MANAGEMENT.CHANGE_PASSWORD}
component={ChangePassword}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.USER_MANAGEMENT.RESET_PASSWORD}
component={ResetPassword}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.ROLE_MANAGEMENT.BASE}
component={RoleManagement}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.ROLE_MANAGEMENT.CREATE_UPDATE}
component={CreateUpdateRole}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.CUSTOMER_MANAGEMENT.BASE}
component={CustomerManagement}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.CUSTOMER_MANAGEMENT.CREATE_UPDATE}
component={CustomerCreateUpdate}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.PROJECT_MANAGEMENT.BASE}
component={ProjectManagement}
/>
<Route
exact
path={NAVIGATION_PATHS.SYSTEM_MANAGEMENT.PROJECT_MANAGEMENT.CREATE_UPDATE}
component={ProjectCreateUpdate}
/>
</Switch>
</Layout>
) : (
<Switch>
<Route exact path=""/"" component={Login} />
<Route exact path=""/login"" component={Login} />
<Route exact path=""/guest"" component={Login} />
</Switch>
)}
<ToastContainer />
<ErrorManager />
</>
);
}
export default AppMain;
"
|