├── .dockerignore ├── .gitignore ├── Dockerfile ├── package-lock.json ├── package.json ├── public ├── images │ ├── bg-1.jpg │ ├── bg-2.jpg │ ├── bg-3.jpg │ └── bro.png ├── index.html ├── logo-sm.png ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── readme.md └── src ├── App.js ├── App.test.js ├── assets ├── fonts │ ├── boxicons.eot │ ├── boxicons.svg │ ├── boxicons.ttf │ ├── boxicons.woff │ ├── boxicons.woff2 │ ├── dripicons-v2.eot │ ├── dripicons-v2.svg │ ├── dripicons-v2.ttf │ ├── dripicons-v2.woff │ ├── fa-brands-400.eot │ ├── fa-brands-400.svg │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff │ ├── fa-brands-400.woff2 │ ├── fa-regular-400.eot │ ├── fa-regular-400.svg │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.eot │ ├── fa-solid-900.svg │ ├── fa-solid-900.ttf │ ├── fa-solid-900.woff │ ├── fa-solid-900.woff2 │ ├── materialdesignicons-webfont.eot │ ├── materialdesignicons-webfont.ttf │ ├── materialdesignicons-webfont.woff │ ├── materialdesignicons-webfont.woff2 │ ├── montserrat │ │ └── Montserrat-Regular.ttf │ └── myriad │ │ └── Myriad-Light.otf ├── images │ ├── Customers.svg │ ├── Invoices.svg │ ├── NewCustomer.svg │ ├── NewProject.svg │ ├── Projects.svg │ ├── Reports.svg │ ├── adminIcons │ │ └── plusIcon.svg │ ├── auth-bg.jpg │ ├── bg-1.jpg │ ├── bg-2.jpg │ ├── bg-3.jpg │ ├── brands │ │ ├── bitbucket.png │ │ ├── dribbble.png │ │ ├── dropbox.png │ │ ├── github.png │ │ ├── mail_chimp.png │ │ └── slack.png │ ├── error-img.png │ ├── flags │ │ ├── french.jpg │ │ ├── germany.jpg │ │ ├── italy.jpg │ │ ├── russia.jpg │ │ ├── select2 │ │ │ ├── ak.png │ │ │ ├── ca.png │ │ │ ├── hi.png │ │ │ ├── nv.png │ │ │ ├── or.png │ │ │ └── wa.png │ │ ├── spain.jpg │ │ └── us.jpg │ ├── home │ │ └── flowIcon.png │ ├── index.js │ ├── logo-sm-full.png │ ├── logo-sm.png │ ├── logo-sm.svg │ ├── machine-icon.png │ ├── pencil.png │ ├── sidebarIcons │ │ ├── customers.svg │ │ ├── dashboard.svg │ │ ├── invoices.svg │ │ ├── logout.svg │ │ ├── newCustomer.svg │ │ ├── newProject.svg │ │ ├── projects.svg │ │ ├── reports.svg │ │ └── settings.svg │ ├── successIcon.png │ ├── undraw-calendar.svg │ └── users │ │ ├── avatar-1.jpg │ │ ├── avatar-2.jpg │ │ └── avatar-3.jpg └── scss │ ├── _variables.scss │ ├── app.scss │ ├── bootstrap.scss │ ├── custom │ ├── components │ │ ├── _accordion.scss │ │ ├── _alerts.scss │ │ ├── _avatar.scss │ │ ├── _backgrounds.scss │ │ ├── _badge.scss │ │ ├── _breadcrumb.scss │ │ ├── _buttons.scss │ │ ├── _card.scss │ │ ├── _carousel.scss │ │ ├── _demos.scss │ │ ├── _dropdown.scss │ │ ├── _forms.scss │ │ ├── _helper.scss │ │ ├── _modals.scss │ │ ├── _nav.scss │ │ ├── _pagination.scss │ │ ├── _print.scss │ │ ├── _progress.scss │ │ ├── _reboot.scss │ │ ├── _shadow.scss │ │ ├── _table.scss │ │ ├── _toasts.scss │ │ ├── _waves.scss │ │ └── _widgets.scss │ ├── fonts │ │ └── _fonts.scss │ ├── pages │ │ ├── _authentication.scss │ │ ├── _chat.scss │ │ ├── _coming-soon.scss │ │ ├── _email.scss │ │ ├── _extras-pages.scss │ │ └── _timeline.scss │ ├── plugins │ │ ├── _alertify.scss │ │ ├── _apexcharts.scss │ │ ├── _calendar.scss │ │ ├── _choices.scss │ │ ├── _colorpicker.scss │ │ ├── _custom-scrollbar.scss │ │ ├── _datatable.scss │ │ ├── _datepicker.scss │ │ ├── _echarts.scss │ │ ├── _form-editors.scss │ │ ├── _form-upload.scss │ │ ├── _form-wizard.scss │ │ ├── _google-map.scss │ │ ├── _icons.scss │ │ ├── _leaflet-maps.scss │ │ ├── _pristinejs.scss │ │ ├── _range-slider.scss │ │ ├── _responsive-table.scss │ │ ├── _session-timeout.scss │ │ ├── _sparkline-chart.scss │ │ ├── _sweatalert2.scss │ │ ├── _switch.scss │ │ ├── _table-editable.scss │ │ ├── _vector-maps.scss │ │ └── icons │ │ │ ├── _boxicons.scss │ │ │ ├── _dripicons.scss │ │ │ ├── _fontawesome-all.scss │ │ │ └── _materialdesignicons.scss │ ├── rtl │ │ ├── _bootstrap-rtl.scss │ │ ├── _components-rtl.scss │ │ ├── _float-rtl.scss │ │ ├── _general-rtl.scss │ │ ├── _pages-rtl.scss │ │ ├── _plugins-rtl.scss │ │ ├── _spacing-rtl.scss │ │ ├── _structure-rtl.scss │ │ └── _text-rtl.scss │ └── structure │ │ ├── _footer.scss │ │ ├── _general.scss │ │ ├── _horizontal-nav.scss │ │ ├── _layouts.scss │ │ ├── _page-head.scss │ │ ├── _right-sidebar.scss │ │ ├── _topbar.scss │ │ └── _vertical.scss │ ├── icons.scss │ ├── preloader.scss │ └── theme.scss ├── common ├── data │ ├── calender.js │ ├── chat.js │ ├── contacts.js │ ├── crypto.js │ ├── dashboard-saas.js │ ├── dashboard.js │ ├── index.js │ ├── invoices.js │ ├── mails.js │ ├── projects.js │ └── tasks.js └── languages.js ├── components ├── Common │ ├── Breadcrumb.js │ ├── Breadcrumb2.js │ └── openNotificationWithIcon.js ├── CommonForBoth │ ├── Menus │ │ └── LightDark.js │ ├── RightSidebar.js │ ├── TopbarDropdown │ │ ├── LanguageDropdown.js │ │ ├── NotificationDropdown.js │ │ └── ProfileMenu.js │ └── rightbar.scss ├── Customers │ ├── TrComponent.js │ └── TrComponentDetail.js ├── Dashboard │ └── TrComponent.js ├── HorizontalLayout │ ├── Footer.js │ ├── Header.js │ ├── Navbar.js │ └── index.js ├── Invoices │ ├── TrComponent.js │ └── TrNewComponent.js ├── Modal │ ├── comfirmModal.js │ ├── notification.js │ └── successModal.js ├── NonAuthLayout.js ├── Projects │ ├── TrComponent.js │ ├── TrMachines.js │ └── pdf │ │ ├── PdfComponent.js │ │ └── styles.js ├── Reports │ └── TrComponent.js ├── Settings │ └── TrComponent.js └── VerticalLayout │ ├── Footer.js │ ├── Header.js │ ├── Sidebar.js │ ├── SidebarContent.js │ └── index.js ├── config.js ├── constants └── layout.js ├── data ├── comany.js ├── customer.js ├── invoice.js ├── notificate_invite.js ├── project.js ├── report.js ├── role.js ├── swr │ ├── customers │ │ ├── customers.js │ │ └── getCustomers.js │ ├── invoices │ │ ├── invoiceProjectId.js │ │ └── invoices.js │ ├── machines │ │ └── machines.js │ ├── notifications │ │ ├── notificationCompanyAdminData.js │ │ ├── notificationCompanyUserData.js │ │ └── notificationSiteAdminData.js │ ├── projects │ │ ├── project.js │ │ └── projectByCustomerId.js │ └── reports │ │ ├── reports.js │ │ └── reportsDashboard.js └── user.js ├── helpers ├── AuthType │ └── fakeBackend.js ├── api_helper.js ├── backend_helper.js ├── firebase_helper.js ├── jwt-token-access │ ├── accessToken.js │ └── auth-token-header.js └── url_helper.js ├── i18n.js ├── index.js ├── locales ├── eng │ └── translation.json ├── gr │ └── translation.json ├── it │ └── translation.json ├── rs │ └── translation.json └── sp │ └── translation.json ├── pages ├── Admin │ └── Transactions │ │ ├── index.js │ │ └── styles.js ├── Authentication │ ├── AdminLogin.js │ ├── CarouselPage.js │ ├── ForgetPassword.js │ ├── Login.js │ ├── Logout.js │ ├── Register.js │ ├── ResetPasssword.js │ ├── VerifyEmail.js │ └── user-profile.js ├── Customers │ ├── detail.js │ ├── edit.js │ ├── index.js │ └── styles.js ├── Dashboard │ ├── index.js │ └── styles.js ├── Homepage │ ├── index.js │ └── styles.js ├── Invoices │ ├── generated.js │ ├── index.js │ ├── styles.js │ ├── view-original.js │ └── view.js ├── NewCoustomer │ ├── index.js │ └── styles.js ├── NewProject │ ├── index.js │ └── styles.js ├── Pdf │ ├── invoice.js │ ├── invoice_new.js │ └── report.js ├── Projects │ ├── addMachine.js │ ├── edit.js │ ├── editMachine.js │ ├── index.js │ ├── machines.js │ ├── print.js │ ├── printDops.js │ └── styles.js ├── Reports │ ├── generated.js │ ├── index.js │ ├── styles.js │ └── view.js ├── Settings │ ├── Affairs.js │ ├── Companies.js │ ├── CompaniesBankCheck.js │ ├── Signature.js │ ├── affairs-manage.js │ ├── comapnay-manage.js │ ├── index.js │ ├── setting-manage.js │ ├── styles.js │ └── transactions.js └── Stripe │ ├── index.js │ └── styles.js ├── reportWebVitals.js ├── routes ├── allRoutes.js └── middleware │ └── Authmiddleware.js ├── setupTests.js └── store ├── actions.js ├── auth ├── forgetpwd │ ├── actionTypes.js │ ├── actions.js │ ├── reducer.js │ └── saga.js ├── login │ ├── actionTypes.js │ ├── actions.js │ ├── reducer.js │ └── saga.js ├── profile │ ├── actionTypes.js │ ├── actions.js │ ├── reducer.js │ └── saga.js └── register │ ├── actionTypes.js │ ├── actions.js │ ├── reducer.js │ └── saga.js ├── calendar ├── actionTypes.js ├── actions.js ├── reducer.js └── saga.js ├── chat ├── actionTypes.js ├── actions.js ├── reducer.js └── saga.js ├── contacts ├── actionTypes.js ├── actions.js ├── reducer.js └── saga.js ├── index.js ├── invoices ├── actionTypes.js ├── actions.js ├── reducer.js └── saga.js ├── layout ├── actionTypes.js ├── actions.js ├── reducer.js └── saga.js ├── reducers.js ├── reports ├── actionTypes.js ├── actions.js ├── reducer.js └── saga.js └── sagas.js /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .git 3 | .gitignore 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | .env.dev 18 | .env.prod 19 | 20 | yarn.lock 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14.20.0 2 | 3 | WORKDIR /app 4 | 5 | COPY package.json ./ 6 | 7 | RUN npm cache clean --force 8 | 9 | RUN rm -rf node_modules 10 | 11 | RUN npm install 12 | 13 | COPY . . 14 | 15 | EXPOSE 3000 16 | 17 | CMD ["npm", "start"] -------------------------------------------------------------------------------- /public/images/bg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/public/images/bg-1.jpg -------------------------------------------------------------------------------- /public/images/bg-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/public/images/bg-2.jpg -------------------------------------------------------------------------------- /public/images/bg-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/public/images/bg-3.jpg -------------------------------------------------------------------------------- /public/images/bro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/public/images/bro.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | DOP Test Network 28 | 34 | 39 | 40 | 41 | 42 |
43 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /public/logo-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/public/logo-sm.png -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "logo-sm.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types' 2 | import React from "react" 3 | 4 | import { Switch, BrowserRouter as Router } from "react-router-dom" 5 | import { connect } from "react-redux" 6 | 7 | // Import Routes all 8 | import { userRoutes, authRoutes, adminRoutes } from "./routes/allRoutes" 9 | 10 | // Import all middleware 11 | import Authmiddleware from "./routes/middleware/Authmiddleware" 12 | 13 | // layouts Format 14 | import VerticalLayout from "./components/VerticalLayout/" 15 | import HorizontalLayout from "./components/HorizontalLayout/" 16 | import NonAuthLayout from "./components/NonAuthLayout" 17 | 18 | // Import scss 19 | import "./assets/scss/theme.scss" 20 | import "./assets/scss/preloader.scss" 21 | import "antd/dist/antd.css"; 22 | 23 | const App = props => { 24 | 25 | function getLayout() { 26 | let layoutCls = VerticalLayout 27 | switch (props.layout.layoutType) { 28 | case "horizontal": 29 | layoutCls = HorizontalLayout 30 | break 31 | default: 32 | layoutCls = VerticalLayout 33 | break 34 | } 35 | return layoutCls 36 | } 37 | 38 | const Layout = getLayout() 39 | return ( 40 | 41 | 42 | 43 | {authRoutes.map((route, idx) => ( 44 | 53 | ))} 54 | 55 | {userRoutes.map((route, idx) => ( 56 | 65 | ))} 66 | 67 | {adminRoutes.map((route, idx) => ( 68 | 77 | ))} 78 | 79 | 80 | 81 | ) 82 | } 83 | 84 | App.propTypes = { 85 | layout: PropTypes.any 86 | } 87 | 88 | const mapStateToProps = state => { 89 | return { 90 | layout: state.Layout, 91 | } 92 | } 93 | 94 | export default connect(mapStateToProps, null)(App) -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/assets/fonts/boxicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/boxicons.eot -------------------------------------------------------------------------------- /src/assets/fonts/boxicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/boxicons.ttf -------------------------------------------------------------------------------- /src/assets/fonts/boxicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/boxicons.woff -------------------------------------------------------------------------------- /src/assets/fonts/boxicons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/boxicons.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/dripicons-v2.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/dripicons-v2.eot -------------------------------------------------------------------------------- /src/assets/fonts/dripicons-v2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/dripicons-v2.ttf -------------------------------------------------------------------------------- /src/assets/fonts/dripicons-v2.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/dripicons-v2.woff -------------------------------------------------------------------------------- /src/assets/fonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-brands-400.eot -------------------------------------------------------------------------------- /src/assets/fonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /src/assets/fonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-brands-400.woff -------------------------------------------------------------------------------- /src/assets/fonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-regular-400.eot -------------------------------------------------------------------------------- /src/assets/fonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /src/assets/fonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-regular-400.woff -------------------------------------------------------------------------------- /src/assets/fonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-solid-900.eot -------------------------------------------------------------------------------- /src/assets/fonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /src/assets/fonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-solid-900.woff -------------------------------------------------------------------------------- /src/assets/fonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/materialdesignicons-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/materialdesignicons-webfont.eot -------------------------------------------------------------------------------- /src/assets/fonts/materialdesignicons-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/materialdesignicons-webfont.ttf -------------------------------------------------------------------------------- /src/assets/fonts/materialdesignicons-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/materialdesignicons-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/materialdesignicons-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/materialdesignicons-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/montserrat/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/montserrat/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /src/assets/fonts/myriad/Myriad-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/fonts/myriad/Myriad-Light.otf -------------------------------------------------------------------------------- /src/assets/images/Invoices.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/images/NewCustomer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/images/Projects.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/images/Reports.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/images/adminIcons/plusIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/images/auth-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/auth-bg.jpg -------------------------------------------------------------------------------- /src/assets/images/bg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/bg-1.jpg -------------------------------------------------------------------------------- /src/assets/images/bg-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/bg-2.jpg -------------------------------------------------------------------------------- /src/assets/images/bg-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/bg-3.jpg -------------------------------------------------------------------------------- /src/assets/images/brands/bitbucket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/brands/bitbucket.png -------------------------------------------------------------------------------- /src/assets/images/brands/dribbble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/brands/dribbble.png -------------------------------------------------------------------------------- /src/assets/images/brands/dropbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/brands/dropbox.png -------------------------------------------------------------------------------- /src/assets/images/brands/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/brands/github.png -------------------------------------------------------------------------------- /src/assets/images/brands/mail_chimp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/brands/mail_chimp.png -------------------------------------------------------------------------------- /src/assets/images/brands/slack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/brands/slack.png -------------------------------------------------------------------------------- /src/assets/images/error-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/error-img.png -------------------------------------------------------------------------------- /src/assets/images/flags/french.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/french.jpg -------------------------------------------------------------------------------- /src/assets/images/flags/germany.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/germany.jpg -------------------------------------------------------------------------------- /src/assets/images/flags/italy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/italy.jpg -------------------------------------------------------------------------------- /src/assets/images/flags/russia.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/russia.jpg -------------------------------------------------------------------------------- /src/assets/images/flags/select2/ak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/select2/ak.png -------------------------------------------------------------------------------- /src/assets/images/flags/select2/ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/select2/ca.png -------------------------------------------------------------------------------- /src/assets/images/flags/select2/hi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/select2/hi.png -------------------------------------------------------------------------------- /src/assets/images/flags/select2/nv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/select2/nv.png -------------------------------------------------------------------------------- /src/assets/images/flags/select2/or.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/select2/or.png -------------------------------------------------------------------------------- /src/assets/images/flags/select2/wa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/select2/wa.png -------------------------------------------------------------------------------- /src/assets/images/flags/spain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/spain.jpg -------------------------------------------------------------------------------- /src/assets/images/flags/us.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/flags/us.jpg -------------------------------------------------------------------------------- /src/assets/images/home/flowIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/home/flowIcon.png -------------------------------------------------------------------------------- /src/assets/images/index.js: -------------------------------------------------------------------------------- 1 | import avatar1 from "./users/avatar-1.jpg" 2 | import avatar2 from "./users/avatar-2.jpg" 3 | import avatar3 from "./users/avatar-3.jpg" 4 | import avatar4 from "./users/avatar-4.jpg" 5 | import avatar5 from "./users/avatar-5.jpg" 6 | import avatar6 from "./users/avatar-6.jpg" 7 | import avatar7 from "./users/avatar-7.jpg" 8 | import avatar8 from "./users/avatar-8.jpg" 9 | 10 | export { 11 | avatar1, 12 | avatar2, 13 | avatar3, 14 | avatar4, 15 | avatar5, 16 | avatar6, 17 | avatar7, 18 | avatar8, 19 | } 20 | -------------------------------------------------------------------------------- /src/assets/images/logo-sm-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/logo-sm-full.png -------------------------------------------------------------------------------- /src/assets/images/logo-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/logo-sm.png -------------------------------------------------------------------------------- /src/assets/images/logo-sm.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/images/machine-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/machine-icon.png -------------------------------------------------------------------------------- /src/assets/images/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/pencil.png -------------------------------------------------------------------------------- /src/assets/images/sidebarIcons/dashboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/assets/images/sidebarIcons/invoices.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/assets/images/sidebarIcons/logout.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/images/sidebarIcons/projects.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/assets/images/sidebarIcons/reports.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/assets/images/sidebarIcons/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/assets/images/successIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/successIcon.png -------------------------------------------------------------------------------- /src/assets/images/users/avatar-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/users/avatar-1.jpg -------------------------------------------------------------------------------- /src/assets/images/users/avatar-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/users/avatar-2.jpg -------------------------------------------------------------------------------- /src/assets/images/users/avatar-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/topdev0929/dopsite-frontend/6e3374b75a02db064c878c61f9a2ae455eb5e16e/src/assets/images/users/avatar-3.jpg -------------------------------------------------------------------------------- /src/assets/scss/app.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Template Name: Minia - Admin & Dashboard Template 3 | Author: Themesbrand 4 | Version: 1.0.0 5 | Website: https://themesbrand.com/ 6 | Contact: themesbrand@gmail.com 7 | File: Main Css File 8 | */ 9 | 10 | 11 | //Fonts 12 | @import "custom/fonts/fonts"; 13 | 14 | //Core files 15 | @import "./node_modules/bootstrap/scss/functions"; 16 | @import "./node_modules/bootstrap/scss/variables"; 17 | @import "variables"; 18 | @import "./node_modules/bootstrap/scss/mixins.scss"; 19 | 20 | // Structure 21 | @import "custom/structure/general"; 22 | @import "custom/structure/topbar"; 23 | @import "custom/structure/page-head"; 24 | @import "custom/structure/footer"; 25 | @import "custom/structure/right-sidebar"; 26 | @import "custom/structure/vertical"; 27 | @import "custom/structure/horizontal-nav"; 28 | @import "custom/structure/layouts"; 29 | 30 | // Components 31 | @import "custom/components/waves"; 32 | @import "custom/components/accordion"; 33 | @import "custom/components/avatar"; 34 | @import "custom/components/helper"; 35 | @import "custom/components/modals"; 36 | @import "custom/components/forms"; 37 | @import "custom/components/widgets"; 38 | @import "custom/components/toasts"; 39 | @import "custom/components/demos"; 40 | @import "custom/components/print"; 41 | 42 | // Plugins 43 | @import "custom/plugins/custom-scrollbar"; 44 | @import "custom/plugins/calendar"; 45 | @import "custom/plugins/session-timeout"; 46 | @import "custom/plugins/range-slider"; 47 | @import "custom/plugins/sweatalert2"; 48 | @import "custom/plugins/alertify"; 49 | @import "custom/plugins/pristinejs"; 50 | @import "custom/plugins/choices"; 51 | @import "custom/plugins/switch"; 52 | @import "custom/plugins/colorpicker"; 53 | @import "custom/plugins/datepicker"; 54 | @import "custom/plugins/form-editors"; 55 | @import "custom/plugins/form-upload"; 56 | @import "custom/plugins/form-wizard"; 57 | @import "custom/plugins/datatable"; 58 | @import "custom/plugins/responsive-table"; 59 | @import "custom/plugins/table-editable"; 60 | @import "custom/plugins/apexcharts"; 61 | @import "custom/plugins/echarts"; 62 | @import "custom/plugins/sparkline-chart"; 63 | @import "custom/plugins/google-map"; 64 | @import "custom/plugins/vector-maps"; 65 | @import "custom/plugins/leaflet-maps"; 66 | 67 | 68 | // Pages 69 | @import "custom/pages/authentication"; 70 | @import "custom/pages/email"; 71 | @import "custom/pages/chat"; 72 | @import "custom/pages/coming-soon"; 73 | @import "custom/pages/timeline"; 74 | @import "custom/pages/extras-pages"; 75 | -------------------------------------------------------------------------------- /src/assets/scss/bootstrap.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Template Name: Minia - Admin & Dashboard Template 3 | Author: Themesbrand 4 | Version: 1.0.0 5 | Website: https://themesbrand.com/ 6 | Contact: themesbrand@gmail.com 7 | File: Custom Bootstrap Css File 8 | */ 9 | 10 | 11 | //Core files 12 | @import "./node_modules/bootstrap/scss/functions"; 13 | @import "./node_modules/bootstrap/scss/variables"; 14 | @import "variables"; 15 | @import "./node_modules/bootstrap/scss/bootstrap"; 16 | 17 | @import "custom/components/reboot"; 18 | @import "custom/components/alerts"; 19 | @import "custom/components/backgrounds"; 20 | @import "custom/components/badge"; 21 | @import "custom/components/buttons"; 22 | @import "custom/components/breadcrumb"; 23 | @import "custom/components/carousel"; 24 | @import "custom/components/card"; 25 | @import "custom/components/dropdown"; 26 | @import "custom/components/nav"; 27 | @import "custom/components/table"; 28 | @import "custom/components/pagination"; 29 | @import "custom/components/progress"; 30 | @import "custom/components/shadow"; -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_accordion.scss: -------------------------------------------------------------------------------- 1 | // 2 | // accordion.scss 3 | // 4 | 5 | body[data-layout-mode="dark"] { 6 | 7 | // accordion 8 | 9 | .accordion-button{ 10 | border-color: $gray-dark-300; 11 | color: $gray-dark-600; 12 | &:not(.collapsed){ 13 | background-color: rgba($primary, 0.2); 14 | color: $primary; 15 | } 16 | } 17 | 18 | .accordion-item{ 19 | border-color: $gray-dark-300; 20 | } 21 | 22 | .accordion-collapse{ 23 | border-color: $gray-dark-300; 24 | } 25 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_avatar.scss: -------------------------------------------------------------------------------- 1 | // 2 | // avatar.scss 3 | // 4 | 5 | .avatar-xs { 6 | height: 1rem; 7 | width: 1rem; 8 | } 9 | 10 | .avatar-sm { 11 | height: 2rem; 12 | width: 2rem; 13 | } 14 | 15 | .avatar-md { 16 | height: 3rem; 17 | width: 3rem; 18 | } 19 | 20 | .avatar-lg { 21 | height: 4rem; 22 | width: 4rem; 23 | } 24 | 25 | .avatar-xl { 26 | height: 5rem; 27 | width: 5rem; 28 | } 29 | 30 | .avatar-title { 31 | align-items: center; 32 | background-color: $primary; 33 | color: $white; 34 | display: flex; 35 | font-weight: $font-weight-medium; 36 | height: 100%; 37 | justify-content: center; 38 | width: 100%; 39 | } 40 | 41 | // avatar group 42 | .avatar-group { 43 | padding-left: 12px; 44 | display: flex; 45 | flex-wrap: wrap; 46 | .avatar-group-item { 47 | margin-left: -12px; 48 | border: 2px solid $card-bg; 49 | border-radius: 50%; 50 | transition: all 0.2s; 51 | &:hover{ 52 | position: relative; 53 | transform: translateY(-2px); 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_backgrounds.scss: -------------------------------------------------------------------------------- 1 | // 2 | // backgrounds.scss 3 | // 4 | 5 | 6 | @each $color, 7 | $value in $theme-colors { 8 | .bg-soft-#{$color} { 9 | background-color: rgba(($value), 0.25) !important; 10 | } 11 | } 12 | 13 | 14 | body[data-layout-mode="dark"] { 15 | // Background Colors 16 | .bg-light { 17 | background-color: $gray-dark-300 !important; 18 | } 19 | 20 | .bg-dark { 21 | background-color: lighten($gray-dark-200,5%) !important; 22 | } 23 | 24 | .bg-soft-light{ 25 | background-color: rgba($gray-dark-300, 0.25) !important; 26 | } 27 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_badge.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _badge.scss 3 | // 4 | 5 | 6 | .badge { 7 | &[href] { 8 | &:hover, 9 | &:focus { 10 | color: $white; 11 | } 12 | } 13 | } 14 | 15 | // Soft badge 16 | @mixin badge-variant-soft($bg) { 17 | color: $bg; 18 | background-color: rgba($bg, 0.18); 19 | 20 | &[href] { 21 | &:hover, 22 | &:focus { 23 | color: $bg; 24 | text-decoration: none; 25 | background-color: rgba($bg, 0.4); 26 | } 27 | } 28 | } 29 | 30 | @each $color, $value in $theme-colors { 31 | .badge { 32 | &.bg-#{$color} { 33 | &[href] { 34 | &:hover, 35 | &:focus { 36 | background-color: darken($value, 4%) !important; 37 | } 38 | } 39 | } 40 | } 41 | 42 | .badge{ 43 | &.bg-light{ 44 | color: $body-color; 45 | 46 | &[href] { 47 | &:hover, 48 | &:focus { 49 | color: $body-color; 50 | } 51 | } 52 | } 53 | } 54 | 55 | .badge-soft-#{$color} { 56 | @include badge-variant-soft($value); 57 | } 58 | 59 | } 60 | 61 | .rounded-pill{ 62 | padding-right: .6em; 63 | padding-left: .6em; 64 | } 65 | 66 | // Dark badge 67 | 68 | .badge.bg-dark{ 69 | color: $light; 70 | } 71 | 72 | body[data-layout-mode="dark"] { 73 | .badge-soft-dark{ 74 | color: $gray-dark-600; 75 | background-color: rgba($gray-dark-400, 0.18); 76 | 77 | &[href] { 78 | &:hover, 79 | &:focus { 80 | color: $gray-dark-600; 81 | text-decoration: none; 82 | background-color: rgba($gray-dark-400, 0.4); 83 | } 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // breadcrumb.scss 4 | // 5 | 6 | 7 | // Breadcrumb item arrow 8 | .breadcrumb-item { 9 | > a { 10 | color: $gray-700; 11 | } 12 | +.breadcrumb-item { 13 | &::before { 14 | font-family: "Material Design Icons"; 15 | } 16 | } 17 | } 18 | 19 | body[data-layout-mode="dark"] { 20 | .breadcrumb-item>a { 21 | color: $gray-dark-500; 22 | } 23 | 24 | .breadcrumb-item.active{ 25 | color: $gray-dark-400; 26 | } 27 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_card.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _card.scss 3 | // 4 | 5 | .card { 6 | margin-bottom: $grid-gutter-width; 7 | } 8 | 9 | .card-drop { 10 | color: $body-color; 11 | } 12 | 13 | .card-title { 14 | font-size: 15.4px; 15 | margin: 0 0 7px 0; 16 | color: #495057; 17 | font-weight: 600; 18 | } 19 | 20 | .card-title-desc, .card-subtitle { 21 | color: $card-title-desc; 22 | margin-bottom: 0; 23 | font-size: 13px; 24 | } 25 | 26 | .card-header-tabs { 27 | margin-top: -$card-cap-padding-y; 28 | } 29 | 30 | .card-header-pills { 31 | margin: -$card-cap-padding-y / 2; 32 | } 33 | 34 | body[data-layout-mode="dark"] { 35 | .card, 36 | .card-header, 37 | .modal-content, 38 | .offcanvas { 39 | background-color: $gray-dark-200; 40 | border-color: lighten($gray-dark-200, 4%); 41 | } 42 | 43 | .card-title-desc { 44 | color: $gray-dark-400; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_carousel.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _carousel.scss 3 | // 4 | 5 | 6 | .carousel-indicators-rounded { 7 | button{ 8 | width: 10px !important; 9 | height: 10px !important; 10 | border-radius: 50% !important; 11 | } 12 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_modals.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _modal.scss 3 | // 4 | 5 | body[data-layout-mode="dark"] { 6 | // modal 7 | .modal-header, .modal-footer{ 8 | border-color: $gray-dark-300;; 9 | } 10 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_nav.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _nav.scss 3 | // 4 | 5 | .nav-tabs, 6 | .nav-pills { 7 | >li { 8 | >a { 9 | color: $gray-700; 10 | font-weight: $font-weight-medium; 11 | } 12 | } 13 | } 14 | 15 | .nav-pills { 16 | >a { 17 | color: $gray-700; 18 | font-weight: $font-weight-medium; 19 | } 20 | } 21 | 22 | 23 | .nav-tabs-custom { 24 | border-bottom: 1px solid $gray-300; 25 | 26 | .nav-item { 27 | position: relative; 28 | color: $dark; 29 | 30 | .nav-link { 31 | border: none; 32 | 33 | &::after { 34 | content: ""; 35 | background: $primary; 36 | height: 1px; 37 | position: absolute; 38 | width: 100%; 39 | left: 0; 40 | bottom: -1px; 41 | transition: all 250ms ease 0s; 42 | transform: scale(0); 43 | } 44 | 45 | &.active { 46 | color: $primary; 47 | 48 | &:after { 49 | transform: scale(1); 50 | } 51 | } 52 | 53 | } 54 | } 55 | 56 | &.card-header-tabs { 57 | border-bottom: none; 58 | 59 | .nav-link { 60 | padding: $card-cap-padding-y $nav-link-padding-x; 61 | font-weight: $font-weight-medium; 62 | } 63 | } 64 | } 65 | 66 | 67 | // vertical nav 68 | 69 | .vertical-nav { 70 | .nav { 71 | .nav-link { 72 | padding: 24px 16px; 73 | text-align: center; 74 | margin-bottom: 8px; 75 | 76 | .nav-icon { 77 | font-size: 24px; 78 | } 79 | } 80 | } 81 | } 82 | 83 | 84 | body[data-layout-mode="dark"] { 85 | 86 | // .nav-tabs 87 | .nav-link{ 88 | color: $gray-dark-500; 89 | } 90 | 91 | .nav-tabs{ 92 | border-color: $gray-dark-300; 93 | .nav-link{ 94 | color: $gray-dark-600; 95 | &:focus, &:hover{ 96 | border-color:$gray-dark-300 $gray-dark-300 $gray-dark-300; 97 | } 98 | &.active{ 99 | background-color: $gray-dark-200; 100 | border-color:$gray-dark-300 $gray-dark-300 $gray-dark-200; 101 | } 102 | } 103 | } 104 | 105 | .nav-pills{ 106 | .nav-link{ 107 | color: $gray-dark-600; 108 | &.active{ 109 | color: $white; 110 | } 111 | } 112 | } 113 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_pagination.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _pagination.scss 3 | // 4 | 5 | // Pagination rounded (Custom) 6 | .pagination-rounded { 7 | .page-link { 8 | border-radius: 30px !important; 9 | margin: 0 3px !important; 10 | border: none; 11 | width: 32px; 12 | height: 32px; 13 | padding: 0; 14 | text-align: center; 15 | line-height: 32px; 16 | } 17 | } 18 | 19 | // dark layout 20 | 21 | body[data-layout-mode="dark"] { 22 | // pagination 23 | .page-link{ 24 | background-color: $gray-dark-200; 25 | border-color: $gray-dark-300; 26 | color: $gray-dark-500; 27 | &:hover{ 28 | background-color: lighten($gray-dark-200, 2%); 29 | color: $primary; 30 | } 31 | } 32 | .page-item{ 33 | &.disabled{ 34 | .page-link{ 35 | color: $gray-dark-400; 36 | background-color: $gray-dark-200; 37 | border-color: $gray-dark-300; 38 | } 39 | } 40 | 41 | &.active{ 42 | .page-link{ 43 | color: $white; 44 | background-color: $primary; 45 | border-color: $primary; 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_print.scss: -------------------------------------------------------------------------------- 1 | // 2 | // print.scss 3 | // 4 | 5 | // Used invoice page 6 | @media print { 7 | .vertical-menu, 8 | .right-bar, 9 | .page-title-box, 10 | .navbar-header, 11 | .footer { 12 | display: none !important; 13 | } 14 | .card-body, 15 | .main-content, 16 | .right-bar, 17 | .page-content, 18 | body { 19 | padding: 0; 20 | margin: 0; 21 | } 22 | 23 | .card{ 24 | border: 0; 25 | } 26 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_progress.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _progress.scss 3 | // 4 | 5 | // Progress height small 6 | .progress-sm { 7 | height: 5px; 8 | } 9 | 10 | 11 | // Progress height medium 12 | .progress-md { 13 | height: 8px; 14 | } 15 | 16 | 17 | // Progress height large 18 | .progress-lg { 19 | height: 12px; 20 | } 21 | 22 | // Progress height Extra large 23 | .progress-xl { 24 | height: 16px; 25 | } 26 | 27 | .custom-progess{ 28 | position: relative; 29 | .progress-icon{ 30 | position: absolute; 31 | top: -12px; 32 | .avatar-title{ 33 | background: $card-bg; 34 | } 35 | } 36 | } 37 | 38 | // animated-progess 39 | 40 | .animated-progess{ 41 | position: relative; 42 | .progress-bar { 43 | position: relative; 44 | border-radius: 6px; 45 | animation: animate-positive 2s; 46 | } 47 | } 48 | 49 | @keyframes animate-positive { 50 | 0% { 51 | width: 0; 52 | } 53 | } 54 | 55 | body[data-layout-mode="dark"] { 56 | 57 | // progress 58 | .progress{ 59 | background-color: $gray-dark-300; 60 | } 61 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_reboot.scss: -------------------------------------------------------------------------------- 1 | /* ============= 2 | General 3 | ============= */ 4 | 5 | html { 6 | position: relative; 7 | min-height: 100%; 8 | } 9 | 10 | .h1,.h2,.h3,.h4,.h5,.h6, 11 | h1,h2,h3,h4,h5,h6 { 12 | color: $gray-700; 13 | } 14 | 15 | a { 16 | text-decoration: none !important; 17 | } 18 | 19 | label { 20 | margin-bottom: $form-label-margin-bottom; 21 | font-weight: $font-weight-medium; 22 | } 23 | 24 | // blockquote 25 | 26 | .blockquote { 27 | padding: 10px 20px; 28 | border-left: 4px solid $gray-300; 29 | } 30 | 31 | .blockquote-reverse { 32 | border-left: 0; 33 | border-right: 4px solid $gray-300; 34 | text-align: right; 35 | } 36 | 37 | // container 38 | 39 | .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl{ 40 | @media (min-width: 1200px){ 41 | max-width: 1140px; 42 | } 43 | } 44 | 45 | // row 46 | 47 | .row{ 48 | > * { 49 | position: relative; 50 | } 51 | } 52 | 53 | 54 | body[data-layout-mode="dark"] { 55 | 56 | // blockquote 57 | 58 | .blockquote{ 59 | border-color: $gray-dark-300; 60 | } 61 | 62 | .blockquote-footer{ 63 | color: $gray-dark-400; 64 | } 65 | 66 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_shadow.scss: -------------------------------------------------------------------------------- 1 | // 2 | // shadow.scss 3 | // 4 | @mixin componets-shadow($color) { 5 | box-shadow: 0 2px 8px 0 rgba($color, 0.3); 6 | } 7 | 8 | // Shadows 9 | @each $color, $value in $theme-colors { 10 | .shadow-#{$color} { 11 | @include componets-shadow($value); 12 | } 13 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_table.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _table.scss 3 | // 4 | 5 | .table { 6 | th { 7 | font-weight: $font-weight-bold; 8 | } 9 | 10 | .table-light{ 11 | color: $body-color; 12 | border-color: $table-border-color; 13 | background-color: $table-head-bg; 14 | } 15 | } 16 | 17 | .table-bordered { 18 | border: $table-border-width solid $table-border-color; 19 | 20 | th, 21 | td { 22 | border: $table-border-width solid $table-border-color; 23 | } 24 | } 25 | 26 | 27 | .table-dark>:not(:last-child)>:last-child>*{ 28 | border-bottom-color: $table-dark-border-color; 29 | } 30 | 31 | .table-nowrap { 32 | th, td { 33 | white-space: nowrap; 34 | } 35 | } 36 | 37 | 38 | body[data-layout-mode="dark"] { 39 | // table 40 | .table { 41 | border-color: lighten($gray-dark-200,5%); 42 | color: $gray-dark-400; 43 | } 44 | 45 | .table-bordered { 46 | border-color: $gray-dark-300; 47 | 48 | th, 49 | td { 50 | border-color: $gray-dark-300; 51 | } 52 | } 53 | 54 | .table>:not(:last-child)>:last-child>* { 55 | border-bottom-color: $gray-dark-300; 56 | } 57 | 58 | .table-striped>tbody>tr:nth-of-type(odd), 59 | .table-hover>tbody>tr:hover, 60 | .table .table-light { 61 | --bs-table-accent-bg: #363a38; 62 | color: $gray-dark-400; 63 | } 64 | 65 | // table 66 | .table-dark{ 67 | background-color: $gray-dark-300; 68 | >:not(caption)>*>*{ 69 | background-color: $gray-dark-300; 70 | } 71 | } 72 | } 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_toasts.scss: -------------------------------------------------------------------------------- 1 | // 2 | // toasts.scss 3 | // 4 | 5 | body[data-layout-mode="dark"] { 6 | .toast, .toast-header{ 7 | background-color: rgba($gray-dark-300, 0.85); 8 | color: $gray-dark-400; 9 | } 10 | 11 | .toast-header{ 12 | color: $gray-dark-500; 13 | } 14 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/components/_widgets.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Widgets.scss 3 | // 4 | 5 | .widget-box-1-icon { 6 | position: absolute; 7 | right: -15px; 8 | top: -25px; 9 | font-size: 5rem; 10 | opacity: 0.1; 11 | } 12 | 13 | .widget-carousel{ 14 | .carousel-indicators{ 15 | margin: 0px auto; 16 | position: relative; 17 | } 18 | } 19 | 20 | // activity widget 21 | 22 | .activity-border { 23 | &:before { 24 | content: ""; 25 | position: absolute; 26 | height: 80px; 27 | border-left: 2px dashed $gray-400; 28 | top: 40px; 29 | left: 2px; 30 | } 31 | } 32 | 33 | .activity-wid { 34 | margin-left: 16px; 35 | 36 | .activity-list { 37 | position: relative; 38 | padding: 0 0 20px 45px; 39 | 40 | .activity-icon { 41 | position: absolute; 42 | left: -20px; 43 | top: -3px; 44 | z-index: 2; 45 | background: $card-bg; 46 | img { 47 | border: 5px solid $card-bg; 48 | } 49 | span { 50 | border: 5px solid $card-bg; 51 | } 52 | } 53 | &:last-child { 54 | padding-bottom: 0px; 55 | } 56 | } 57 | } 58 | 59 | 60 | body[data-layout-mode="dark"] { 61 | .activity-wid { 62 | .activity-list { 63 | .activity-icon { 64 | background: $gray-dark-200; 65 | img, span { 66 | border-color: $gray-dark-200; 67 | } 68 | } 69 | } 70 | } 71 | 72 | .activity-border { 73 | &:before { 74 | border-color: $gray-dark-300; 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/fonts/_fonts.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Google font - IBM Plex Sans 3 | // 4 | 5 | @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&display=swap'); -------------------------------------------------------------------------------- /src/assets/scss/custom/pages/_extras-pages.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Extras pages.scss 3 | // 4 | 5 | 6 | /********************* 7 | Maintenance 8 | **********************/ 9 | 10 | .maintenance-cog-icon{ 11 | .cog-icon{ 12 | position: relative; 13 | bottom: 24px; 14 | right: 14px; 15 | } 16 | } 17 | 18 | 19 | // pricing 20 | 21 | 22 | .pricing-badge { 23 | position: absolute; 24 | top: 0; 25 | z-index: 9; 26 | right: 0; 27 | width: 100%; 28 | display: block; 29 | font-size: 15px; 30 | padding: 0; 31 | overflow: hidden; 32 | height: 100px; 33 | .badge { 34 | float: right; 35 | transform: rotate(45deg); 36 | right: -67px; 37 | top: 17px; 38 | position: relative; 39 | text-align: center; 40 | width: 200px; 41 | font-size: 13px; 42 | margin: 0; 43 | padding: 7px 10px; 44 | font-weight: 500; 45 | color: $primary; 46 | background: $white; 47 | } 48 | } 49 | 50 | 51 | 52 | // PRICING TAB 53 | 54 | .pricing-tab-box{ 55 | .nav-link{ 56 | padding: 16px 20px; 57 | border: 1px solid $gray-200; 58 | &.active{ 59 | border: 1px solid $primary; 60 | background: transparent; 61 | padding: 16px 20px; 62 | i{ 63 | color: $primary; 64 | } 65 | h1{ 66 | color: $primary; 67 | } 68 | } 69 | 70 | } 71 | } 72 | 73 | body[data-layout-mode=dark]{ 74 | .pricing-tab-box { 75 | .nav-link{ 76 | border-color: $gray-dark-300; 77 | 78 | &.active{ 79 | border-color: $primary; 80 | } 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_apexcharts.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // apexcharts.scss 4 | // 5 | .apex-charts { 6 | min-height: 10px !important; 7 | text { 8 | font-family: $font-family-base !important; 9 | fill: $gray-500; 10 | } 11 | .apexcharts-canvas { 12 | margin: 0 auto; 13 | } 14 | } 15 | 16 | .apexcharts-tooltip-title, 17 | .apexcharts-tooltip-text { 18 | font-family: $font-family-base !important; 19 | } 20 | 21 | .apexcharts-legend-series { 22 | font-weight: $font-weight-medium; 23 | } 24 | 25 | .apexcharts-gridline { 26 | pointer-events: none; 27 | stroke: $apex-grid-color; 28 | } 29 | 30 | .apexcharts-legend-text { 31 | color: $gray-600 !important; 32 | font-family: $font-family-base !important; 33 | font-size: 13px !important; 34 | } 35 | 36 | .apexcharts-pie-label { 37 | fill: $white !important; 38 | } 39 | 40 | .apexcharts-yaxis, 41 | .apexcharts-xaxis { 42 | text { 43 | font-family: $font-family-base !important; 44 | fill: $gray-500; 45 | } 46 | } 47 | 48 | body[data-layout-mode="dark"] { 49 | 50 | .apexcharts-gridline { 51 | stroke: lighten($gray-dark-200,2.5%); 52 | } 53 | 54 | .apexcharts-tooltip.apexcharts-theme-light { 55 | background-color: $gray-dark-200; 56 | border-color: lighten($gray-dark-200,2.5%); 57 | 58 | .apexcharts-tooltip-title { 59 | background-color: $gray-dark-300; 60 | border-color: lighten($gray-dark-300,2.5%); 61 | } 62 | } 63 | 64 | .apexcharts-legend-text { 65 | color: $gray-dark-500 !important; 66 | } 67 | 68 | .apexcharts-yaxis-texts-g.apexcharts-xaxis-inversed-texts-g, 69 | .apexcharts-grid-row { 70 | + line { 71 | stroke: lighten($gray-dark-300,2.5%); 72 | } 73 | } 74 | 75 | .apexcharts-xaxis line, 76 | .apexcharts-treemap-rect, 77 | .apexcharts-heatmap-rect, 78 | .apexcharts-pie-area { 79 | stroke: lighten($gray-dark-300,2.5%); 80 | } 81 | 82 | .apexcharts-radialbar-track.apexcharts-track { 83 | path { 84 | stroke: lighten($gray-dark-300,2.5%); 85 | } 86 | } 87 | .apexcharts-radar-series.apexcharts-plot-series { 88 | polygon, 89 | line { 90 | fill: $gray-dark-300; 91 | stroke: lighten($gray-dark-300,2.5%); 92 | } 93 | } 94 | .apexcharts-pie { 95 | circle { 96 | stroke: lighten($gray-dark-300,2.5%); 97 | } 98 | } 99 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_colorpicker.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // colorpicker.scss 4 | // 5 | 6 | .pcr-app{ 7 | background: $card-bg; 8 | } 9 | 10 | .pcr-app[data-theme=classic]{ 11 | .pcr-selection { 12 | .pcr-color-preview{ 13 | margin-right: .75em; 14 | margin-left: 0; 15 | } 16 | 17 | .pcr-color-chooser, .pcr-color-opacity{ 18 | margin-left: .75em; 19 | margin-right: 0; 20 | } 21 | } 22 | } 23 | 24 | body[data-layout-mode="dark"] { 25 | .pcr-app{ 26 | background-color: $gray-dark-300; 27 | } 28 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_datatable.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* 4 | Datatable 5 | */ 6 | 7 | // datatable 8 | 9 | div.dataTables_wrapper { 10 | div.dataTables_filter{ 11 | text-align: right; 12 | 13 | @media (max-width: 767px){ 14 | text-align: center; 15 | } 16 | 17 | 18 | input{ 19 | margin-left: 0.5em; 20 | margin-right: 0; 21 | } 22 | } 23 | } 24 | 25 | .table, table{ 26 | &.dataTable{ 27 | &.dtr-inline.collapsed>tbody>tr>td{ 28 | position: relative; 29 | &.dtr-control{ 30 | padding-left: 30px; 31 | &:before{ 32 | top: 50%; 33 | left: 5px; 34 | height: 14px; 35 | width: 14px; 36 | margin-top: -9px; 37 | display: block; 38 | position: absolute; 39 | color: $white; 40 | border: 2px solid $white; 41 | border-radius: 14px; 42 | box-sizing: content-box; 43 | text-align: center; 44 | text-indent: 0 !important; 45 | line-height: 14px; 46 | content: '+'; 47 | background-color: $primary; 48 | } 49 | } 50 | } 51 | 52 | >thead{ 53 | >tr{ 54 | >th, >td{ 55 | &:not(.sorting_disabled){ 56 | padding-right: 30px; 57 | padding-left: 12px; 58 | } 59 | } 60 | } 61 | 62 | .sorting, 63 | .sorting_asc, 64 | .sorting_desc, 65 | .sorting_asc_disabled, 66 | .sorting_desc_disabled{ 67 | &::before{ 68 | right: 1em; 69 | left: auto; 70 | } 71 | 72 | &::after{ 73 | right: .5em; 74 | left: auto; 75 | } 76 | } 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_echarts.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // echarts.scss 4 | // 5 | 6 | .e-charts{ 7 | height: 350px; 8 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_form-upload.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Form-Upload 4 | // 5 | 6 | /* Dropzone */ 7 | .dropzone { 8 | min-height: 230px; 9 | border: 2px dashed $gray-400; 10 | background: $card-bg; 11 | border-radius: 6px; 12 | 13 | .dz-message { 14 | font-size: 24px; 15 | width: 100%; 16 | } 17 | } 18 | 19 | // Dark layout 20 | body[data-layout-mode="dark"] { 21 | .dropzone { 22 | background: lighten($gray-dark-200, 1%); 23 | border-color: $gray-dark-300; 24 | } 25 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_google-map.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Google map 4 | // 5 | 6 | .gmaps, .gmaps-panaroma { 7 | height: 300px !important; 8 | background: $gray-100; 9 | border-radius: 3px; 10 | } 11 | 12 | .gmaps-overlay { 13 | display: block; 14 | text-align: center; 15 | color: $white; 16 | font-size: 16px; 17 | line-height: 40px; 18 | background: $primary; 19 | border-radius: 4px; 20 | padding: 10px 20px; 21 | } 22 | 23 | .gmaps-overlay_arrow { 24 | left: 50%; 25 | margin-left: -16px; 26 | width: 0; 27 | height: 0; 28 | position: absolute; 29 | &.above { 30 | bottom: -15px; 31 | border-left: 16px solid transparent; 32 | border-right: 16px solid transparent; 33 | border-top: 16px solid $primary; 34 | } 35 | &.below { 36 | top: -15px; 37 | border-left: 16px solid transparent; 38 | border-right: 16px solid transparent; 39 | border-bottom: 16px solid $primary; 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_icons.scss: -------------------------------------------------------------------------------- 1 | // 2 | // icons.scss 3 | // 4 | 5 | @import "icons/materialdesignicons"; 6 | @import "icons/boxicons"; 7 | @import "icons/fontawesome-all"; 8 | @import "icons/dripicons"; -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_leaflet-maps.scss: -------------------------------------------------------------------------------- 1 | // 2 | // leaflet-maps.scss 3 | // 4 | 5 | .leaflet-map { 6 | height: 300px; 7 | &.leaflet-container{ 8 | z-index: 1; 9 | } 10 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_pristinejs.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Pristine 4 | // 5 | 6 | .pristine-error { 7 | margin-top: 2px; 8 | color: $danger; 9 | } 10 | 11 | .has-success{ 12 | .form-control { 13 | border-color: $success; 14 | } 15 | } 16 | 17 | .has-danger{ 18 | .form-control { 19 | border-color: $danger; 20 | } 21 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_session-timeout.scss: -------------------------------------------------------------------------------- 1 | // 2 | // session-timeout.scss 3 | // 4 | 5 | #session-timeout-dialog { 6 | .close { 7 | display: none; 8 | } 9 | 10 | .countdown-holder { 11 | color: $danger; 12 | font-weight: $font-weight-medium; 13 | } 14 | 15 | .btn-default { 16 | background-color: $white; 17 | color: $danger; 18 | box-shadow: none; 19 | } 20 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_sparkline-chart.scss: -------------------------------------------------------------------------------- 1 | // 2 | // sparkline.scss 3 | // 4 | 5 | .jqstooltip { 6 | box-sizing: content-box; 7 | width: auto !important; 8 | height: auto !important; 9 | background-color: $gray-800 !important; 10 | box-shadow: $box-shadow-lg; 11 | padding: 5px 10px !important; 12 | border-radius: 3px; 13 | border-color: $gray-900 !important; 14 | } 15 | 16 | .jqsfield { 17 | color: $gray-200 !important; 18 | font-size: 12px !important; 19 | line-height: 18px !important; 20 | font-family: $font-family-base !important; 21 | font-weight: $font-weight-medium !important; 22 | } 23 | 24 | // Dark Layout 25 | body[data-layout-mode="dark"] { 26 | .jqstooltip { 27 | background-color: $gray-dark-800 !important; 28 | border-color: $gray-dark-800 !important; 29 | } 30 | 31 | .jqsfield { 32 | color: $gray-dark-300 !important; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_sweatalert2.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Sweetalert2 4 | // 5 | 6 | .swal2-container { 7 | .swal2-title{ 8 | font-size: 22px; 9 | font-weight: $font-weight-medium; 10 | } 11 | } 12 | 13 | .swal2-modal{ 14 | font-size: 14px; 15 | } 16 | 17 | .swal2-icon{ 18 | &.swal2-question{ 19 | border-color: $info; 20 | color: $info; 21 | } 22 | &.swal2-success { 23 | [class^=swal2-success-line]{ 24 | background-color: $success; 25 | } 26 | 27 | .swal2-success-ring{ 28 | border-color: rgba($success, 0.3); 29 | } 30 | } 31 | &.swal2-warning{ 32 | border-color: $warning; 33 | color: $warning; 34 | } 35 | } 36 | 37 | .swal2-styled{ 38 | &:focus{ 39 | box-shadow: none; 40 | } 41 | } 42 | 43 | .swal2-progress-steps { 44 | .swal2-progress-step{ 45 | background: $primary; 46 | &.swal2-active-progress-step{ 47 | background: $primary; 48 | &~.swal2-progress-step, &~.swal2-progress-step-line{ 49 | background: rgba($primary, 0.3); 50 | } 51 | } 52 | } 53 | 54 | .swal2-progress-step-line{ 55 | background: $primary; 56 | } 57 | } 58 | 59 | .swal2-loader{ 60 | border-color: $primary transparent $primary transparent; 61 | } 62 | 63 | body[data-layout-mode="dark"]{ 64 | .swal2-popup{ 65 | background-color: $gray-dark-300 !important; 66 | } 67 | .swal2-content{ 68 | color: $gray-dark-500; 69 | } 70 | .swal2-html-container{ 71 | color: $gray-dark-400; 72 | } 73 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_table-editable.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Table editable 4 | // 5 | 6 | .table-edits{ 7 | input, select{ 8 | height: $input-height-sm; 9 | padding: $input-padding-y-sm $input-padding-x-sm; 10 | border: 1px solid $input-border-color; 11 | background-color: $input-bg; 12 | color: $input-color; 13 | border-radius: $input-border-radius; 14 | &:focus{ 15 | outline: none; 16 | border-color: $input-focus-border-color; 17 | } 18 | } 19 | } 20 | 21 | body[data-layout-mode="dark"] { 22 | .table-edits{ 23 | input, select{ 24 | color: $gray-dark-500; 25 | background-color: lighten($gray-dark-200,2%); 26 | border: 1px solid $gray-dark-300; 27 | &:focus{ 28 | border-color: $gray-dark-300; 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/plugins/_vector-maps.scss: -------------------------------------------------------------------------------- 1 | // 2 | // vector-maps.scss 3 | // 4 | 5 | .jvectormap-label { 6 | border: none; 7 | background: $gray-800; 8 | color: $gray-100; 9 | font-family: $font-family-base; 10 | font-size: $font-size-base; 11 | padding: 5px 8px; 12 | } 13 | 14 | // Dark layout 15 | body[data-layout-mode="dark"] { 16 | .jvectormap-label { 17 | background: $gray-dark-800; 18 | color: $gray-dark-200; 19 | } 20 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/rtl/_components-rtl.scss: -------------------------------------------------------------------------------- 1 | // 2 | // components-rtl.scss 3 | // 4 | 5 | // UI Elements 6 | 7 | .ui-elements-demo-bar{ 8 | margin-left: 0; 9 | margin-right: 20px; 10 | } 11 | 12 | .alert-dismissible { 13 | padding-left: $alert-dismissible-padding-r; 14 | padding-right: $alert-padding-x; 15 | } 16 | 17 | .alert-border-left{ 18 | border-left: 2px; 19 | border-right: 3px solid; 20 | } 21 | 22 | 23 | 24 | // alert-label-icon 25 | 26 | .alert-label-icon { 27 | padding-left: $alert-dismissible-padding-r; 28 | padding-right: 60px; 29 | 30 | .label-icon{ 31 | left: auto; 32 | right: 0; 33 | &:after{ 34 | left: -12px; 35 | right: auto !important; 36 | } 37 | } 38 | } 39 | 40 | // Alert example loop 41 | 42 | @each $color, $value in $theme-colors { 43 | // alert border left 44 | .alert-border-left { 45 | &.alert-#{$color} { 46 | border-right-color: $value; 47 | } 48 | } 49 | 50 | // label arrow 51 | .label-arrow { 52 | &.alert-#{$color} { 53 | .label-icon { 54 | &:after { 55 | border-left-color: transparent !important; 56 | border-right-color: $value !important; 57 | } 58 | } 59 | } 60 | } 61 | } 62 | 63 | // search-box 64 | 65 | .search-box{ 66 | .form-control{ 67 | padding-right: 40px; 68 | padding-left: 20px; 69 | } 70 | 71 | .search-icon{ 72 | left: auto; 73 | right: 13px; 74 | } 75 | } 76 | // dropdown 77 | 78 | .dropdown-megamenu{ 79 | &.show{ 80 | left: 20px!important; 81 | } 82 | } 83 | 84 | 85 | // icons 86 | 87 | .icon-demo-content{ 88 | i{ 89 | margin-left: 10px; 90 | margin-right: 0; 91 | } 92 | } 93 | 94 | 95 | // Breadcrumb 96 | 97 | .breadcrumb-item + .breadcrumb-item::before { 98 | float: right; 99 | padding-left: 0.5rem; 100 | padding-right: 0; 101 | } 102 | 103 | 104 | // activity-feed 105 | 106 | .activity-feed{ 107 | .feed-item { 108 | padding-left: 0; 109 | padding-right: 16px; 110 | border-left: 0; 111 | border-right: 2px solid $light; 112 | &:after { 113 | left: auto; 114 | right: -6px; 115 | } 116 | } 117 | } 118 | 119 | 120 | // Invoice 121 | 122 | @media print { 123 | .content-page, 124 | .content, 125 | body { 126 | margin-right: 0; 127 | } 128 | } 129 | 130 | // Demos button 131 | .demos-show-btn { 132 | left: 0; 133 | right: auto; 134 | border-radius: 0 6px 6px 0; 135 | } 136 | 137 | // widget 138 | 139 | .widget-box-1-icon{ 140 | right: auto; 141 | left: -15px; 142 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/rtl/_float-rtl.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $breakpoint in map-keys($grid-breakpoints) { 4 | @include media-breakpoint-up($breakpoint) { 5 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 6 | 7 | .float#{$infix}-start { float: right !important; } 8 | .float#{$infix}-end { float: left !important; } 9 | .float#{$infix}-none { float: none !important; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/assets/scss/custom/rtl/_general-rtl.scss: -------------------------------------------------------------------------------- 1 | // 2 | // general-rtl.scss 3 | // 4 | 5 | html { 6 | direction: rtl; 7 | } 8 | 9 | body { 10 | text-align: right; 11 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/rtl/_plugins-rtl.scss: -------------------------------------------------------------------------------- 1 | // 2 | // plugins-rtl.scss 3 | // 4 | 5 | // lightbox 6 | 7 | .modal-video-close-btn{ 8 | left: 0px; 9 | right: auto; 10 | @media (orientation: landscape) { 11 | right: auto; 12 | left: -45px; 13 | } 14 | } 15 | 16 | // rdw-editor 17 | 18 | .rdw-dropdown-carettoclose, .rdw-dropdown-carettoopen{ 19 | right: auto; 20 | left: 10%; 21 | } 22 | 23 | // form wizard 24 | 25 | .twitter-bs-wizard { 26 | .twitter-bs-wizard-nav { 27 | .nav-link::after{ 28 | left: auto; 29 | right: 62%; 30 | } 31 | } 32 | 33 | .twitter-bs-wizard-pager-link li.next{ 34 | float: left; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/assets/scss/custom/rtl/_spacing-rtl.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Margin and Padding 4 | 5 | @each $breakpoint in map-keys($grid-breakpoints) { 6 | @include media-breakpoint-up($breakpoint) { 7 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 8 | 9 | @each $prop, $abbrev in (margin: m, padding: p) { 10 | @each $size, $length in $spacers { 11 | .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } 12 | .#{$abbrev}t#{$infix}-#{$size}, 13 | .#{$abbrev}y#{$infix}-#{$size} { 14 | #{$prop}-top: $length !important; 15 | } 16 | .#{$abbrev}e#{$infix}-#{$size} { 17 | #{$prop}-left: $length !important; 18 | #{$prop}-right: 0 !important; 19 | } 20 | .#{$abbrev}b#{$infix}-#{$size}, 21 | .#{$abbrev}y#{$infix}-#{$size} { 22 | #{$prop}-bottom: $length !important; 23 | } 24 | .#{$abbrev}s#{$infix}-#{$size} { 25 | #{$prop}-right: $length !important; 26 | #{$prop}-left: 0 !important; 27 | } 28 | } 29 | } 30 | 31 | // Negative margins (e.g., where `.mb-n1` is negative version of `.mb-1`) 32 | @each $size, $length in $spacers { 33 | @if $size != 0 { 34 | .m#{$infix}-n#{$size} { margin: -$length !important; } 35 | .mt#{$infix}-n#{$size}, 36 | .my#{$infix}-n#{$size} { 37 | margin-top: -$length !important; 38 | } 39 | .me#{$infix}-n#{$size}, 40 | .mx#{$infix}-n#{$size} { 41 | margin-right: -$length !important; 42 | } 43 | .mb#{$infix}-n#{$size}, 44 | .my#{$infix}-n#{$size} { 45 | margin-bottom: -$length !important; 46 | } 47 | .ms#{$infix}-n#{$size}, 48 | .mx#{$infix}-n#{$size} { 49 | margin-left: -$length !important; 50 | } 51 | } 52 | } 53 | 54 | // Some special margin utils 55 | .m#{$infix}-auto { margin: auto !important; } 56 | .mt#{$infix}-auto, 57 | .my#{$infix}-auto { 58 | margin-top: auto !important; 59 | } 60 | .me#{$infix}-auto, 61 | .mx#{$infix}-auto { 62 | margin-left: auto !important; 63 | margin-right: inherit !important; 64 | } 65 | .mb#{$infix}-auto, 66 | .my#{$infix}-auto { 67 | margin-bottom: auto !important; 68 | } 69 | .mx#{$infix}-auto { 70 | margin-right: auto !important; 71 | margin-left: auto !important; 72 | } 73 | .ms#{$infix}-auto{ 74 | margin-right: auto !important; 75 | margin-left: 0 !important; 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/assets/scss/custom/rtl/_text-rtl.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Text 5 | // 6 | 7 | 8 | // Responsive alignment 9 | 10 | @each $breakpoint in map-keys($grid-breakpoints) { 11 | @include media-breakpoint-up($breakpoint) { 12 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 13 | 14 | .text#{$infix}-start { text-align: right !important; } 15 | .text#{$infix}-end { text-align: left !important; } 16 | .text#{$infix}-center { text-align: center !important; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/assets/scss/custom/structure/_footer.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _footer.scss 3 | // 4 | 5 | .footer { 6 | bottom: 0; 7 | padding: 20px calc(#{$grid-gutter-width} / 2); 8 | position: absolute; 9 | right: 0; 10 | color: $footer-color; 11 | left: 250px; 12 | height: $footer-height; 13 | background-color: $footer-bg; 14 | border-top: 1px solid $border-color; 15 | 16 | @media (max-width: 991.98px) { 17 | left: 0; 18 | } 19 | } 20 | 21 | // Enlarge menu 22 | body[data-sidebar-size="sm"] { 23 | .footer { 24 | left: $sidebar-collapsed-width; 25 | 26 | @media (max-width: 991.98px) { 27 | left: 0; 28 | } 29 | } 30 | } 31 | 32 | body[data-layout="horizontal"] { 33 | .footer { 34 | left: 0 !important; 35 | } 36 | } 37 | 38 | body[data-layout-mode="dark"] { 39 | .footer { 40 | background-color: $gray-dark-200; 41 | color: $gray-dark-500; 42 | border-color: lighten($gray-dark-200,2.5%); 43 | } 44 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/structure/_general.scss: -------------------------------------------------------------------------------- 1 | 2 | body[data-layout-mode="dark"] { 3 | background-color: $gray-dark-200; 4 | color: $gray-dark-600; 5 | 6 | 7 | .h1,.h2,.h3,.h4,.h5,.h6, 8 | h1,h2,h3,h4,h5,h6 { 9 | color: $gray-dark-600; 10 | } 11 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/structure/_layouts.scss: -------------------------------------------------------------------------------- 1 | // 2 | // _layouts.scss 3 | // 4 | 5 | body[data-layout-size="boxed"] { 6 | background-color: $boxed-body-bg; 7 | #layout-wrapper { 8 | background-color: $body-bg; 9 | max-width: $boxed-layout-width; 10 | margin: 0 auto; 11 | box-shadow: $box-shadow; 12 | min-height: 100vh; 13 | } 14 | 15 | #page-topbar { 16 | max-width: $boxed-layout-width; 17 | margin: 0 auto; 18 | } 19 | 20 | .footer { 21 | margin: 0 auto; 22 | max-width: calc(#{$boxed-layout-width} - #{$sidebar-width}); 23 | } 24 | 25 | &[data-sidebar-size="sm"] { 26 | @media (min-width: 992px) { 27 | #layout-wrapper { 28 | min-height: 1200px; 29 | } 30 | } 31 | 32 | .footer { 33 | max-width: calc(#{$boxed-layout-width} - #{$sidebar-collapsed-width}); 34 | } 35 | } 36 | 37 | &[data-sidebar-size="md"] { 38 | 39 | .footer { 40 | max-width: calc(#{$boxed-layout-width} - #{$sidebar-width-sm}); 41 | } 42 | } 43 | } 44 | 45 | 46 | // Horizontal Boxed Layout 47 | 48 | body[data-layout="horizontal"][data-layout-size="boxed"]{ 49 | #page-topbar, #layout-wrapper, .footer { 50 | max-width: 100%; 51 | } 52 | .container-fluid, .navbar-header { 53 | max-width: $boxed-layout-width; 54 | } 55 | } 56 | 57 | // Scrollable layout 58 | 59 | body[data-layout-scrollable="true"] { 60 | @media (min-width: 992px) { 61 | #page-topbar, .vertical-menu{ 62 | position: absolute; 63 | } 64 | } 65 | 66 | &[data-layout="horizontal"]{ 67 | @media (min-width: 992px) { 68 | #page-topbar, .topnav{ 69 | position: absolute; 70 | } 71 | } 72 | } 73 | } 74 | 75 | body[data-layout-mode="dark"] { 76 | &[data-layout-size="boxed"] { 77 | background-color: lighten($gray-dark-200, 4%); 78 | 79 | #layout-wrapper { 80 | background-color: $gray-dark-200; 81 | } 82 | } 83 | } 84 | 85 | -------------------------------------------------------------------------------- /src/assets/scss/custom/structure/_page-head.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Page-title 3 | // 4 | 5 | .page-title-box { 6 | padding-bottom: $grid-gutter-width; 7 | 8 | .breadcrumb { 9 | background-color: transparent; 10 | padding: 0; 11 | } 12 | } -------------------------------------------------------------------------------- /src/assets/scss/custom/structure/_right-sidebar.scss: -------------------------------------------------------------------------------- 1 | // 2 | // right-sidebar.scss 3 | // 4 | 5 | .right-bar { 6 | background-color: $card-bg; 7 | // box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.06), 0 1px 0 0 rgba(0, 0, 0, 0.02); 8 | display: block; 9 | transition: all 200ms ease-out; 10 | width: $rightbar-width; 11 | z-index: 9999; 12 | float: right !important; 13 | right: -($rightbar-width + 10px); 14 | top: 0; 15 | bottom: 0; 16 | 17 | .right-bar-toggle { 18 | background-color: lighten($dark, 7%); 19 | height: 24px; 20 | width: 24px; 21 | line-height: 24px; 22 | display: block; 23 | color: $gray-200; 24 | text-align: center; 25 | border-radius: 50%; 26 | 27 | &:hover { 28 | background-color: lighten($dark, 10%); 29 | } 30 | } 31 | } 32 | 33 | // Rightbar overlay 34 | .rightbar-overlay { 35 | background-color: rgba($dark, 0.55); 36 | position: absolute; 37 | left: 0; 38 | right: 0; 39 | top: 0; 40 | bottom: 0; 41 | display: none; 42 | z-index: 9998; 43 | transition: all 0.2s ease-out; 44 | } 45 | 46 | .right-bar-enabled { 47 | .right-bar { 48 | right: 0; 49 | } 50 | .rightbar-overlay { 51 | display: block; 52 | } 53 | } 54 | 55 | @include media-breakpoint-down(md) { 56 | .right-bar { 57 | overflow: auto; 58 | .slimscroll-menu { 59 | height: auto !important; 60 | } 61 | } 62 | } 63 | 64 | body[data-layout-mode="dark"] { 65 | .right-bar { 66 | background-color: $gray-dark-200; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/assets/scss/icons.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Template Name: Minia - Admin & Dashboard Template 3 | Author: Themesbrand 4 | Version: 1.0.0 5 | Website: https://themesbrand.com/ 6 | Contact: themesbrand@gmail.com 7 | File: Icons Css File 8 | */ 9 | 10 | // Plugins 11 | @import "custom/plugins/icons"; -------------------------------------------------------------------------------- /src/common/data/calender.js: -------------------------------------------------------------------------------- 1 | const events = [ 2 | { 3 | id: 1, 4 | title: "Hey!", 5 | start: new Date().setDate(new Date().getDate() + 1), 6 | className: "bg-warning text-white", 7 | }, 8 | { 9 | id: 2, 10 | title: "See John Deo", 11 | start: new Date(), 12 | end: new Date(), 13 | className: "bg-success text-white", 14 | }, 15 | { 16 | id: 3, 17 | title: "Meet John Deo", 18 | start: new Date().setDate(new Date().getDate() + 8), 19 | className: "bg-info text-white", 20 | }, 21 | { 22 | id: 4, 23 | title: "Buy a Theme", 24 | start: new Date().setDate(new Date().getDate() + 7), 25 | className: "bg-primary text-white", 26 | }, 27 | ] 28 | 29 | const calenderDefaultCategories = [ 30 | { 31 | id: 1, 32 | title: "New Theme Release", 33 | type: "bg-soft-success", 34 | text: "text-success" 35 | }, 36 | { 37 | id: 2, 38 | title: "My Event", 39 | type: "bg-soft-info", 40 | text: "text-info" 41 | }, 42 | { 43 | id: 3, 44 | title: "Meet Manager", 45 | type: "bg-soft-warning", 46 | text: "text-warning" 47 | }, 48 | { 49 | id: 4, 50 | title: "Report Error", 51 | type: "bg-soft-danger", 52 | text: "text-danger" 53 | }, 54 | ] 55 | 56 | export { calenderDefaultCategories, events } 57 | -------------------------------------------------------------------------------- /src/common/data/dashboard.js: -------------------------------------------------------------------------------- 1 | const WidgetsData = [ 2 | { 3 | id: 1, 4 | title: "My Wallet", 5 | price: 865.2, 6 | rank: "+$20.9k", 7 | isDoller: true, 8 | postFix: "k", 9 | statusColor: "success", 10 | series: [2, 10, 18, 22, 36, 15, 47, 75, 65, 19, 14, 2, 47, 42, 15], 11 | }, 12 | { 13 | id: 2, 14 | title: "Number of Trades", 15 | price: 6258, 16 | rank: "-29 Trades", 17 | isDoller: false, 18 | statusColor: "danger", 19 | series: [15, 42, 47, 2, 14, 19, 65, 75, 47, 15, 42, 47, 2, 14, 12,] 20 | }, 21 | { 22 | id: 3, 23 | title: "Invested Amount", 24 | price: 432, 25 | rank: "+$2.8k", 26 | isDoller: true, 27 | postFix: "M", 28 | statusColor: "success", 29 | series: [47, 15, 2, 67, 22, 20, 36, 60, 60, 30, 50, 11, 12, 3, 8,] 30 | }, 31 | { 32 | id: 5, 33 | title: "Profit Ration", 34 | price: 1257, 35 | rank: "+$2.75%", 36 | isDoller: true, 37 | postFix: "%", 38 | statusColor: "success", 39 | series: [12, 14, 2, 47, 42, 15, 47, 75, 65, 19, 14, 2, 47, 42, 15,] 40 | }, 41 | ]; 42 | 43 | export { WidgetsData }; -------------------------------------------------------------------------------- /src/common/data/index.js: -------------------------------------------------------------------------------- 1 | // import React from "react" 2 | import { cryptoOrders, wallet } from "./crypto" 3 | import { invoiceList } from "./invoices" 4 | import { projects } from "./projects" 5 | import { tasks } from "./tasks" 6 | import { 7 | inboxmails, 8 | starredmails, 9 | importantmails, 10 | draftmails, 11 | sentmails, 12 | trashmails, 13 | } from "./mails" 14 | import { chats, contacts, groups, messages } from "./chat" 15 | import { calenderDefaultCategories, events } from "./calender" 16 | import { users, userProfile } from "./contacts" 17 | 18 | import { 19 | janTopSellingData, 20 | decTopSellingData, 21 | novTopSellingData, 22 | octTopSellingData, 23 | janEarningData, 24 | decEarningData, 25 | novEarningData, 26 | octEarningData, 27 | chatData, 28 | } from "./dashboard-saas" 29 | 30 | export { 31 | events, 32 | calenderDefaultCategories, 33 | chats, 34 | groups, 35 | contacts, 36 | messages, 37 | wallet, 38 | inboxmails, 39 | importantmails, 40 | draftmails, 41 | sentmails, 42 | trashmails, 43 | starredmails, 44 | cryptoOrders, 45 | invoiceList, 46 | projects, 47 | tasks, 48 | users, 49 | userProfile, 50 | janTopSellingData, 51 | decTopSellingData, 52 | novTopSellingData, 53 | octTopSellingData, 54 | janEarningData, 55 | decEarningData, 56 | novEarningData, 57 | octEarningData, 58 | chatData, 59 | } 60 | -------------------------------------------------------------------------------- /src/common/languages.js: -------------------------------------------------------------------------------- 1 | import usFlag from "../assets/images/flags/us.jpg" 2 | import spain from "../assets/images/flags/spain.jpg" 3 | import germany from "../assets/images/flags/germany.jpg" 4 | import italy from "../assets/images/flags/italy.jpg" 5 | import russia from "../assets/images/flags/russia.jpg" 6 | 7 | const languages = { 8 | sp: { 9 | label: "Spanish", 10 | flag: spain, 11 | }, 12 | gr: { 13 | label: "German", 14 | flag: germany, 15 | }, 16 | it: { 17 | label: "Italian", 18 | flag: italy, 19 | }, 20 | rs: { 21 | label: "Russian", 22 | flag: russia, 23 | }, 24 | en: { 25 | label: "English", 26 | flag: usFlag, 27 | }, 28 | } 29 | 30 | export default languages 31 | -------------------------------------------------------------------------------- /src/components/Common/Breadcrumb.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import PropTypes from 'prop-types' 3 | import { Link } from "react-router-dom" 4 | import { Row, Col, BreadcrumbItem } from "reactstrap" 5 | 6 | const Breadcrumb = props => { 7 | return ( 8 | 9 | 10 |
11 |

{props.breadcrumbItem}

12 |
13 |
    14 | 15 | {props.title} 16 | 17 | 18 | {props.breadcrumbItem} 19 | 20 |
21 |
22 |
23 | 24 |
25 | ) 26 | } 27 | 28 | Breadcrumb.propTypes = { 29 | breadcrumbItem: PropTypes.string, 30 | title: PropTypes.string 31 | } 32 | 33 | export default Breadcrumb 34 | -------------------------------------------------------------------------------- /src/components/Common/Breadcrumb2.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import PropTypes from 'prop-types' 3 | import { Link } from "react-router-dom" 4 | import { Row, Col, BreadcrumbItem } from "reactstrap" 5 | 6 | const Breadcrumb = props => { 7 | const { title, breadcrumbItems } = props 8 | const itemLength = breadcrumbItems.length 9 | 10 | return ( 11 | 12 | 13 |
14 |

{title}

15 |
16 |
    17 | {breadcrumbItems.map((item, key) => ( 18 | 19 | {item.title} 20 | 21 | ))} 22 |
23 |
24 |
25 | 26 |
27 | ) 28 | } 29 | 30 | Breadcrumb.propTypes = { 31 | breadcrumbItems: PropTypes.array, 32 | title: PropTypes.string 33 | } 34 | 35 | export default Breadcrumb 36 | -------------------------------------------------------------------------------- /src/components/Common/openNotificationWithIcon.js: -------------------------------------------------------------------------------- 1 | import { notification } from "antd"; 2 | 3 | export const openNotificationWithIcon = (type, title, message = "") => { 4 | if (type) { 5 | notification[type]({ 6 | message: title, 7 | description: message, 8 | }); 9 | } 10 | 11 | return { 12 | error: (errMsg = "") => 13 | openNotificationWithIcon("error", "Something went wrong!", errMsg), 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /src/components/CommonForBoth/Menus/LightDark.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | //Import Icons 4 | import FeatherIcon from "feather-icons-react"; 5 | 6 | //constants 7 | import { layoutTheme } from "../../../constants/layout"; 8 | const LightDark = ({ layoutMode, onChangeLayoutMode }) => { 9 | const mode = layoutMode === layoutTheme['DARKMODE'] ? layoutTheme['LIGHTMODE'] : layoutTheme['DARKMODE']; 10 | return ( 11 |
12 | 29 |
30 | ); 31 | } 32 | 33 | export default LightDark; -------------------------------------------------------------------------------- /src/components/CommonForBoth/TopbarDropdown/LanguageDropdown.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { 3 | Dropdown, 4 | DropdownItem, 5 | DropdownMenu, 6 | DropdownToggle, 7 | } from "reactstrap"; 8 | import { get, map } from "lodash"; 9 | import { withTranslation } from "react-i18next"; 10 | 11 | //i18n 12 | import i18n from "../../../i18n"; 13 | import languages from "../../../common/languages"; 14 | 15 | const LanguageDropdown = () => { 16 | // Declare a new state variable, which we'll call "menu" 17 | const [selectedLang, setSelectedLang] = useState(""); 18 | const [menu, setMenu] = useState(false); 19 | 20 | useEffect(() => { 21 | const currentLanguage = localStorage.getItem("I18N_LANGUAGE"); 22 | setSelectedLang(currentLanguage); 23 | }, []) 24 | 25 | const changeLanguageAction = lang => { 26 | //set language as i18n 27 | i18n.changeLanguage(lang); 28 | localStorage.setItem("I18N_LANGUAGE", lang); 29 | setSelectedLang(lang); 30 | } 31 | 32 | const toggle = () => { 33 | setMenu(!menu); 34 | } 35 | 36 | return ( 37 | <> 38 | 39 | 40 | Skote 46 | 47 | 48 | {map(Object.keys(languages), key => ( 49 | changeLanguageAction(key)} 52 | className={`notify-item ${selectedLang === key ? "active" : "none" 53 | }`} 54 | > 55 | Skote 61 | 62 | {get(languages, `${key}.label`)} 63 | 64 | 65 | ))} 66 | 67 | 68 | 69 | ) 70 | } 71 | 72 | export default withTranslation()(LanguageDropdown) 73 | -------------------------------------------------------------------------------- /src/components/CommonForBoth/rightbar.scss: -------------------------------------------------------------------------------- 1 | @import "../../assets/scss/theme.scss"; 2 | 3 | .radio-toolbar { 4 | label { 5 | display: inline-block; 6 | background-color: $gray-300; 7 | cursor: pointer; 8 | padding: 5px 10px; 9 | font-size: 14px; 10 | border-radius: 4px; 11 | position: relative; 12 | } 13 | input[type="radio"] { 14 | opacity: 0; 15 | position: fixed; 16 | width: 0; 17 | &:checked + label { 18 | background-color: $primary; 19 | border: none; 20 | color: $white; 21 | } 22 | } 23 | // color option 24 | &.coloropt-radio { 25 | input[type="radio"] { 26 | &:checked + label { 27 | &:after { 28 | content: "\F012C"; 29 | position: absolute; 30 | font-family: "Material Design Icons"; 31 | color: $white; 32 | font-size: 14px; 33 | top: 50%; 34 | left: 50%; 35 | transform: translateX(-50%) translateY(-50%); 36 | } 37 | &.bg-light { 38 | &:after { 39 | color: $primary; 40 | } 41 | } 42 | } 43 | } 44 | 45 | label { 46 | border: 1px solid $card-bg !important; 47 | &.bg-light { 48 | background-color: $card-bg; 49 | border-color: $primary !important; 50 | } 51 | } 52 | } 53 | 54 | // image option 55 | &.imgopt-radio { 56 | label { 57 | padding: 0; 58 | overflow: hidden; 59 | background: transparent; 60 | } 61 | input[type="radio"] { 62 | &:checked + label { 63 | &::before { 64 | content: ""; 65 | position: absolute; 66 | left: 0; 67 | top: 0; 68 | width: 100%; 69 | height: 100%; 70 | background-color: rgba($primary, 0.6); 71 | } 72 | 73 | &:after { 74 | content: "\F012C"; 75 | position: absolute; 76 | font-family: "Material Design Icons"; 77 | color: $white; 78 | font-size: 14px; 79 | top: 50%; 80 | left: 50%; 81 | transform: translateX(-50%) translateY(-50%); 82 | } 83 | } 84 | } 85 | } 86 | } 87 | 88 | #radio-title { 89 | margin-bottom: 5px; 90 | } 91 | -------------------------------------------------------------------------------- /src/components/Customers/TrComponentDetail.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import moment from 'moment'; 3 | import { Link } from "react-router-dom" 4 | 5 | const TrComponent = ({ tableData, companyUsers }) => { 6 | const user = companyUsers?.find(res => res.id === tableData.creator) 7 | return ( 8 | 9 | {tableData && ( 10 | <> 11 | 12 | 13 | {tableData.project_name} 14 | 15 | 16 | {user?.firstname} {user?.lastname} 17 | {tableData.project_technician} 18 | 19 | 20 | {tableData.ses_project_id} 21 | 22 | 23 | {tableData.reference_id} 24 | {moment(tableData.createdAt).format('MM/DD/YYYY')} 25 | 26 | 27 | {tableData.invoice_id} 28 | 29 | 30 | 31 | )} 32 | 33 | ) 34 | } 35 | 36 | export default TrComponent 37 | -------------------------------------------------------------------------------- /src/components/Dashboard/TrComponent.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import moment from 'moment' 3 | import { Link } from 'react-router-dom' 4 | 5 | const TrComponent = ({ tableData }) => { 6 | return ( 7 | 8 | 9 | 10 | {tableData?.project_name} 11 | 12 | 13 | 14 | 15 | {tableData?.customer_name} 16 | 17 | 18 | {tableData?.firstname} {tableData?.lastname} 19 | 20 | 21 | {tableData?.ses_project_id} 22 | 23 | 24 | {tableData?.reference_id} 25 | {moment(tableData?.report_date).format('MM/DD/YYYY')} 26 | 27 | ) 28 | } 29 | 30 | export default TrComponent 31 | -------------------------------------------------------------------------------- /src/components/HorizontalLayout/Footer.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { Link } from "react-router-dom" 3 | import { Container, Row, Col } from "reactstrap" 4 | 5 | const Footer = () => { 6 | return ( 7 | 8 |
9 | 10 | 11 | {new Date().getFullYear()} © Minia. 12 | 13 |
14 | Design & Develop by 15 | 16 | Themesbrand 17 | 18 |
19 | 20 |
21 |
22 |
23 |
24 | ) 25 | } 26 | 27 | export default Footer 28 | -------------------------------------------------------------------------------- /src/components/Invoices/TrComponent.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import moment from 'moment' 3 | import { useHistory, Link } from 'react-router-dom' 4 | 5 | const TrComponent = ({ tableData }) => { 6 | const history = useHistory(); 7 | const goView = val => { 8 | history.push(`/invoices/view/${val}`) 9 | } 10 | return ( 11 | 12 | 13 | 14 | {tableData?.invoice_id} 15 | 16 | 17 | {moment(tableData?.invoice_date).format('MM/DD/YYYY')} 18 | {tableData?.ses_project_id} 19 | {tableData?.customer_name} 20 | {tableData?.reference_id} 21 | {tableData?.status ? ( 22 | Paid 23 | ): Billed} 24 | 25 | {!tableData?.status ? ( 26 | goView(tableData?.project_id)}>Send 27 | ) : ( 28 | goView(tableData?.project_id)}>View 29 | )} 30 | 31 | 32 | ) 33 | } 34 | 35 | export default TrComponent 36 | -------------------------------------------------------------------------------- /src/components/Invoices/TrNewComponent.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import moment from 'moment' 3 | import { useHistory, Link } from 'react-router-dom' 4 | 5 | const TrNewComponent = ({ tableData }) => { 6 | const history = useHistory(); 7 | const goView = val => { 8 | history.push(`/invoices/view/${val}`) 9 | } 10 | return ( 11 | 12 | 13 | 14 | {tableData?.invoice_id} 15 | 16 | 17 | {moment(tableData?.invoice_date).format('MM/DD/YYYY')} 18 | {tableData?.ses_project_id} 19 | {tableData?.customer_name} 20 | {tableData?.reference_id} 21 | {tableData?.status ? ( 22 | Paid 23 | ): Billed} 24 | 25 | {!tableData?.status ? ( 26 | goView(tableData?.project_id)}>Send 27 | ) : ( 28 | goView(tableData?.project_id)}>View 29 | )} 30 | 31 | 32 | ) 33 | } 34 | 35 | export default TrNewComponent 36 | -------------------------------------------------------------------------------- /src/components/Modal/comfirmModal.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import { Modal, Button } from "reactstrap"; 3 | import styled from 'styled-components' 4 | import SuccessModal from './successModal' 5 | import { requestCompany, outUser } from '../../data/comany' 6 | 7 | const Wrapper = styled(Modal)` 8 | & { 9 | padding: 30px; 10 | .modal-body { 11 | text-align: center; 12 | nav { 13 | font-weight: 700; 14 | font-size: 26px; 15 | margin: 15px 0 10px 0; 16 | } 17 | footer { 18 | margin-top: 20px; 19 | botton { 20 | padding-right: 25px; 21 | padding-left: 25px; 22 | } 23 | } 24 | } 25 | } 26 | ` 27 | const ComfirmModal = ({ content, modal_center, tog_center, type, data }) => { 28 | const [modal_center1, setmodal_center] = useState(false); 29 | const [title, setTitle] = useState() 30 | const [contentText, setContentText] = useState() 31 | const onClick = () => { 32 | if (type === 'create-company') { 33 | requestCompany(data).then(() => { 34 | setTitle('Company Creation Request Successfully Submitted!') 35 | setContentText('You have to wait for reply of doptestnetwork site admin') 36 | tog_center() 37 | setmodal_center(true) 38 | }) 39 | // tog_center() 40 | // setmodal_center(!modal_center) 41 | } else if (type === 'out-user') { 42 | outUser(data.id).then(() => { 43 | setTitle('Deleted Successfully!') 44 | setContentText('You deleted this user from company') 45 | tog_center() 46 | setmodal_center(true) 47 | }) 48 | } 49 | } 50 | const tog_center1 = () => { 51 | setmodal_center(false) 52 | } 53 | return ( 54 | <> 55 | { 58 | tog_center() 59 | }} 60 | centered={true} 61 | > 62 |
63 |
{content}
64 |
65 | {' '} 66 | {' '} 67 |
68 |
69 |
70 | 77 | 78 | ) 79 | } 80 | 81 | export default ComfirmModal 82 | -------------------------------------------------------------------------------- /src/components/Modal/notification.js: -------------------------------------------------------------------------------- 1 | import { Button, notification, Space } from 'antd'; 2 | import React from 'react'; 3 | 4 | export const openNotificationWithIcon = (type, message, description) => { 5 | notification[type]({ 6 | message: message, 7 | description: description 8 | }); 9 | }; -------------------------------------------------------------------------------- /src/components/Modal/successModal.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Modal } from "reactstrap"; 3 | import SuccessIcon from '../../assets/images/successIcon.png' 4 | import styled from 'styled-components' 5 | 6 | const Wrapper = styled(Modal)` 7 | & { 8 | padding: 30px; 9 | .modal-body { 10 | text-align: center; 11 | nav { 12 | font-weight: 700; 13 | font-size: 26px; 14 | margin: 15px 0 10px 0; 15 | } 16 | } 17 | } 18 | ` 19 | const successModal = ({ title, content, modal_center, tog_center }) => { 20 | return ( 21 | { 24 | tog_center() 25 | }} 26 | centered={true} 27 | > 28 |
29 |
30 | 31 |
32 | 33 |
{content}
34 |
35 |
36 | ) 37 | } 38 | 39 | export default successModal 40 | -------------------------------------------------------------------------------- /src/components/NonAuthLayout.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types' 3 | import { withRouter } from "react-router-dom" 4 | 5 | const NonAuthLayout = (props) => { 6 | return ( 7 | {props.children} 8 | ); 9 | } 10 | 11 | NonAuthLayout.propTypes = { 12 | children: PropTypes.any, 13 | location: PropTypes.object 14 | } 15 | 16 | export default withRouter(NonAuthLayout) 17 | -------------------------------------------------------------------------------- /src/components/Projects/pdf/styles.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const PrintWrapper = styled.div` 4 | padding: 1.2mm 2mm 1mm 2.6mm; 5 | font-family: Myriad !important; 6 | width: 101.6mm; 7 | height: 75.94mm; 8 | color: black; 9 | .header { 10 | font-size: 12px; 11 | line-height: 15px; 12 | img { 13 | max-width: 100%; 14 | } 15 | } 16 | .body { 17 | line-height: 15px; 18 | font-size: 12px; 19 | } 20 | .title { 21 | text-align: center; 22 | line-height: 16px; 23 | } 24 | .underline { 25 | border-bottom: 1px solid black; 26 | } 27 | .ant-checkbox + span { 28 | font-size: 10px; 29 | } 30 | .ant-checkbox-group { 31 | line-height: 10px; 32 | 33 | } 34 | .dopFailure{ 35 | label:first-child, label:nth-child(3) { 36 | width: 35%; 37 | } 38 | } 39 | .ant-checkbox-inner { 40 | width: 12px; 41 | height: 12px; 42 | border-color: black !important; 43 | } 44 | .ant-checkbox-checked .ant-checkbox-inner { 45 | background-color: black; 46 | } 47 | .ant-checkbox-wrapper span { 48 | color: black; 49 | } 50 | .ant-checkbox + span { 51 | font-size: 11px; 52 | font-weight: 600; 53 | } 54 | ` -------------------------------------------------------------------------------- /src/components/Reports/TrComponent.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import moment from 'moment' 3 | import { useHistory } from 'react-router-dom' 4 | 5 | const TrComponent = ({ tableData, Role }) => { 6 | const history = useHistory(); 7 | const goView = val => { 8 | history.push(`/reports/view/${val}`) 9 | } 10 | return ( 11 | 12 | 13 | {Role !== 9 && ( 14 | goView(tableData?.project_id)}>{tableData?.ses_project_id} 15 | )} 16 | 17 | {moment(tableData?.report_date).format('DD/MM/YYYY')} 18 | {tableData?.pass_num} 19 | {tableData?.fail_num} 20 | {tableData?.customer_name} 21 | {tableData?.reference_id} 22 | Closed 23 | 24 | {Role !== 9 && ( 25 | goView(tableData?.project_id)}>View 26 | )} 27 | 28 | 29 | ) 30 | } 31 | 32 | export default TrComponent 33 | -------------------------------------------------------------------------------- /src/components/Settings/TrComponent.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Select } from 'antd' 3 | import { changeUserRole } from '../../data/comany' 4 | import { openNotificationWithIcon } from '../Modal/notification' 5 | 6 | const { Option } = Select 7 | const TrComponent = ({ tableData, roleList, outUser, currentUser }) => { 8 | const userRoleChange = (val, id) => { 9 | changeUserRole({ id: id, role_id: val }).then(res => { 10 | openNotificationWithIcon('success', 'Note', 'Updated this user role successfully') 11 | }) 12 | } 13 | 14 | const setStatus = user => { 15 | let txt 16 | if (user?.role_id !== 10) { 17 | txt = 'Active' 18 | } else { 19 | if (user?.verified) { 20 | txt = 'Disabled' 21 | } else if (user?.token) { 22 | txt = 'Invitation sent' 23 | } else { 24 | txt = 'Invitation expired' 25 | } 26 | } 27 | return ( 28 | 29 | {txt} 30 | 31 | ) 32 | } 33 | return ( 34 | 35 | {tableData?.firstname} {tableData?.lastname} 36 | {tableData?.email} 37 | 38 | {setStatus(tableData)} 39 | 40 | 41 | {roleList && ( 42 | 57 | )} 58 | 59 | 60 | {currentUser?.role_id === 2 && ( 61 | outUser(tableData?.id)}>Delete 62 | )} 63 | 64 | 65 | ) 66 | } 67 | 68 | export default TrComponent 69 | -------------------------------------------------------------------------------- /src/components/VerticalLayout/Footer.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { Link } from "react-router-dom" 3 | import { Container, Row, Col } from "reactstrap" 4 | 5 | const Footer = () => { 6 | return ( 7 | 8 |
9 | 10 | 11 | {new Date().getFullYear()} © Minia. 12 | 13 |
14 | Design & Develop by 15 | 16 | Themesbrand 17 | 18 |
19 | 20 |
21 |
22 |
23 |
24 | ) 25 | } 26 | 27 | export default Footer 28 | -------------------------------------------------------------------------------- /src/components/VerticalLayout/Sidebar.js: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | import { connect } from "react-redux"; 4 | import { withRouter } from "react-router-dom"; 5 | 6 | //i18n 7 | import { withTranslation } from "react-i18next"; 8 | import SidebarContent from "./SidebarContent"; 9 | 10 | const Sidebar = props => { 11 | 12 | return ( 13 | 14 |
15 |
16 | {props.type !== "condensed" ? : } 17 |
18 |
19 |
20 | ) 21 | } 22 | 23 | Sidebar.propTypes = { 24 | type: PropTypes.string, 25 | } 26 | 27 | const mapStatetoProps = state => { 28 | return { 29 | layout: state.Layout, 30 | } 31 | } 32 | export default connect( 33 | mapStatetoProps, 34 | {} 35 | )(withRouter(withTranslation()(Sidebar))) 36 | -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | google: { 3 | API_KEY: "", 4 | CLIENT_ID: "", 5 | SECRET: "", 6 | }, 7 | facebook: { 8 | APP_ID: "", 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /src/constants/layout.js: -------------------------------------------------------------------------------- 1 | const layoutTypes = { 2 | HORIZONTAL: "horizontal", 3 | VERTICAL: "vertical", 4 | } 5 | 6 | const layoutTheme = { 7 | LIGHTMODE: "light", 8 | DARKMODE: "dark" 9 | } 10 | 11 | const layoutWidthTypes = { 12 | FLUID: "fluid", 13 | BOXED: "boxed", 14 | } 15 | 16 | const layoutPositions = { 17 | SCROLLABLE_TRUE: "true", 18 | SCROLLABLE_FALSE: "false" 19 | } 20 | 21 | const topBarThemeTypes = { 22 | LIGHT: "light", 23 | DARK: "dark" 24 | } 25 | 26 | const leftSidebarTypes = { 27 | DEFAULT: "lg", 28 | COMPACT: "md", 29 | ICON: "sm", 30 | } 31 | 32 | const leftSideBarThemeTypes = { 33 | LIGHT: "light", 34 | COLORED: "brand", 35 | DARK: "dark", 36 | } 37 | 38 | export { 39 | layoutTypes, 40 | layoutTheme, 41 | layoutWidthTypes, 42 | layoutPositions, 43 | topBarThemeTypes, 44 | leftSidebarTypes, 45 | leftSideBarThemeTypes, 46 | } 47 | -------------------------------------------------------------------------------- /src/data/comany.js: -------------------------------------------------------------------------------- 1 | import { get, post } from "../helpers/api_helper" 2 | import * as url from "../helpers/url_helper" 3 | 4 | export const requestCompany = data => post(url.REQUEST_COMPANY, data) 5 | export const requestCheck = data => post(url.REQUEST_CHECK, data) 6 | export const updateCompany = data => post(`/company/update/${data.id}`, data) 7 | export const getStuffs = data => post(`/company/getStuffs/${data.company_id}`, data.data) 8 | export const outUser = data => post('/auth/outUser', {id: data}) 9 | export const getAllStuffsNotImported = () => get('/auth/getAllStuffsNotImported') 10 | export const changeUserRole = data => post('/auth/changeUserRole', data) 11 | export const getAllCompany = data => get('/company/getApprove') 12 | export const getCompany = data => get('/company/get') 13 | export const companyApproveState = data => post(`/company/updateCompany/${data.id}`, data) 14 | export const companyDelete = data => post(`/company/remove/${data.id}`, data) 15 | 16 | export const getCompanyInfo = data => get(`/company/get/${data.id}`) 17 | export const setBankAccount = data => post(`/company/setBankAccount`, data) 18 | 19 | export const getTransactions = data => post(`/company/getTransactions`, data) 20 | export const getRootAmount = data => post(`/company/getRootAmount`, data) 21 | export const getCompanyBalance = data => post(`/company/getCompanyBalance`, data) 22 | export const getTransactionInfo = data => post('/company/getTransactionInfo', data) 23 | export const getTransactionsByCompany = data => post('/company/getTransactionsByCompany', data) 24 | 25 | export const BackupDatabase = () => get('/backup') 26 | -------------------------------------------------------------------------------- /src/data/customer.js: -------------------------------------------------------------------------------- 1 | import { del, get, post } from "../helpers/api_helper" 2 | 3 | export const createCustomer = data => post('/customer/create', data) 4 | export const getCustomer = data => get(`/customer/get/${data.id}/${data.company_id}`) 5 | export const updateCoustomer = data => post(`/customer/update/${data.id}`, data) 6 | export const DeleteCustomer = data => del(`/customer/remove/${data.id}`) -------------------------------------------------------------------------------- /src/data/invoice.js: -------------------------------------------------------------------------------- 1 | import { get, post } from "../helpers/api_helper" 2 | 3 | export const SendInvoice = data => post('/invoice/sendInvoice', data) 4 | export const getInvoiceNum = data => get(`/invoice/getInvoiceNum/${data.id}`) 5 | 6 | export const getInvoice = data => get(`/invoice/get/${data.id}`) 7 | export const paymentSecret = data => post(`/invoice/paymentSecret`, data) 8 | export const payed = data => post(`/invoice/payed`, data) 9 | export const getInvoiceByCompany = data => post(`/invoice/getInvoiceByCompany/${data.id}`, data) 10 | 11 | export const getAccount = () => get(`/invoice/getAccount`) 12 | export const transterToCompany = data => post(`/invoice/pay`, data) 13 | 14 | export const CreateSubscription = data => post('/invoice/createSubscription', data) 15 | export const createPortalSession = data => post('/invoice/createPortalSession', data) 16 | export const CancelSubscription = data => post('/invoice/cancelSubscription', data) 17 | -------------------------------------------------------------------------------- /src/data/notificate_invite.js: -------------------------------------------------------------------------------- 1 | import { post } from "../helpers/api_helper" 2 | 3 | export const inviteUser = data => post(`/notificateInvite/sendEmailToRequester`, data) 4 | export const requestCompanyFromRequester = data => post('/notificateInvite/requestCompanyFromRequester', data) 5 | -------------------------------------------------------------------------------- /src/data/project.js: -------------------------------------------------------------------------------- 1 | import { del, get, post } from "../helpers/api_helper" 2 | 3 | export const createProject = data => post('/project/create', data) 4 | export const getProject = data => get(`/project/get/${data.id}`) 5 | export const updateProject = data => post(`/project/update/${data.id}`, data) 6 | export const DeleteProject = data => del(`/project/remove/${data.id}`) 7 | 8 | export const CreateMachine = data => post(`/machine/create`, data) 9 | export const getMachine = data => get(`/machine/get/${data.id}`) 10 | export const getMachinesNum = data => get(`/machine/getDopCertificateNum/${data.id}`) 11 | export const EditMachine = data => post(`/machine/update/${data.id}`, data) 12 | export const DeleteMachine = data => del(`/machine/remove/${data.id}`) 13 | 14 | export const getDopInfo = data => get(`/machine/getDop/${data.id}`) 15 | export const getDopsInfo = data => get(`/machine/getDops/${data.project_id}`) -------------------------------------------------------------------------------- /src/data/report.js: -------------------------------------------------------------------------------- 1 | import { post } from "../helpers/api_helper" 2 | 3 | export const SendReport = data => post('/report/sendReport', data) 4 | export const getReportByUser = data => post('/report/getReportByUser', data) 5 | export const getUserById = data => post('/report/getUserById', data) 6 | export const getS3Image = data => post('/report/getS3Image', data) 7 | export const getS3ImagesWithSignature = data => post('/report/getS3ImagesWithSignature', data) 8 | export const deleteImage = data => post('/delete', data) 9 | export const checkReportStatusById = data => post('/report/checkReportStatusById', data) 10 | 11 | -------------------------------------------------------------------------------- /src/data/role.js: -------------------------------------------------------------------------------- 1 | import { del, get, post, put } from "../helpers/api_helper" 2 | 3 | export const getRoles = () => get('/role/get') 4 | export const addUserToCompany = data => post('/auth/addUserToCompany', data) -------------------------------------------------------------------------------- /src/data/swr/customers/customers.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { post } from "../../../helpers/api_helper" 3 | 4 | const NotificationCompanyAdminData = res => { 5 | const { data, error, mutate } = useSWR([`/customer/getCompany/${res.company_id}`, res.data], url => 6 | post(url, res.data) 7 | ) 8 | return { 9 | result: data, 10 | error, 11 | mutate 12 | } 13 | } 14 | export default NotificationCompanyAdminData -------------------------------------------------------------------------------- /src/data/swr/customers/getCustomers.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { get } from "../../../helpers/api_helper" 3 | 4 | const NotificationCompanyAdminData = res => { 5 | const { data, error, mutate } = useSWR(`/customer/getCompany/${res.company_id}`, get) 6 | return { 7 | result: data, 8 | error, 9 | mutate 10 | } 11 | } 12 | export default NotificationCompanyAdminData -------------------------------------------------------------------------------- /src/data/swr/invoices/invoiceProjectId.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { get } from "../../../helpers/api_helper" 3 | 4 | const GetInvoices = res => { 5 | const { data, error, mutate } = useSWR(`/invoice/getByProject/${res.project_id}`, get) 6 | return { 7 | result: data, 8 | error, 9 | mutate 10 | } 11 | } 12 | export default GetInvoices -------------------------------------------------------------------------------- /src/data/swr/invoices/invoices.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { post } from "../../../helpers/api_helper" 3 | 4 | const GetReports = res => { 5 | const { data, error, mutate } = useSWR([`/invoice/getAll/${res.company_id}`, res.data], url => 6 | post(url, res.data) 7 | ) 8 | return { 9 | result: data, 10 | error, 11 | mutate 12 | } 13 | } 14 | export default GetReports -------------------------------------------------------------------------------- /src/data/swr/machines/machines.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { get } from "../../../helpers/api_helper" 3 | 4 | const GetMachines = res => { 5 | const { data, error, mutate } = useSWR(`/machine/getAll/${res.project_id}`, get) 6 | return { 7 | result: data, 8 | error, 9 | mutate 10 | } 11 | } 12 | export default GetMachines -------------------------------------------------------------------------------- /src/data/swr/notifications/notificationCompanyAdminData.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { post } from "../../../helpers/api_helper" 3 | 4 | const NotificationCompanyAdminData = res => { 5 | const { data, error, mutate } = useSWR(`/notificationCompanyAdminData/${res.company_id}/${res.id}`, post) 6 | return { 7 | result: data, 8 | error, 9 | mutate 10 | } 11 | } 12 | export default NotificationCompanyAdminData -------------------------------------------------------------------------------- /src/data/swr/notifications/notificationCompanyUserData.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { get } from "../../../helpers/api_helper" 3 | 4 | const NotificationCompanyUserData = res => { 5 | const { data, error, mutate } = useSWR(`/notificationCompanyUserData/${res.id}`, get) 6 | return { 7 | result: data, 8 | error, 9 | mutate 10 | } 11 | } 12 | export default NotificationCompanyUserData -------------------------------------------------------------------------------- /src/data/swr/notifications/notificationSiteAdminData.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { get } from "../../../helpers/api_helper" 3 | 4 | const NotificationSiteAdminData = () => { 5 | const { data, error, mutate } = useSWR('/notificationSiteAdminData', get) 6 | return { 7 | result: data, 8 | error, 9 | mutate 10 | } 11 | } 12 | export default NotificationSiteAdminData -------------------------------------------------------------------------------- /src/data/swr/projects/project.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { post } from "../../../helpers/api_helper" 3 | 4 | const GetProject = res => { 5 | const { data, error, mutate } = useSWR([`/project/getProject/${res.company_id}`, res.data], url => 6 | post(url, res.data) 7 | ) 8 | return { 9 | result: data, 10 | error, 11 | mutate 12 | } 13 | } 14 | export default GetProject -------------------------------------------------------------------------------- /src/data/swr/projects/projectByCustomerId.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { get } from "../../../helpers/api_helper" 3 | 4 | const GetProject = res => { 5 | const { data, error, mutate } = useSWR(`/project/getProjects/${res.customer_id}`, get) 6 | return { 7 | result: data, 8 | error, 9 | mutate 10 | } 11 | } 12 | export default GetProject -------------------------------------------------------------------------------- /src/data/swr/reports/reports.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { post } from "../../../helpers/api_helper" 3 | 4 | const GetReports = res => { 5 | const { data, error, mutate } = useSWR([`/report/getAll/${res.company_id}`, res.data], url => 6 | post(url, res.data) 7 | ) 8 | return { 9 | result: data, 10 | error, 11 | mutate 12 | } 13 | } 14 | export default GetReports -------------------------------------------------------------------------------- /src/data/swr/reports/reportsDashboard.js: -------------------------------------------------------------------------------- 1 | import useSWR from 'swr' 2 | import { post } from "../../../helpers/api_helper" 3 | 4 | const GetReports = res => { 5 | const { data, error, mutate } = useSWR([`/report/getAllDahshboard/${res.company_id}`, res.data], url => 6 | post(url, res.data) 7 | ) 8 | return { 9 | result: data, 10 | error, 11 | mutate 12 | } 13 | } 14 | export default GetReports -------------------------------------------------------------------------------- /src/data/user.js: -------------------------------------------------------------------------------- 1 | import { get, post } from "../helpers/api_helper" 2 | 3 | export const changeUserProfile = data => post('/auth/changeUserProfile', data) 4 | export const sendEmail = data => post('/send-email', data) 5 | export const sendPass = data => post('/send-pass', data) 6 | export const checkResetPassword = data => post('/change-pass', data) 7 | export const getUserCompanyInfo = data => post('/auth/getUserCompanyInfo', data) 8 | export const notificationCompanyAdminData = () => get('/notificationSiteAdminData') 9 | export const joinToCompany = data => post('/auth/joinToCompany', data) 10 | export const getUsersByCompanyId = data => get(`/auth/getUsersByCompanyId/${data.company_id}`) 11 | 12 | export const joinToCompanyApprove = data => post('/auth/joinToCompanyApprove', data) 13 | export const getAdmins = data => post('/auth/getAdmins', data) 14 | 15 | export const DeleteUser = data => post('/auth/delete', data) 16 | 17 | export const getUserByToken = data => post('/getUserByToken', data) 18 | 19 | export const getUser = data => post('/auth/getUser', data) -------------------------------------------------------------------------------- /src/helpers/api_helper.js: -------------------------------------------------------------------------------- 1 | import axios from "axios" 2 | import accessToken from "./jwt-token-access/accessToken" 3 | import { openNotificationWithIcon } from "../components/Common/openNotificationWithIcon"; 4 | 5 | //pass new generated access token here 6 | const token = accessToken 7 | 8 | //apply base url for axios 9 | const API_URL = process.env.REACT_APP_API_URL 10 | 11 | export const axiosApi = axios.create({ 12 | baseURL: API_URL, 13 | }) 14 | 15 | axiosApi.defaults.headers.common["Authorization"] = token 16 | 17 | axiosApi.interceptors.response.use( 18 | response => response, 19 | error => Promise.reject(error) 20 | ) 21 | 22 | export async function get(url, config = {}) { 23 | return await axiosApi.get(url, { ...config }).then(response => response?.data) 24 | } 25 | 26 | export async function post(url, data, config = {}) { 27 | return axiosApi 28 | .post(url, { ...data }, { ...config }) 29 | .then(response => response?.data) 30 | .catch((error) => handleError(error?.response?.data)) 31 | } 32 | 33 | export async function put(url, data, config = {}) { 34 | return axiosApi 35 | .put(url, { ...data }, { ...config }) 36 | .then(response => response?.data) 37 | } 38 | 39 | export async function del(url, config = {}) { 40 | return await axiosApi 41 | .delete(url, { ...config }) 42 | .then(response => response?.data) 43 | } 44 | 45 | const handleError = (err) => { 46 | if (err?.response?.status === 403) { 47 | console.log(err) 48 | } 49 | openNotificationWithIcon().error( 50 | err.message 51 | ); 52 | throw { err }; 53 | }; -------------------------------------------------------------------------------- /src/helpers/jwt-token-access/accessToken.js: -------------------------------------------------------------------------------- 1 | 2 | const user = JSON.parse(localStorage.getItem("access_token")) 3 | const accessToken = 4 | "Bearer " + user 5 | export default accessToken 6 | -------------------------------------------------------------------------------- /src/helpers/jwt-token-access/auth-token-header.js: -------------------------------------------------------------------------------- 1 | export default function authHeader() { 2 | const obj = JSON.parse(localStorage.getItem("authUser")) 3 | 4 | if (obj && obj.accessToken) { 5 | return { Authorization: obj.accessToken } 6 | } else { 7 | return {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/i18n.js: -------------------------------------------------------------------------------- 1 | import i18n from "i18next" 2 | import detector from "i18next-browser-languagedetector" 3 | import { initReactI18next } from "react-i18next" 4 | 5 | import translationGr from "./locales/gr/translation.json" 6 | import translationIT from "./locales/it/translation.json" 7 | import translationRS from "./locales/rs/translation.json" 8 | import translationSP from "./locales/sp/translation.json" 9 | import translationENG from "./locales/eng/translation.json" 10 | 11 | // the translations 12 | const resources = { 13 | gr: { 14 | translation: translationGr, 15 | }, 16 | it: { 17 | translation: translationIT, 18 | }, 19 | rs: { 20 | translation: translationRS, 21 | }, 22 | sp: { 23 | translation: translationSP, 24 | }, 25 | eng: { 26 | translation: translationENG, 27 | }, 28 | } 29 | 30 | const language = localStorage.getItem("I18N_LANGUAGE") 31 | if (!language) { 32 | localStorage.setItem("I18N_LANGUAGE", "en") 33 | } 34 | 35 | i18n 36 | .use(detector) 37 | .use(initReactI18next) // passes i18n down to react-i18next 38 | .init({ 39 | resources, 40 | lng: localStorage.getItem("I18N_LANGUAGE") || "en", 41 | fallbackLng: "en", // use en if detected lng is not available 42 | 43 | keySeparator: false, // we do not use keys in form messages.welcome 44 | 45 | interpolation: { 46 | escapeValue: false, // react already safes from xss 47 | }, 48 | }) 49 | 50 | export default i18n 51 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import ReactDOM from "react-dom" 3 | import App from "./App" 4 | import { BrowserRouter } from "react-router-dom" 5 | import "./i18n" 6 | import { Provider } from "react-redux" 7 | import { Elements } from '@stripe/react-stripe-js' 8 | import { loadStripe } from '@stripe/stripe-js' 9 | 10 | import store from "./store" 11 | 12 | const stripePromise = loadStripe(process.env.REACT_APP_STRIPE_PUBLISHABLE_KEY) 13 | 14 | const app = ( 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ) 23 | 24 | ReactDOM.render(app, document.getElementById("root")) 25 | -------------------------------------------------------------------------------- /src/locales/eng/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dashboard": "Dashboard", 3 | "Companies": "Companies", 4 | "Users": "Users", 5 | "Profile": "Profile", 6 | "Transactions": "Actas" 7 | } 8 | -------------------------------------------------------------------------------- /src/locales/gr/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dashboard": "Instrumententafel", 3 | "Companies": "Firmen", 4 | "Users": "Benutzer", 5 | "Profile": "Es ist", 6 | "Transactions": "Transaktionen" 7 | } 8 | -------------------------------------------------------------------------------- /src/locales/it/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dashboard": "Pannello di controllo", 3 | "Companies": "aziende", 4 | "Users": "utenti", 5 | "Profile": "È", 6 | "Transactions": "Transazioni" 7 | } 8 | -------------------------------------------------------------------------------- /src/locales/rs/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dashboard": "Приборная панель", 3 | "Companies": "компании", 4 | "Users": "пользователи", 5 | "Profile": "Это", 6 | "Transactions": "Транзакции" 7 | } 8 | -------------------------------------------------------------------------------- /src/locales/sp/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dashboard": "Tablero", 3 | "Companies": "compañías", 4 | "Users": "usuarios", 5 | "Profile": "Es", 6 | "Transactions": "Actas" 7 | } -------------------------------------------------------------------------------- /src/pages/Authentication/CarouselPage.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const CarouselPage = () => { 4 | 5 | return ( 6 | 7 |
8 |
9 |
10 |
    11 |
  • 12 |
  • 13 |
  • 14 |
  • 15 |
  • 16 |
  • 17 |
  • 18 |
  • 19 |
  • 20 |
  • 21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | ); 38 | }; 39 | 40 | export default CarouselPage; 41 | -------------------------------------------------------------------------------- /src/pages/Authentication/Logout.js: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types" 2 | import React, { useEffect } from "react" 3 | import { withRouter } from "react-router-dom" 4 | 5 | import { logoutUser } from "../../store/actions" 6 | 7 | //redux 8 | import { useDispatch } from "react-redux" 9 | 10 | const Logout = props => { 11 | const dispatch = useDispatch() 12 | 13 | useEffect(() => { 14 | dispatch(logoutUser(props.history)) 15 | }, [dispatch, props.history]) 16 | 17 | return <> 18 | } 19 | 20 | Logout.propTypes = { 21 | history: PropTypes.object, 22 | } 23 | 24 | export default withRouter(Logout) 25 | -------------------------------------------------------------------------------- /src/pages/Authentication/VerifyEmail.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react'; 2 | import { useParams } from "react-router-dom"; 3 | import MetaTags from 'react-meta-tags'; 4 | import { useSelector, useDispatch } from "react-redux"; 5 | 6 | //import images 7 | import logo from '../../assets/images/logo-sm-full.png' 8 | import { verifyUser } from "../../store/actions" 9 | 10 | const VerifyEmail = props => { 11 | const { token } = useParams(); 12 | const dispatch = useDispatch() 13 | 14 | const { message } = useSelector(state => ({ 15 | message: state.Login.verifyMessage, 16 | })) 17 | useEffect(() => { 18 | dispatch(verifyUser(token, props.history)); 19 | }, [dispatch]); 20 | 21 | return ( 22 | <> 23 | 24 | Verifying | DOP Test Network 25 | 26 |
32 | 33 |
34 |
46 | {message && ( 47 | message === 'failed' && ( 48 |
49 | Email Verification was failed! 50 |
51 | ) 52 | )} 53 | {message && ( 54 | message === 'verifying' && ( 55 |
56 | Verifying your email.... 57 |
58 | ) 59 | )} 60 | {message && ( 61 | message === 'success' && ( 62 |
63 | Verified successfully 64 |
65 | ) 66 | )} 67 |
68 | 69 | ) 70 | } 71 | 72 | export default VerifyEmail; -------------------------------------------------------------------------------- /src/pages/Dashboard/styles.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const Wrapper = styled.div` 4 | .plusIcon { 5 | position: absolute; 6 | bottom: -15px; 7 | right: -5px; 8 | svg path:first-child { 9 | transition: fill 0.7s; 10 | } 11 | svg path:nth-child(2) { 12 | fill: #D14124; 13 | } 14 | } 15 | .btnLinkGroup { 16 | margin-bottom: 30px; 17 | .col-md-2>div { 18 | cursor: pointer; 19 | } 20 | .col-md-2>div:first-child { 21 | font-family: 'Montserrat'; 22 | font-style: normal; 23 | font-weight: 500; 24 | font-size: 20px; 25 | line-height: 24px; 26 | text-align: center; 27 | color: #7F7F7F; 28 | background: #FFFFFF; 29 | box-shadow: 0px 4px 25px rgba(0, 0, 0, 0.06); 30 | border-radius: 4px; 31 | padding: 30px 0; 32 | transition: box-shadow 0.7s; 33 | &>div { 34 | margin-top: 10px; 35 | } 36 | } 37 | .col-md-2:hover { 38 | &>div:first-child { 39 | box-shadow: 0px 4px 25px 10px rgb(0 0 0 / 6%); 40 | } 41 | .plusIcon svg path:first-child { 42 | fill: #D14124; 43 | } 44 | .plusIcon svg path:nth-child(2) { 45 | fill: white; 46 | } 47 | } 48 | .col-md-2:not(:last-child) { 49 | padding-right: 0px 10px; 50 | } 51 | } 52 | .tableTitle { 53 | font-weight: 700; 54 | font-size: 18px; 55 | letter-spacing: -0.02em; 56 | color: #333333; 57 | margin-bottom: 15px; 58 | } 59 | table { 60 | tr { 61 | border-style: none !important; 62 | th { 63 | background: #ccc; 64 | } 65 | td:not(:last-child), th:not(:last-child) { 66 | position: relative; 67 | &::after { 68 | height: 50%; 69 | border-right: 1px solid gainsboro; 70 | content: ''; 71 | position: absolute; 72 | right: 0; 73 | } 74 | } 75 | td.greenBg { 76 | color: #00B031; 77 | font-weight: 700; 78 | } 79 | } 80 | } 81 | ` -------------------------------------------------------------------------------- /src/pages/Invoices/index.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import MetaTags from 'react-meta-tags'; 3 | import { Pagination, Spin } from 'antd' 4 | import Breadcrumbs from "../../components/Common/Breadcrumb"; 5 | import TrNewComponent from '../../components/Invoices/TrNewComponent' 6 | import { 7 | Container, 8 | Table 9 | } from "reactstrap"; 10 | import * as ST from './styles' 11 | import { getInvoiceHistoriesByCompany } from "../../store/actions.js" 12 | import { useSelector, useDispatch } from "react-redux" 13 | 14 | const Invoices = () => { 15 | const dispatch = useDispatch(); 16 | const [loading, setLoading] = useState(false) 17 | const { currentUser } = useSelector(state => ({ 18 | currentUser: state.Login.user 19 | })) 20 | const { allInvoiceHistories } = useSelector(state => state.invoices) 21 | 22 | useEffect(() => { 23 | if(currentUser?.company_id) { 24 | dispatch(getInvoiceHistoriesByCompany(currentUser.company_id)) 25 | } 26 | }, [currentUser]) 27 | 28 | return ( 29 | 30 |
31 | 32 | Invoices | DOP Test Network 33 | 34 | {currentUser?.role_id !== 10 && ( 35 | 36 | 37 | 38 | {!loading ? ( 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | {allInvoiceHistories && allInvoiceHistories.map((res, index) => ( 54 | 55 | ))} 56 | 57 | 58 |
Invoice #Invoice DateSES Project #CustomerReference #StatusRe-Send
59 |
60 | ) : ( 61 |
62 | 63 |
64 | )} 65 | 66 |
67 |
68 | )} 69 |
70 |
71 | ) 72 | } 73 | 74 | export default Invoices -------------------------------------------------------------------------------- /src/pages/NewCoustomer/styles.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const Wrapper = styled.div` 4 | & { 5 | .ant-form-item-explain-error { 6 | margin-top: -7px; 7 | } 8 | header { 9 | font-size: 15px; 10 | cursor: pointer; 11 | display: inline-block; 12 | span { 13 | line-height: 15px; 14 | margin-left: 4px; 15 | } 16 | i, span { 17 | line-height: 15px; 18 | } 19 | } 20 | .ant-form-item { 21 | margin-bottom: 0 !important; 22 | } 23 | .form-group { 24 | margin-bottom: 15px; 25 | position: relative; 26 | span.inputTitle { 27 | position: absolute; 28 | top: -10px; 29 | left: 15px; 30 | padding: 0 8px; 31 | background: white; 32 | } 33 | img, .anticon.anticon-down { 34 | position: absolute; 35 | top: 12px; 36 | right: 10px; 37 | width: 12px; 38 | height: auto; 39 | } 40 | } 41 | .profileImg img { 42 | border-radius: 100%; 43 | } 44 | #signature { 45 | display: flex; 46 | height: 100%; 47 | } 48 | #signature ~ img { 49 | top: calc(50% - 5px) !important; 50 | } 51 | .col-md-5 button { 52 | width: 100%; 53 | background: linear-gradient(90deg, #D14124 -0.05%, #B02509 99.95%); 54 | box-shadow: 0px 4px 25px rgba(255, 0, 0, 0.2); 55 | border-radius: 4px; 56 | color: white; 57 | } 58 | .row.header { 59 | font-family: 'Montserrat'; 60 | font-weight: 700; 61 | font-style: normal; 62 | font-size: 22px; 63 | text-align: center; 64 | margin-bottom: 30px; 65 | } 66 | .row:last-child { 67 | display: flex; 68 | justify-content: center; 69 | margin-top: 30px; 70 | } 71 | } 72 | ` -------------------------------------------------------------------------------- /src/pages/NewProject/styles.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const Wrapper = styled.div` 4 | & { 5 | .customerSelect { 6 | .ant-form-item-explain-error { 7 | margin-top: 0px !important; 8 | } 9 | } 10 | .ant-form-item-explain-error { 11 | margin-top: -10px; 12 | } 13 | header { 14 | font-size: 15px; 15 | cursor: pointer; 16 | display: inline-block; 17 | span { 18 | line-height: 15px; 19 | margin-left: 4px; 20 | } 21 | i, span { 22 | line-height: 15px; 23 | } 24 | } 25 | .form-group { 26 | margin-bottom: 15px; 27 | position: relative; 28 | span.inputTitle { 29 | position: absolute; 30 | top: -10px; 31 | left: 15px; 32 | padding: 0 8px; 33 | background: white; 34 | } 35 | img { 36 | position: absolute; 37 | top: 12px; 38 | right: 10px; 39 | width: 12px; 40 | height: auto; 41 | } 42 | } 43 | .col-md-5 button { 44 | width: 100%; 45 | background: linear-gradient(90deg, #D14124 -0.05%, #B02509 99.95%); 46 | box-shadow: 0px 4px 25px rgba(255, 0, 0, 0.2); 47 | border-radius: 4px; 48 | color: white; 49 | } 50 | header ~ .row:nth-child(3) { 51 | margin-top: 10px; 52 | font-family: 'Montserrat'; 53 | font-weight: 700; 54 | font-style: normal; 55 | font-size: 22px; 56 | text-align: center; 57 | margin-bottom: 30px; 58 | } 59 | .row:last-child { 60 | display: flex; 61 | justify-content: center; 62 | margin-top: 50px; 63 | } 64 | } 65 | .antdSelect .ant-select-selector { 66 | height: 38px; 67 | border-radius: 0.25rem; 68 | } 69 | ` -------------------------------------------------------------------------------- /src/pages/Reports/index.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import MetaTags from 'react-meta-tags'; 3 | import { Spin } from 'antd' 4 | import Breadcrumbs from "../../components/Common/Breadcrumb"; 5 | import TrComponent from '../../components/Reports/TrComponent' 6 | import { 7 | Container, 8 | Table 9 | } from "reactstrap"; 10 | import * as ST from './styles' 11 | import { getReportHistoriesByCompany } from "../../store/actions.js" 12 | import { useSelector, useDispatch } from "react-redux" 13 | 14 | const Reports = () => { 15 | const dispatch = useDispatch(); 16 | const { currentUser } = useSelector(state => ({currentUser: state.Login.user})) 17 | const { report_histories, loading } = useSelector(state => state.reports) 18 | useEffect(() => { 19 | if(currentUser?.company_id) { 20 | dispatch(getReportHistoriesByCompany(currentUser.company_id)) 21 | } 22 | }, [currentUser]) 23 | 24 | return ( 25 | 26 |
27 | 28 | Reports | DOP Test Network 29 | 30 | {currentUser?.role_id !== 10 && ( 31 | 32 | 33 | 34 | {!loading ? ( 35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | {report_histories && report_histories.map((res, index) => ( 51 | 52 | ))} 53 | 54 |
Project NumberDatePassFailCustomerReference #StatusReport
55 |
56 | ) : ( 57 |
58 | 59 |
60 | )} 61 |
62 |
63 | )} 64 |
65 |
66 | ) 67 | } 68 | 69 | export default Reports -------------------------------------------------------------------------------- /src/pages/Settings/CompaniesBankCheck.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react'; 2 | import { openNotificationWithIcon } from '../../components/Modal/notification' 3 | import { useHistory, useParams } from 'react-router-dom' 4 | import { useSelector } from "react-redux" 5 | import { setBankAccount } from '../../data/comany' 6 | 7 | const CompanyBankCheck = () => { 8 | const { id } = useParams(); 9 | const history = useHistory(); 10 | 11 | const { currentUser } = useSelector(state => ({ 12 | currentUser: state.Login.user 13 | })) 14 | 15 | useEffect(() => { 16 | if (id === 'error') { 17 | openNotificationWithIcon('error', 'Note', 'Occuring error while connecting bank account, please try again.') 18 | history.push('/settings/company') 19 | } else { 20 | setBankAccount({ company_id: currentUser.company_id, bank_account: id }).then(res => { 21 | openNotificationWithIcon('success', 'Note', 'Was connecting your bank account successfully') 22 | history.push('/settings/company') 23 | }) 24 | } 25 | }, [id]) 26 | 27 | return ( 28 | <> 29 | ) 30 | } 31 | 32 | export default CompanyBankCheck -------------------------------------------------------------------------------- /src/pages/Settings/Signature.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import SignaturePad from 'react-signature-canvas' 3 | import { Button } from 'antd' 4 | 5 | class Signature extends Component { 6 | // state = {trimmedDataURL: null} 7 | sigPad = {} 8 | clear = () => { 9 | this.sigPad.clear() 10 | } 11 | trim = () => { 12 | // this.setState({trimmedDataURL: this.sigPad.getTrimmedCanvas() 13 | // .toDataURL('image/png')}) 14 | this.props.signature(this.sigPad.getTrimmedCanvas().toDataURL('image/png')) 15 | } 16 | render () { 17 | // let {trimmedDataURL} = this.state 18 | return
19 |
22 | { this.sigPad = ref }} /> 25 |
26 |
27 | 30 | 33 |
34 | {/* {trimmedDataURL 35 | ? 38 | : null} */} 39 |
40 | } 41 | } 42 | 43 | export default Signature 44 | 45 | -------------------------------------------------------------------------------- /src/pages/Stripe/styles.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const Wrapper = styled.div` 4 | .containerFix { 5 | padding: 0 80px; 6 | } 7 | header { 8 | margin-top: 50px; 9 | margin-bottom: 30px; 10 | text-align: center; 11 | } 12 | .StripeElement { 13 | height: 40px; 14 | padding: 10px 12px; 15 | width: 100%; 16 | color: #32325d; 17 | background-color: white; 18 | border: 1px solid transparent; 19 | border-radius: 4px; 20 | 21 | box-shadow: 0 1px 3px 0 #e6ebf1; 22 | -webkit-transition: box-shadow 150ms ease; 23 | transition: box-shadow 150ms ease; 24 | } 25 | 26 | .StripeElement--focus { 27 | box-shadow: 0 1px 3px 0 #cfd7df; 28 | } 29 | 30 | .StripeElement--invalid, 31 | .invalid { 32 | border-color: #fa755a; 33 | } 34 | 35 | .StripeElement--webkit-autofill { 36 | background-color: #fefde5 !important; 37 | } 38 | .cardInfoRow { 39 | label { 40 | margin: 5px 0; 41 | } 42 | } 43 | .error { 44 | color: tomato; 45 | margin-bottom: 5px; 46 | } 47 | ` -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/routes/middleware/Authmiddleware.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import PropTypes from "prop-types" 3 | import { Route, Redirect } from "react-router-dom" 4 | import jwt from 'jwt-decode' 5 | 6 | const Authmiddleware = ({ 7 | component: Component, 8 | layout: Layout, 9 | isAuthProtected, 10 | isAdminProtected, 11 | ...rest 12 | }) => ( 13 | { 16 | const user = localStorage.getItem('access_token') && jwt(localStorage.getItem('access_token')) 17 | 18 | if (isAuthProtected && !localStorage.getItem("access_token")) { 19 | return ( 20 | 23 | ) 24 | } 25 | // // pass only site super admin 26 | if (isAdminProtected && user.role_id !== 1) { 27 | return ( 28 | 31 | ) 32 | } 33 | 34 | return ( 35 | 36 | 37 | 38 | ) 39 | }} 40 | /> 41 | ) 42 | 43 | Authmiddleware.propTypes = { 44 | isAuthProtected: PropTypes.bool, 45 | component: PropTypes.any, 46 | location: PropTypes.object, 47 | layout: PropTypes.any, 48 | } 49 | 50 | export default Authmiddleware; 51 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /src/store/actions.js: -------------------------------------------------------------------------------- 1 | export * from "./layout/actions" 2 | 3 | // Authentication module 4 | export * from "./auth/register/actions" 5 | export * from "./auth/login/actions" 6 | export * from "./auth/forgetpwd/actions" 7 | export * from "./auth/profile/actions" 8 | 9 | //Calendar 10 | export * from "./calendar/actions" 11 | 12 | //chat 13 | export * from "./chat/actions" 14 | 15 | //invoices 16 | export * from "./invoices/actions" 17 | 18 | //reports 19 | export * from './reports/actions' 20 | 21 | // contacts 22 | export * from "./contacts/actions" 23 | -------------------------------------------------------------------------------- /src/store/auth/forgetpwd/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const FORGET_PASSWORD = "FORGET_PASSWORD" 2 | export const FORGET_PASSWORD_SUCCESS = "FORGET_PASSWORD_SUCCESS" 3 | export const FORGET_PASSWORD_ERROR = "FORGET_PASSWORD_ERROR" 4 | -------------------------------------------------------------------------------- /src/store/auth/forgetpwd/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | FORGET_PASSWORD, 3 | FORGET_PASSWORD_SUCCESS, 4 | FORGET_PASSWORD_ERROR, 5 | } from "./actionTypes" 6 | 7 | export const userForgetPassword = (user, history) => { 8 | return { 9 | type: FORGET_PASSWORD, 10 | payload: { user, history }, 11 | } 12 | } 13 | 14 | export const userForgetPasswordSuccess = message => { 15 | return { 16 | type: FORGET_PASSWORD_SUCCESS, 17 | payload: message, 18 | } 19 | } 20 | 21 | export const userForgetPasswordError = message => { 22 | return { 23 | type: FORGET_PASSWORD_ERROR, 24 | payload: message, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/store/auth/forgetpwd/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | FORGET_PASSWORD, 3 | FORGET_PASSWORD_SUCCESS, 4 | FORGET_PASSWORD_ERROR, 5 | } from "./actionTypes" 6 | 7 | const initialState = { 8 | forgetSuccessMsg: null, 9 | forgetError: null, 10 | } 11 | 12 | const forgetPassword = (state = initialState, action) => { 13 | switch (action.type) { 14 | case FORGET_PASSWORD: 15 | state = { 16 | ...state, 17 | forgetSuccessMsg: null, 18 | forgetError: null, 19 | } 20 | break 21 | case FORGET_PASSWORD_SUCCESS: 22 | state = { 23 | ...state, 24 | forgetSuccessMsg: action.payload, 25 | } 26 | break 27 | case FORGET_PASSWORD_ERROR: 28 | state = { ...state, forgetError: action.payload } 29 | break 30 | default: 31 | state = { ...state } 32 | break 33 | } 34 | return state 35 | } 36 | 37 | export default forgetPassword 38 | -------------------------------------------------------------------------------- /src/store/auth/forgetpwd/saga.js: -------------------------------------------------------------------------------- 1 | import { takeEvery, fork, put, all, call } from "redux-saga/effects" 2 | 3 | // Login Redux States 4 | import { FORGET_PASSWORD } from "./actionTypes" 5 | import { userForgetPasswordSuccess, userForgetPasswordError } from "./actions" 6 | 7 | //Include Both Helper File with needed methods 8 | import { getFirebaseBackend } from "../../../helpers/firebase_helper" 9 | import { 10 | postFakeForgetPwd, 11 | postJwtForgetPwd, 12 | } from "../../../helpers/backend_helper" 13 | 14 | const fireBaseBackend = getFirebaseBackend() 15 | 16 | //If user is send successfully send mail link then dispatch redux action's are directly from here. 17 | function* forgetUser({ payload: { user, history } }) { 18 | try { 19 | if (process.env.REACT_APP_DEFAULTAUTH === "firebase") { 20 | const response = yield call(fireBaseBackend.forgetPassword, user.email) 21 | if (response) { 22 | yield put( 23 | userForgetPasswordSuccess( 24 | "Reset link are sended to your mailbox, check there first" 25 | ) 26 | ) 27 | } 28 | } else if (process.env.REACT_APP_DEFAULTAUTH === "jwt") { 29 | const response = yield call(postJwtForgetPwd, "/jwt-forget-pwd", { 30 | email: user.email, 31 | }) 32 | if (response) { 33 | yield put( 34 | userForgetPasswordSuccess( 35 | "Reset link are sended to your mailbox, check there first" 36 | ) 37 | ) 38 | } 39 | } else { 40 | const response = yield call(postFakeForgetPwd, "/fake-forget-pwd", { 41 | email: user.email, 42 | }) 43 | if (response) { 44 | yield put( 45 | userForgetPasswordSuccess( 46 | "Reset link are sended to your mailbox, check there first" 47 | ) 48 | ) 49 | } 50 | } 51 | } catch (error) { 52 | yield put(userForgetPasswordError(error)) 53 | } 54 | } 55 | 56 | export function* watchUserPasswordForget() { 57 | yield takeEvery(FORGET_PASSWORD, forgetUser) 58 | } 59 | 60 | function* forgetPasswordSaga() { 61 | yield all([fork(watchUserPasswordForget)]) 62 | } 63 | 64 | export default forgetPasswordSaga 65 | -------------------------------------------------------------------------------- /src/store/auth/login/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const LOGIN_USER = "LOGIN_USER" 2 | export const LOGIN_ADMIN = "LOGIN_ADMIN" 3 | 4 | export const LOGIN_SUCCESS = "LOGIN_SUCCESS" 5 | 6 | export const LOGOUT_USER = "LOGOUT_USER" 7 | export const LOGOUT_USER_SUCCESS = "LOGOUT_USER_SUCCESS" 8 | export const API_ERROR = "LOGIN_API_ERROR" 9 | 10 | export const SOCIAL_LOGIN = "SOCIAL_LOGIN" 11 | 12 | export const VERIFY_USER = 'VERIFY_USER' 13 | export const VERIFY_SUCCESS = 'VERIFY_SUCCESS' 14 | export const VERIFY_FAILED = 'VERIFY_FAILED' 15 | 16 | export const CHANGE_USER_INFO = 'CHANGE_USER_INFO' 17 | -------------------------------------------------------------------------------- /src/store/auth/login/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | LOGIN_USER, 3 | LOGIN_ADMIN, 4 | LOGIN_SUCCESS, 5 | LOGOUT_USER, 6 | LOGOUT_USER_SUCCESS, 7 | API_ERROR, 8 | SOCIAL_LOGIN, 9 | VERIFY_USER, 10 | VERIFY_SUCCESS, 11 | VERIFY_FAILED, 12 | CHANGE_USER_INFO 13 | } from "./actionTypes" 14 | 15 | export const loginUser = (user, history) => { 16 | return { 17 | type: LOGIN_USER, 18 | payload: { user, history }, 19 | } 20 | } 21 | 22 | export const loginAdminUser = (user, history) => { 23 | return { 24 | type: LOGIN_ADMIN, 25 | payload: { user, history }, 26 | } 27 | } 28 | 29 | export const loginSuccess = user => { 30 | return { 31 | type: LOGIN_SUCCESS, 32 | payload: user, 33 | } 34 | } 35 | 36 | export const logoutUser = history => { 37 | return { 38 | type: LOGOUT_USER, 39 | payload: { history }, 40 | } 41 | } 42 | 43 | export const logoutUserSuccess = () => { 44 | return { 45 | type: LOGOUT_USER_SUCCESS, 46 | payload: {}, 47 | } 48 | } 49 | 50 | export const apiError = error => { 51 | return { 52 | type: API_ERROR, 53 | payload: error, 54 | } 55 | } 56 | 57 | export const socialLogin = (data, history, type) => { 58 | return { 59 | type: SOCIAL_LOGIN, 60 | payload: { data, history, type }, 61 | } 62 | } 63 | 64 | export const verifyUser = (data, history, type) => { 65 | return { 66 | type: VERIFY_USER, 67 | payload: { data, history }, 68 | } 69 | } 70 | 71 | export const verifySuccess = () => { 72 | return { 73 | type: VERIFY_SUCCESS, 74 | payload: {}, 75 | } 76 | } 77 | 78 | export const verifyFiled = () => { 79 | return { 80 | type: VERIFY_FAILED, 81 | payload: {}, 82 | } 83 | } 84 | 85 | export const changeUserInfo = data => { 86 | return { 87 | type: CHANGE_USER_INFO, 88 | payload: data, 89 | } 90 | } -------------------------------------------------------------------------------- /src/store/auth/login/reducer.js: -------------------------------------------------------------------------------- 1 | import jwt from 'jwt-decode' 2 | 3 | import { 4 | LOGIN_USER, 5 | LOGIN_ADMIN, 6 | LOGIN_SUCCESS, 7 | LOGOUT_USER, 8 | LOGOUT_USER_SUCCESS, 9 | API_ERROR, 10 | VERIFY_SUCCESS, 11 | VERIFY_FAILED, 12 | CHANGE_USER_INFO 13 | } from "./actionTypes" 14 | 15 | const initialState = { 16 | error: "", 17 | loading: false, 18 | verifyMessage: 'verifying', 19 | user: localStorage.getItem('access_token') && jwt(localStorage.getItem('access_token')) 20 | } 21 | 22 | const login = (state = initialState, action) => { 23 | switch (action.type) { 24 | case LOGIN_USER: 25 | state = { 26 | ...state, 27 | loading: true, 28 | } 29 | break 30 | case LOGIN_ADMIN: 31 | state = { 32 | ...state, 33 | loading: true, 34 | } 35 | break 36 | case LOGIN_SUCCESS: 37 | state = { 38 | ...state, 39 | loading: false, 40 | user: action.payload 41 | } 42 | break 43 | case LOGOUT_USER: 44 | state = { ...state } 45 | break 46 | case LOGOUT_USER_SUCCESS: 47 | state = { ...state } 48 | break 49 | case API_ERROR: 50 | state = { ...state, error: action.payload, loading: false } 51 | break 52 | case VERIFY_SUCCESS: 53 | state = { 54 | ...state, 55 | verifyMessage: 'success' 56 | } 57 | break 58 | case VERIFY_FAILED: 59 | state = { 60 | ...state, 61 | verifyMessage: 'failed' 62 | } 63 | break 64 | case CHANGE_USER_INFO: 65 | state = { 66 | ...state, 67 | user: action.payload 68 | } 69 | break 70 | default: 71 | state = { ...state } 72 | break 73 | } 74 | return state 75 | } 76 | 77 | export default login 78 | -------------------------------------------------------------------------------- /src/store/auth/profile/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const EDIT_PROFILE = "EDIT_PROFILE" 2 | export const PROFILE_SUCCESS = "PROFILE_SUCCESS" 3 | export const PROFILE_ERROR = "PROFILE_ERROR" 4 | export const RESET_PROFILE_FLAG = "RESET_PROFILE_FLAG"; -------------------------------------------------------------------------------- /src/store/auth/profile/actions.js: -------------------------------------------------------------------------------- 1 | import { PROFILE_ERROR, PROFILE_SUCCESS, EDIT_PROFILE, RESET_PROFILE_FLAG } from "./actionTypes" 2 | 3 | export const editProfile = user => { 4 | return { 5 | type: EDIT_PROFILE, 6 | payload: { user }, 7 | } 8 | } 9 | 10 | export const profileSuccess = msg => { 11 | return { 12 | type: PROFILE_SUCCESS, 13 | payload: msg, 14 | } 15 | } 16 | 17 | export const profileError = error => { 18 | return { 19 | type: PROFILE_ERROR, 20 | payload: error, 21 | } 22 | } 23 | 24 | export const resetProfileFlag = error => { 25 | return { 26 | type: RESET_PROFILE_FLAG, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/store/auth/profile/reducer.js: -------------------------------------------------------------------------------- 1 | import { PROFILE_ERROR, PROFILE_SUCCESS, EDIT_PROFILE, RESET_PROFILE_FLAG } from "./actionTypes" 2 | 3 | const initialState = { 4 | error: "", 5 | success: "", 6 | } 7 | 8 | const profile = (state = initialState, action) => { 9 | switch (action.type) { 10 | case EDIT_PROFILE: 11 | state = { ...state } 12 | break 13 | case PROFILE_SUCCESS: 14 | state = { ...state, success: action.payload } 15 | break 16 | case PROFILE_ERROR: 17 | state = { ...state, error: action.payload } 18 | break 19 | case RESET_PROFILE_FLAG : 20 | state = { ...state, success: null } 21 | break 22 | default: 23 | state = { ...state } 24 | break 25 | } 26 | return state 27 | } 28 | 29 | export default profile 30 | -------------------------------------------------------------------------------- /src/store/auth/profile/saga.js: -------------------------------------------------------------------------------- 1 | import { takeEvery, fork, put, all, call } from "redux-saga/effects" 2 | 3 | // Login Redux States 4 | import { EDIT_PROFILE } from "./actionTypes" 5 | import { profileSuccess, profileError } from "./actions" 6 | 7 | //Include Both Helper File with needed methods 8 | import { getFirebaseBackend } from "../../../helpers/firebase_helper" 9 | import { 10 | postFakeProfile, 11 | postJwtProfile, 12 | } from "../../../helpers/backend_helper" 13 | 14 | const fireBaseBackend = getFirebaseBackend() 15 | 16 | function* editProfile({ payload: { user } }) { 17 | try { 18 | if (process.env.REACT_APP_DEFAULTAUTH === "firebase") { 19 | const response = yield call( 20 | fireBaseBackend.editProfileAPI, 21 | user.username, 22 | user.idx 23 | ) 24 | yield put(profileSuccess(response)) 25 | } else if (process.env.REACT_APP_DEFAULTAUTH === "jwt") { 26 | const response = yield call(postJwtProfile, "/post-jwt-profile", { 27 | username: user.username, 28 | idx: user.idx, 29 | }) 30 | yield put(profileSuccess(response)) 31 | } else if (process.env.REACT_APP_DEFAULTAUTH === "fake") { 32 | const response = yield call(postFakeProfile, { 33 | username: user.username, 34 | idx: user.idx, 35 | }) 36 | yield put(profileSuccess(response)) 37 | } 38 | } catch (error) { 39 | yield put(profileError(error)) 40 | } 41 | } 42 | export function* watchProfile() { 43 | yield takeEvery(EDIT_PROFILE, editProfile) 44 | } 45 | 46 | function* ProfileSaga() { 47 | yield all([fork(watchProfile)]) 48 | } 49 | 50 | export default ProfileSaga 51 | -------------------------------------------------------------------------------- /src/store/auth/register/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const REGISTER_USER = "register_user" 2 | export const REGISTER_USER_SUCCESSFUL = "register_user_successfull" 3 | export const REGISTER_USER_FAILED = "register_user_failed" 4 | -------------------------------------------------------------------------------- /src/store/auth/register/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | REGISTER_USER, 3 | REGISTER_USER_SUCCESSFUL, 4 | REGISTER_USER_FAILED, 5 | } from "./actionTypes" 6 | 7 | export const registerUser = user => { 8 | return { 9 | type: REGISTER_USER, 10 | payload: { user }, 11 | } 12 | } 13 | 14 | export const registerUserSuccessful = user => { 15 | return { 16 | type: REGISTER_USER_SUCCESSFUL, 17 | payload: user, 18 | } 19 | } 20 | 21 | export const registerUserFailed = msg => { 22 | return { 23 | type: REGISTER_USER_FAILED, 24 | payload: msg, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/store/auth/register/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | REGISTER_USER, 3 | REGISTER_USER_SUCCESSFUL, 4 | REGISTER_USER_FAILED, 5 | } from "./actionTypes" 6 | 7 | const initialState = { 8 | registrationError: null, 9 | message: null, 10 | loading: false, 11 | user: null, 12 | } 13 | 14 | const account = (state = initialState, action) => { 15 | switch (action.type) { 16 | case REGISTER_USER: 17 | state = { 18 | ...state, 19 | loading: true, 20 | registrationError: null, 21 | } 22 | break 23 | case REGISTER_USER_SUCCESSFUL: 24 | state = { 25 | ...state, 26 | loading: false, 27 | user: action.payload, 28 | registrationError: null, 29 | } 30 | break 31 | case REGISTER_USER_FAILED: 32 | state = { 33 | ...state, 34 | user: null, 35 | loading: false, 36 | registrationError: action.payload, 37 | } 38 | break 39 | default: 40 | state = { ...state } 41 | break 42 | } 43 | return state 44 | } 45 | 46 | export default account 47 | -------------------------------------------------------------------------------- /src/store/auth/register/saga.js: -------------------------------------------------------------------------------- 1 | import { takeEvery, fork, put, all, call } from "redux-saga/effects" 2 | 3 | import { REGISTER_USER } from "./actionTypes" 4 | import { registerUserSuccessful, registerUserFailed } from "./actions" 5 | import { 6 | postRegister, 7 | } from "../../../helpers/backend_helper" 8 | 9 | function* registerUser({ payload: { user } }) { 10 | try { 11 | const response = yield call(postRegister, user) 12 | yield put(registerUserSuccessful(response)) 13 | } catch (error) { 14 | yield put(registerUserFailed('This email is already registered. Please use other email.')) 15 | } 16 | } 17 | 18 | export function* watchUserRegister() { 19 | yield takeEvery(REGISTER_USER, registerUser) 20 | } 21 | 22 | function* accountSaga() { 23 | yield all([fork(watchUserRegister)]) 24 | } 25 | 26 | export default accountSaga 27 | -------------------------------------------------------------------------------- /src/store/calendar/actionTypes.js: -------------------------------------------------------------------------------- 1 | /** Api Success and fail */ 2 | export const API_SUCCESS = "API_SUCCESS"; 3 | export const API_FAIL = "API_FAIL"; 4 | 5 | /* EVENTS */ 6 | export const GET_EVENTS = "GET_EVENTS" 7 | // export const GET_EVENTS_SUCCESS = "GET_EVENTS_SUCCESS" 8 | // export const GET_EVENTS_FAIL = "GET_EVENTS_FAIL" 9 | 10 | export const ADD_NEW_EVENT = "ADD_NEW_EVENT" 11 | // export const ADD_EVENT_SUCCESS = "ADD_EVENT_SUCCESS" 12 | // export const ADD_EVENT_FAIL = "ADD_EVENT_FAIL" 13 | 14 | export const UPDATE_EVENT = "UPDATE_EVENT" 15 | export const UPDATE_EVENT_SUCCESS = "UPDATE_EVENT_SUCCESS" 16 | export const UPDATE_EVENT_FAIL = "UPDATE_EVENT_FAIL" 17 | 18 | export const DELETE_EVENT = "DELETE_EVENT" 19 | export const DELETE_EVENT_SUCCESS = "DELETE_EVENT_SUCCESS" 20 | export const DELETE_EVENT_FAIL = "DELETE_EVENT_FAIL" 21 | 22 | export const GET_CATEGORIES = "GET_CATEGORIES" 23 | export const GET_CATEGORIES_SUCCESS = "GET_CATEGORIES_SUCCESS" 24 | export const GET_CATEGORIES_FAIL = "GET_CATEGORIES_FAIL" 25 | -------------------------------------------------------------------------------- /src/store/calendar/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | API_SUCCESS, 3 | API_FAIL, 4 | GET_EVENTS, 5 | ADD_NEW_EVENT, 6 | // ADD_EVENT_SUCCESS, 7 | // ADD_EVENT_FAIL, 8 | UPDATE_EVENT, 9 | UPDATE_EVENT_SUCCESS, 10 | UPDATE_EVENT_FAIL, 11 | DELETE_EVENT, 12 | DELETE_EVENT_SUCCESS, 13 | DELETE_EVENT_FAIL, 14 | GET_CATEGORIES, 15 | GET_CATEGORIES_SUCCESS, 16 | GET_CATEGORIES_FAIL, 17 | } from "./actionTypes"; 18 | 19 | export const getEvents = () => ({ 20 | type: GET_EVENTS, 21 | }); 22 | 23 | export const apiSuccess = (actionType, data) => ({ 24 | type: API_SUCCESS, 25 | payload: { actionType, data }, 26 | }); 27 | 28 | export const apiFail = (actionType, error) => ({ 29 | type: API_FAIL, 30 | payload: { actionType, error }, 31 | }); 32 | 33 | 34 | export const addNewEvent = event => ({ 35 | type: ADD_NEW_EVENT, 36 | payload: event, 37 | }); 38 | 39 | // export const addEventSuccess = event => ({ 40 | // type: ADD_EVENT_SUCCESS, 41 | // payload: event, 42 | // }); 43 | 44 | // export const addEventFail = error => ({ 45 | // type: ADD_EVENT_FAIL, 46 | // payload: error, 47 | // }); 48 | 49 | export const updateEvent = event => ({ 50 | type: UPDATE_EVENT, 51 | payload: event, 52 | }); 53 | 54 | export const updateEventSuccess = event => ({ 55 | type: UPDATE_EVENT_SUCCESS, 56 | payload: event, 57 | }); 58 | 59 | export const updateEventFail = error => ({ 60 | type: UPDATE_EVENT_FAIL, 61 | payload: error, 62 | }); 63 | 64 | export const deleteEvent = event => ({ 65 | type: DELETE_EVENT, 66 | payload: event, 67 | }); 68 | 69 | export const deleteEventSuccess = event => ({ 70 | type: DELETE_EVENT_SUCCESS, 71 | payload: event, 72 | }); 73 | 74 | export const deleteEventFail = error => ({ 75 | type: DELETE_EVENT_FAIL, 76 | payload: error, 77 | }); 78 | 79 | export const getCategories = () => ({ 80 | type: GET_CATEGORIES, 81 | }); 82 | 83 | export const getCategoriesSuccess = categories => ({ 84 | type: GET_CATEGORIES_SUCCESS, 85 | payload: categories, 86 | }); 87 | 88 | export const getCategoriesFail = error => ({ 89 | type: GET_CATEGORIES_FAIL, 90 | payload: error, 91 | }); 92 | -------------------------------------------------------------------------------- /src/store/calendar/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | API_SUCCESS, 3 | API_FAIL, 4 | GET_EVENTS, 5 | ADD_NEW_EVENT, 6 | // ADD_EVENT_SUCCESS, 7 | // ADD_EVENT_FAIL, 8 | UPDATE_EVENT_SUCCESS, 9 | UPDATE_EVENT_FAIL, 10 | DELETE_EVENT_SUCCESS, 11 | DELETE_EVENT_FAIL, 12 | GET_CATEGORIES_SUCCESS, 13 | GET_CATEGORIES_FAIL, 14 | } from "./actionTypes" 15 | 16 | const INIT_STATE = { 17 | events: [], 18 | categories: [], 19 | error: {}, 20 | } 21 | 22 | const Calendar = (state = INIT_STATE, action) => { 23 | switch (action.type) { 24 | case API_SUCCESS: 25 | switch (action.payload.actionType) { 26 | case GET_EVENTS: 27 | return { 28 | ...state, 29 | events: action.payload.data, 30 | }; 31 | 32 | case ADD_NEW_EVENT: 33 | return { 34 | ...state, 35 | events: [...state.events, action.payload.data], 36 | } 37 | 38 | default: 39 | return { ...state }; 40 | } 41 | case API_FAIL: 42 | switch (action.payload.actionType) { 43 | case GET_EVENTS: 44 | return { 45 | ...state, 46 | events: action.payload.error, 47 | }; 48 | 49 | case ADD_NEW_EVENT: 50 | return { 51 | ...state, 52 | events: action.payload.error, 53 | }; 54 | 55 | default: 56 | return { ...state }; 57 | } 58 | 59 | case UPDATE_EVENT_SUCCESS: 60 | return { 61 | ...state, 62 | events: state.events.map(event => 63 | event.id.toString() === action.payload.id.toString() 64 | ? { event, ...action.payload } 65 | : event 66 | ), 67 | } 68 | 69 | case UPDATE_EVENT_FAIL: 70 | return { 71 | ...state, 72 | error: action.payload, 73 | } 74 | 75 | case DELETE_EVENT_SUCCESS: 76 | return { 77 | ...state, 78 | events: state.events.filter( 79 | event => event.id.toString() !== action.payload.id.toString() 80 | ), 81 | } 82 | 83 | case DELETE_EVENT_FAIL: 84 | return { 85 | ...state, 86 | error: action.payload, 87 | } 88 | 89 | case GET_CATEGORIES_SUCCESS: 90 | return { 91 | ...state, 92 | categories: action.payload, 93 | } 94 | 95 | case GET_CATEGORIES_FAIL: 96 | return { 97 | ...state, 98 | error: action.payload, 99 | } 100 | default: 101 | return state 102 | } 103 | } 104 | 105 | export default Calendar 106 | -------------------------------------------------------------------------------- /src/store/chat/actionTypes.js: -------------------------------------------------------------------------------- 1 | /* CHATS */ 2 | export const GET_CHATS = "GET_CHATS" 3 | export const GET_CHATS_SUCCESS = "GET_CHATS_SUCCESS" 4 | export const GET_CHATS_FAIL = "GET_CHATS_FAIL" 5 | 6 | /* GROUPS */ 7 | export const GET_GROUPS = "GET_GROUPS" 8 | export const GET_GROUPS_SUCCESS = "GET_GROUPS_SUCCESS" 9 | export const GET_GROUPS_FAIL = "GET_GROUPS_FAIL" 10 | 11 | /* CONTACTS */ 12 | export const GET_CONTACTS = "GET_CONTACTS" 13 | export const GET_CONTACTS_SUCCESS = "GET_CONTACTS_SUCCESS" 14 | export const GET_CONTACTS_FAIL = "GET_CONTACTS_FAIL" 15 | 16 | /* MESSAGES */ 17 | export const GET_MESSAGES = "GET_MESSAGES" 18 | export const GET_MESSAGES_SUCCESS = "GET_MESSAGES_SUCCESS" 19 | export const GET_MESSAGES_FAIL = "GET_MESSAGES_FAIL" 20 | 21 | export const POST_ADD_MESSAGE = "POST_ADD_MESSAGE" 22 | export const POST_ADD_MESSAGE_SUCCESS = "POST_ADD_MESSAGE_SUCCESS" 23 | export const POST_ADD_MESSAGE_FAIL = "POST_ADD_MESSAGE_FAIL" 24 | -------------------------------------------------------------------------------- /src/store/chat/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_CHATS, 3 | GET_CHATS_FAIL, 4 | GET_CHATS_SUCCESS, 5 | GET_GROUPS, 6 | GET_GROUPS_FAIL, 7 | GET_GROUPS_SUCCESS, 8 | GET_CONTACTS, 9 | GET_CONTACTS_FAIL, 10 | GET_CONTACTS_SUCCESS, 11 | GET_MESSAGES, 12 | GET_MESSAGES_FAIL, 13 | GET_MESSAGES_SUCCESS, 14 | POST_ADD_MESSAGE, 15 | POST_ADD_MESSAGE_FAIL, 16 | POST_ADD_MESSAGE_SUCCESS, 17 | } from "./actionTypes" 18 | 19 | export const getChats = () => ({ 20 | type: GET_CHATS, 21 | }) 22 | 23 | export const getChatsSuccess = chats => ({ 24 | type: GET_CHATS_SUCCESS, 25 | payload: chats, 26 | }) 27 | 28 | export const getChatsFail = error => ({ 29 | type: GET_CHATS_FAIL, 30 | payload: error, 31 | }) 32 | 33 | export const getGroups = () => ({ 34 | type: GET_GROUPS, 35 | }) 36 | 37 | export const getGroupsSuccess = groups => ({ 38 | type: GET_GROUPS_SUCCESS, 39 | payload: groups, 40 | }) 41 | 42 | export const getGroupsFail = error => ({ 43 | type: GET_GROUPS_FAIL, 44 | payload: error, 45 | }) 46 | 47 | export const getContacts = () => ({ 48 | type: GET_CONTACTS, 49 | }) 50 | 51 | export const getContactsSuccess = contacts => ({ 52 | type: GET_CONTACTS_SUCCESS, 53 | payload: contacts, 54 | }) 55 | 56 | export const getContactsFail = error => ({ 57 | type: GET_CONTACTS_FAIL, 58 | payload: error, 59 | }) 60 | 61 | export const getMessages = roomId => ({ 62 | type: GET_MESSAGES, 63 | roomId, 64 | }) 65 | 66 | export const getMessagesSuccess = messages => ({ 67 | type: GET_MESSAGES_SUCCESS, 68 | payload: messages, 69 | }) 70 | 71 | export const getMessagesFail = error => ({ 72 | type: GET_MESSAGES_FAIL, 73 | payload: error, 74 | }) 75 | 76 | export const addMessage = message => ({ 77 | type: POST_ADD_MESSAGE, 78 | message, 79 | }) 80 | 81 | export const addMessageSuccess = message => ({ 82 | type: POST_ADD_MESSAGE_SUCCESS, 83 | payload: message, 84 | }) 85 | 86 | export const addMessageFail = error => ({ 87 | type: POST_ADD_MESSAGE_FAIL, 88 | payload: error, 89 | }) 90 | -------------------------------------------------------------------------------- /src/store/chat/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_GROUPS_SUCCESS, 3 | GET_CHATS_SUCCESS, 4 | GET_GROUPS_FAIL, 5 | GET_CHATS_FAIL, 6 | GET_CONTACTS_SUCCESS, 7 | GET_CONTACTS_FAIL, 8 | GET_MESSAGES_SUCCESS, 9 | GET_MESSAGES_FAIL, 10 | POST_ADD_MESSAGE_SUCCESS, 11 | POST_ADD_MESSAGE_FAIL, 12 | } from "./actionTypes" 13 | 14 | const INIT_STATE = { 15 | chats: [], 16 | groups: [], 17 | contacts: [], 18 | messages: [], 19 | error: {}, 20 | } 21 | 22 | const Calendar = (state = INIT_STATE, action) => { 23 | switch (action.type) { 24 | case GET_CHATS_SUCCESS: 25 | return { 26 | ...state, 27 | chats: action.payload, 28 | } 29 | 30 | case GET_CHATS_FAIL: 31 | return { 32 | ...state, 33 | error: action.payload, 34 | } 35 | 36 | case GET_GROUPS_SUCCESS: 37 | return { 38 | ...state, 39 | groups: action.payload, 40 | } 41 | 42 | case GET_GROUPS_FAIL: 43 | return { 44 | ...state, 45 | error: action.payload, 46 | } 47 | 48 | case GET_CONTACTS_SUCCESS: 49 | return { 50 | ...state, 51 | contacts: action.payload, 52 | } 53 | 54 | case GET_CONTACTS_FAIL: 55 | return { 56 | ...state, 57 | error: action.payload, 58 | } 59 | 60 | case GET_MESSAGES_SUCCESS: 61 | return { 62 | ...state, 63 | messages: action.payload, 64 | } 65 | 66 | case GET_MESSAGES_FAIL: 67 | return { 68 | ...state, 69 | error: action.payload, 70 | } 71 | 72 | case POST_ADD_MESSAGE_SUCCESS: 73 | return { 74 | ...state, 75 | messages: [...state.messages, action.payload], 76 | } 77 | 78 | case POST_ADD_MESSAGE_FAIL: 79 | return { 80 | ...state, 81 | error: action.payload, 82 | } 83 | 84 | default: 85 | return state 86 | } 87 | } 88 | 89 | export default Calendar 90 | -------------------------------------------------------------------------------- /src/store/chat/saga.js: -------------------------------------------------------------------------------- 1 | import { takeEvery, put, call } from "redux-saga/effects" 2 | 3 | // Chat Redux States 4 | import { 5 | GET_CHATS, 6 | GET_CONTACTS, 7 | GET_GROUPS, 8 | GET_MESSAGES, 9 | POST_ADD_MESSAGE, 10 | } from "./actionTypes" 11 | import { 12 | getChatsSuccess, 13 | getChatsFail, 14 | getGroupsSuccess, 15 | getGroupsFail, 16 | getContactsSuccess, 17 | getContactsFail, 18 | getMessagesSuccess, 19 | getMessagesFail, 20 | addMessageSuccess, 21 | addMessageFail, 22 | } from "./actions" 23 | 24 | //Include Both Helper File with needed methods 25 | import { 26 | getChats, 27 | getGroups, 28 | getContacts, 29 | getMessages, 30 | addMessage, 31 | } from "../../helpers/backend_helper" 32 | 33 | function* onGetChats() { 34 | try { 35 | const response = yield call(getChats) 36 | yield put(getChatsSuccess(response)) 37 | } catch (error) { 38 | yield put(getChatsFail(error)) 39 | } 40 | } 41 | 42 | function* onGetGroups() { 43 | try { 44 | const response = yield call(getGroups) 45 | yield put(getGroupsSuccess(response)) 46 | } catch (error) { 47 | yield put(getGroupsFail(error)) 48 | } 49 | } 50 | 51 | function* onGetContacts() { 52 | try { 53 | const response = yield call(getContacts) 54 | yield put(getContactsSuccess(response)) 55 | } catch (error) { 56 | yield put(getContactsFail(error)) 57 | } 58 | } 59 | 60 | function* onGetMessages({ roomId }) { 61 | try { 62 | const response = yield call(getMessages, roomId) 63 | yield put(getMessagesSuccess(response)) 64 | } catch (error) { 65 | yield put(getMessagesFail(error)) 66 | } 67 | } 68 | 69 | function* onAddMessage({ message }) { 70 | try { 71 | const response = yield call(addMessage, message) 72 | yield put(addMessageSuccess(response)) 73 | } catch (error) { 74 | yield put(addMessageFail(error)) 75 | } 76 | } 77 | 78 | function* chatSaga() { 79 | yield takeEvery(GET_CHATS, onGetChats) 80 | yield takeEvery(GET_GROUPS, onGetGroups) 81 | yield takeEvery(GET_CONTACTS, onGetContacts) 82 | yield takeEvery(GET_MESSAGES, onGetMessages) 83 | yield takeEvery(POST_ADD_MESSAGE, onAddMessage) 84 | } 85 | 86 | export default chatSaga 87 | -------------------------------------------------------------------------------- /src/store/contacts/actionTypes.js: -------------------------------------------------------------------------------- 1 | /* USERS */ 2 | export const GET_USERS = "GET_USERS" 3 | export const GET_USERS_SUCCESS = "GET_USERS_SUCCESS" 4 | export const GET_USERS_FAIL = "GET_USERS_FAIL" 5 | 6 | /* USERS PROFILE */ 7 | export const GET_USER_PROFILE = "GET_USER_PROFILE" 8 | export const GET_USER_PROFILE_SUCCESS = "GET_USER_PROFILE_SUCCESS" 9 | export const GET_USER_PROFILE_FAIL = "GET_USER_PROFILE_FAIL" 10 | 11 | /** 12 | * add user 13 | */ 14 | export const ADD_NEW_USER = "ADD_NEW_USER" 15 | export const ADD_USER_SUCCESS = "ADD_USER_SUCCESS" 16 | export const ADD_USER_FAIL = "ADD_USER_FAIL" 17 | 18 | /** 19 | * Edit user 20 | */ 21 | export const UPDATE_USER = "UPDATE_USER" 22 | export const UPDATE_USER_SUCCESS = "UPDATE_USER_SUCCESS" 23 | export const UPDATE_USER_FAIL = "UPDATE_USER_FAIL" 24 | 25 | /** 26 | * Delete user 27 | */ 28 | export const DELETE_USER = "DELETE_USER" 29 | export const DELETE_USER_SUCCESS = "DELETE_USER_SUCCESS" 30 | export const DELETE_USER_FAIL = "DELETE_USER_FAIL" 31 | -------------------------------------------------------------------------------- /src/store/contacts/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_USER_PROFILE, 3 | GET_USER_PROFILE_FAIL, 4 | GET_USER_PROFILE_SUCCESS, 5 | GET_USERS, 6 | GET_USERS_FAIL, 7 | GET_USERS_SUCCESS, 8 | ADD_NEW_USER, 9 | ADD_USER_SUCCESS, 10 | ADD_USER_FAIL, 11 | UPDATE_USER, 12 | UPDATE_USER_SUCCESS, 13 | UPDATE_USER_FAIL, 14 | DELETE_USER, 15 | DELETE_USER_SUCCESS, 16 | DELETE_USER_FAIL, 17 | } from "./actionTypes" 18 | 19 | export const getUsers = () => ({ 20 | type: GET_USERS, 21 | }) 22 | 23 | export const getUsersSuccess = users => ({ 24 | type: GET_USERS_SUCCESS, 25 | payload: users, 26 | }) 27 | 28 | export const addNewUser = user => ({ 29 | type: ADD_NEW_USER, 30 | payload: user, 31 | }) 32 | 33 | export const addUserSuccess = user => ({ 34 | type: ADD_USER_SUCCESS, 35 | payload: user, 36 | }) 37 | 38 | export const addUserFail = error => ({ 39 | type: ADD_USER_FAIL, 40 | payload: error, 41 | }) 42 | 43 | export const getUsersFail = error => ({ 44 | type: GET_USERS_FAIL, 45 | payload: error, 46 | }) 47 | 48 | export const getUserProfile = () => ({ 49 | type: GET_USER_PROFILE, 50 | }) 51 | 52 | export const getUserProfileSuccess = userProfile => ({ 53 | type: GET_USER_PROFILE_SUCCESS, 54 | payload: userProfile, 55 | }) 56 | 57 | export const getUserProfileFail = error => ({ 58 | type: GET_USER_PROFILE_FAIL, 59 | payload: error, 60 | }) 61 | 62 | export const updateUser = user => ({ 63 | type: UPDATE_USER, 64 | payload: user, 65 | }) 66 | 67 | export const updateUserSuccess = user => ({ 68 | type: UPDATE_USER_SUCCESS, 69 | payload: user, 70 | }) 71 | 72 | export const updateUserFail = error => ({ 73 | type: UPDATE_USER_FAIL, 74 | payload: error, 75 | }) 76 | 77 | export const deleteUser = user => ({ 78 | type: DELETE_USER, 79 | payload: user, 80 | }) 81 | 82 | export const deleteUserSuccess = user => ({ 83 | type: DELETE_USER_SUCCESS, 84 | payload: user, 85 | }) 86 | 87 | export const deleteUserFail = error => ({ 88 | type: DELETE_USER_FAIL, 89 | payload: error, 90 | }) 91 | -------------------------------------------------------------------------------- /src/store/contacts/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_USERS_SUCCESS, 3 | GET_USERS_FAIL, 4 | ADD_USER_SUCCESS, 5 | ADD_USER_FAIL, 6 | UPDATE_USER_SUCCESS, 7 | UPDATE_USER_FAIL, 8 | DELETE_USER_SUCCESS, 9 | DELETE_USER_FAIL, 10 | GET_USER_PROFILE_SUCCESS, 11 | GET_USER_PROFILE_FAIL, 12 | } from "./actionTypes" 13 | 14 | const INIT_STATE = { 15 | users: [], 16 | userProfile: {}, 17 | error: {}, 18 | } 19 | 20 | const contacts = (state = INIT_STATE, action) => { 21 | switch (action.type) { 22 | case GET_USERS_SUCCESS: 23 | return { 24 | ...state, 25 | users: action.payload, 26 | } 27 | 28 | case GET_USERS_FAIL: 29 | return { 30 | ...state, 31 | error: action.payload, 32 | } 33 | 34 | case ADD_USER_SUCCESS: 35 | 36 | return { 37 | ...state, 38 | users: [...state.users, action.payload], 39 | } 40 | 41 | case ADD_USER_FAIL: 42 | return { 43 | ...state, 44 | error: action.payload, 45 | } 46 | 47 | case GET_USER_PROFILE_SUCCESS: 48 | return { 49 | ...state, 50 | userProfile: action.payload, 51 | } 52 | 53 | case UPDATE_USER_SUCCESS: 54 | return { 55 | ...state, 56 | users: state.users.map(user => 57 | user.id.toString() === action.payload.id.toString() 58 | ? { user, ...action.payload } 59 | : user 60 | ), 61 | } 62 | 63 | case UPDATE_USER_FAIL: 64 | return { 65 | ...state, 66 | error: action.payload, 67 | } 68 | 69 | case DELETE_USER_SUCCESS: 70 | return { 71 | ...state, 72 | users: state.users.filter( 73 | user => user.id.toString() !== action.payload.id.toString() 74 | ), 75 | } 76 | 77 | case DELETE_USER_FAIL: 78 | return { 79 | ...state, 80 | error: action.payload, 81 | } 82 | 83 | case GET_USER_PROFILE_FAIL: 84 | return { 85 | ...state, 86 | error: action.payload, 87 | } 88 | 89 | default: 90 | return state 91 | } 92 | } 93 | 94 | export default contacts 95 | -------------------------------------------------------------------------------- /src/store/contacts/saga.js: -------------------------------------------------------------------------------- 1 | import { call, put, takeEvery } from "redux-saga/effects" 2 | 3 | // Crypto Redux States 4 | import { GET_USERS, GET_USER_PROFILE, ADD_NEW_USER, DELETE_USER, UPDATE_USER } from "./actionTypes" 5 | 6 | import { 7 | getUsersSuccess, 8 | getUsersFail, 9 | getUserProfileSuccess, 10 | getUserProfileFail, 11 | addUserFail, 12 | addUserSuccess, 13 | updateUserSuccess, 14 | updateUserFail, 15 | deleteUserSuccess, 16 | deleteUserFail, 17 | } from "./actions" 18 | 19 | //Include Both Helper File with needed methods 20 | import { getUsers, getUserProfile, addNewUser, updateUser, deleteUser } from "../../helpers/backend_helper" 21 | 22 | function* fetchUsers() { 23 | try { 24 | const response = yield call(getUsers) 25 | yield put(getUsersSuccess(response)) 26 | } catch (error) { 27 | yield put(getUsersFail(error)) 28 | } 29 | } 30 | 31 | function* fetchUserProfile() { 32 | try { 33 | const response = yield call(getUserProfile) 34 | yield put(getUserProfileSuccess(response)) 35 | } catch (error) { 36 | yield put(getUserProfileFail(error)) 37 | } 38 | } 39 | 40 | function* onUpdateUser({ payload: user }) { 41 | try { 42 | const response = yield call(updateUser, user) 43 | yield put(updateUserSuccess(response)) 44 | } catch (error) { 45 | yield put(updateUserFail(error)) 46 | } 47 | } 48 | 49 | function* onDeleteUser({ payload: user }) { 50 | try { 51 | const response = yield call(deleteUser, user) 52 | yield put(deleteUserSuccess(response)) 53 | } catch (error) { 54 | yield put(deleteUserFail(error)) 55 | } 56 | } 57 | 58 | function* onAddNewUser({ payload: user }) { 59 | 60 | try { 61 | const response = yield call(addNewUser, user) 62 | 63 | yield put(addUserSuccess(response)) 64 | } catch (error) { 65 | 66 | yield put(addUserFail(error)) 67 | } 68 | } 69 | 70 | function* contactsSaga() { 71 | yield takeEvery(GET_USERS, fetchUsers) 72 | yield takeEvery(GET_USER_PROFILE, fetchUserProfile) 73 | yield takeEvery(ADD_NEW_USER, onAddNewUser) 74 | yield takeEvery(UPDATE_USER, onUpdateUser) 75 | yield takeEvery(DELETE_USER, onDeleteUser) 76 | } 77 | 78 | export default contactsSaga; 79 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware, compose } from "redux" 2 | import createSagaMiddleware from "redux-saga" 3 | 4 | import rootReducer from "./reducers" 5 | import rootSaga from "./sagas" 6 | 7 | const sagaMiddleware = createSagaMiddleware() 8 | const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose 9 | 10 | const store = createStore( 11 | rootReducer, 12 | composeEnhancers(applyMiddleware(sagaMiddleware)) 13 | ) 14 | sagaMiddleware.run(rootSaga) 15 | 16 | export default store 17 | -------------------------------------------------------------------------------- /src/store/invoices/actionTypes.js: -------------------------------------------------------------------------------- 1 | /* INVOICES */ 2 | export const GET_INVOICES = "GET_INVOICES" 3 | export const GET_INVOICES_SUCCESS = "GET_INVOICES_SUCCESS" 4 | export const GET_INVOICES_FAIL = "GET_INVOICES_FAIL" 5 | 6 | export const GET_INVOICE_DETAIL = "GET_INVOICE_DETAIL" 7 | export const GET_INVOICE_DETAIL_SUCCESS = "GET_INVOICE_DETAIL_SUCCESS" 8 | export const GET_INVOICE_DETAIL_FAIL = "GET_INVOICE_DETAIL_FAIL" 9 | 10 | export const GET_INVOICE_HISTORY_BYID = 'GET_INVOICE_HISTORY_BYID' 11 | export const GET_INVOICE_HISTORY_BYID_SUCCESS = 'GET_INVOICE_HISTORY_BYID_SUCCESS' 12 | 13 | export const GET_INVOICE_HISTORY = 'GET_INVOICE_HISTORY' 14 | export const GET_INVOICE_HISTORY_SUCCESS = 'GET_INVOICE_HISTORY_SUCCESS' 15 | 16 | export const GET_INVOICE_HISTORY_BY_COMPANYID_SUCCESS = 'GET_INVOICE_HISTORY_BY_COMPANYID_SUCCESS' 17 | export const GET_INVOICE_HISTORY_BY_COMPANYID = 'GET_INVOICE_HISTORY_BY_COMPANYID' 18 | 19 | export const GET_INVOICE_HISTORY_BY_PROJECTID = 'GET_INVOICE_HISTORY_BY_PROJECTID' 20 | export const GET_INVOICE_HISTORY_BY_PROJECTID_SUCCESS = 'GET_INVOICE_HISTORY_BY_PROJECTID_SUCCESS' 21 | -------------------------------------------------------------------------------- /src/store/invoices/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_INVOICES, 3 | GET_INVOICES_FAIL, 4 | GET_INVOICES_SUCCESS, 5 | GET_INVOICE_DETAIL, 6 | GET_INVOICE_DETAIL_FAIL, 7 | GET_INVOICE_DETAIL_SUCCESS, 8 | GET_INVOICE_HISTORY_BYID, 9 | GET_INVOICE_HISTORY_BYID_SUCCESS, 10 | GET_INVOICE_HISTORY_BY_COMPANYID, 11 | GET_INVOICE_HISTORY_BY_COMPANYID_SUCCESS, 12 | GET_INVOICE_HISTORY_BY_PROJECTID, 13 | GET_INVOICE_HISTORY_BY_PROJECTID_SUCCESS 14 | } from "./actionTypes" 15 | 16 | export const getInvoices = () => ({ 17 | type: GET_INVOICES, 18 | }) 19 | 20 | export const getInvoicesSuccess = invoices => ({ 21 | type: GET_INVOICES_SUCCESS, 22 | payload: invoices, 23 | }) 24 | 25 | export const getInvoicesFail = error => ({ 26 | type: GET_INVOICES_FAIL, 27 | payload: error, 28 | }) 29 | 30 | export const getInvoiceDetail = invoiceId => ({ 31 | type: GET_INVOICE_DETAIL, 32 | invoiceId, 33 | }) 34 | 35 | export const getInvoiceDetailSuccess = invoices => ({ 36 | type: GET_INVOICE_DETAIL_SUCCESS, 37 | payload: invoices, 38 | }) 39 | 40 | export const getInvoiceDetailFail = error => ({ 41 | type: GET_INVOICE_DETAIL_FAIL, 42 | payload: error, 43 | }) 44 | 45 | export const getInvoiceHisotryById = id => ({ 46 | type: GET_INVOICE_HISTORY_BYID, 47 | payload: id 48 | }) 49 | 50 | export const getInvoiceHistoryByIdSuccess = invoice_history => ({ 51 | type: GET_INVOICE_HISTORY_BYID_SUCCESS, 52 | payload: invoice_history, 53 | }) 54 | 55 | export const getInvoiceHistoriesByCompany = (company_id) => ({ 56 | type: GET_INVOICE_HISTORY_BY_COMPANYID, 57 | payload: company_id 58 | }) 59 | 60 | export const getInvoiceHistoriesByCompanySuccess = invoices => ({ 61 | type: GET_INVOICE_HISTORY_BY_COMPANYID_SUCCESS, 62 | payload: invoices, 63 | }) 64 | 65 | export const getInvoiceHisotryByProject = project_id => ({ 66 | type: GET_INVOICE_HISTORY_BY_PROJECTID, 67 | payload: project_id 68 | }) 69 | 70 | export const getInvoiceHisotryByProjectSuccess = invoice_history => ({ 71 | type: GET_INVOICE_HISTORY_BY_PROJECTID_SUCCESS, 72 | payload: invoice_history, 73 | }) 74 | 75 | -------------------------------------------------------------------------------- /src/store/invoices/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_INVOICES_FAIL, 3 | GET_INVOICES_SUCCESS, 4 | GET_INVOICE_DETAIL_SUCCESS, 5 | GET_INVOICE_DETAIL_FAIL, 6 | GET_INVOICE_HISTORY_BYID_SUCCESS, 7 | GET_INVOICE_HISTORY_SUCCESS, 8 | GET_INVOICE_HISTORY_BY_COMPANYID_SUCCESS, 9 | GET_INVOICE_HISTORY_BY_PROJECTID_SUCCESS, 10 | } from "./actionTypes"; 11 | 12 | const INIT_STATE = { 13 | invoices: [], 14 | invoiceDetail: {}, 15 | error: {}, 16 | invoiceHisotry: null, 17 | allInvoiceHistories: [], 18 | }; 19 | 20 | const Invoices = (state = INIT_STATE, action) => { 21 | switch (action.type) { 22 | case GET_INVOICES_SUCCESS: 23 | return { 24 | ...state, 25 | invoices: action.payload, 26 | }; 27 | 28 | case GET_INVOICES_FAIL: 29 | return { 30 | ...state, 31 | error: action.payload, 32 | }; 33 | 34 | case GET_INVOICE_DETAIL_SUCCESS: 35 | return { 36 | ...state, 37 | invoiceDetail: action.payload, 38 | }; 39 | 40 | case GET_INVOICE_DETAIL_FAIL: 41 | return { 42 | ...state, 43 | error: action.payload, 44 | }; 45 | 46 | case GET_INVOICE_HISTORY_BYID_SUCCESS: 47 | return { 48 | ...state, 49 | invoiceHisotry: action.payload, 50 | }; 51 | 52 | case GET_INVOICE_HISTORY_SUCCESS: 53 | return { 54 | ...state, 55 | allInvoiceHistories: action.payload, 56 | }; 57 | 58 | case GET_INVOICE_HISTORY_BY_COMPANYID_SUCCESS: 59 | return { 60 | ...state, 61 | allInvoiceHistories: action.payload, 62 | }; 63 | 64 | case GET_INVOICE_HISTORY_BY_PROJECTID_SUCCESS: 65 | return { 66 | ...state, 67 | invoiceHisotry: action.payload, 68 | }; 69 | 70 | default: 71 | return state; 72 | } 73 | }; 74 | 75 | export default Invoices; 76 | -------------------------------------------------------------------------------- /src/store/invoices/saga.js: -------------------------------------------------------------------------------- 1 | import { call, put, takeEvery } from "redux-saga/effects" 2 | 3 | // Crypto Redux States 4 | import { GET_INVOICES, GET_INVOICE_DETAIL, GET_INVOICE_HISTORY_BYID, GET_INVOICE_HISTORY_BY_COMPANYID, GET_INVOICE_HISTORY_BY_PROJECTID } from "./actionTypes" 5 | import { 6 | getInvoicesSuccess, 7 | getInvoicesFail, 8 | getInvoiceDetailSuccess, 9 | getInvoiceDetailFail, 10 | getInvoiceHistoryByIdSuccess, 11 | getInvoiceHistoriesByCompanySuccess, 12 | getInvoiceHisotryByProjectSuccess 13 | } from "./actions" 14 | import { getInvoices, getInvoiceDetail, getInvoiceHistoryByIdAsync, getInvoiceHistoryByCompnayAsync, getInvoiceHistoryByProjectAsync } from "../../helpers/backend_helper" 15 | 16 | function* fetchInvoices() { 17 | try { 18 | const response = yield call(getInvoices) 19 | yield put(getInvoicesSuccess(response)) 20 | } catch (error) { 21 | yield put(getInvoicesFail(error)) 22 | } 23 | } 24 | 25 | function* fetchInvoiceDetail({ invoiceId }) { 26 | try { 27 | const response = yield call(getInvoiceDetail, invoiceId) 28 | yield put(getInvoiceDetailSuccess(response)) 29 | } catch (error) { 30 | yield put(getInvoiceDetailFail(error)) 31 | } 32 | } 33 | 34 | function* fetchInvoiceHistoryById({ payload: id }) { 35 | try { 36 | const response = yield call(getInvoiceHistoryByIdAsync, id) 37 | yield put(getInvoiceHistoryByIdSuccess(response)) 38 | } catch (error) { 39 | console.log('error =>',error) 40 | // yield put(getInvoiceDetailFail(error)) 41 | } 42 | } 43 | 44 | function* fetchInvoiceHistoryByCompnay({payload: company_id}) { 45 | try { 46 | const response = yield call(getInvoiceHistoryByCompnayAsync, company_id) 47 | yield put(getInvoiceHistoriesByCompanySuccess(response)) 48 | 49 | } catch (error) { 50 | console.log('error =>',error) 51 | } 52 | } 53 | 54 | function* fetchInvoiceHistoryByProject({payload: project_id}) { 55 | try { 56 | const response = yield call(getInvoiceHistoryByProjectAsync, project_id) 57 | yield put(getInvoiceHisotryByProjectSuccess(response)) 58 | 59 | } catch (error) { 60 | console.log('error =>',error) 61 | } 62 | } 63 | 64 | function* invoiceSaga() { 65 | yield takeEvery(GET_INVOICES, fetchInvoices) 66 | yield takeEvery(GET_INVOICE_DETAIL, fetchInvoiceDetail) 67 | yield takeEvery(GET_INVOICE_HISTORY_BYID, fetchInvoiceHistoryById) 68 | yield takeEvery(GET_INVOICE_HISTORY_BY_COMPANYID, fetchInvoiceHistoryByCompnay) 69 | yield takeEvery(GET_INVOICE_HISTORY_BY_PROJECTID, fetchInvoiceHistoryByProject) 70 | 71 | 72 | 73 | 74 | } 75 | 76 | export default invoiceSaga 77 | -------------------------------------------------------------------------------- /src/store/layout/actionTypes.js: -------------------------------------------------------------------------------- 1 | /* LAYOUT */ 2 | export const CHANGE_LAYOUT = "CHANGE_LAYOUT" 3 | export const CHANGE_LAYOUT_WIDTH = "CHANGE_LAYOUT_WIDTH" 4 | export const CHANGE_SIDEBAR_THEME = "CHANGE_SIDEBAR_THEME" 5 | export const CHANGE_SIDEBAR_TYPE = "CHANGE_SIDEBAR_TYPE" 6 | 7 | // topbar 8 | export const CHANGE_TOPBAR_THEME = "CHANGE_TOPBAR_THEME" 9 | 10 | //layout mode 11 | export const CHANGE_LAYOUT_THEME = "CHANGE_LAYOUT_THEME" 12 | 13 | //layout postion 14 | export const CHANGE_LAYOUT_POSITION = "CHANGE_LAYOUT_POSITION" 15 | 16 | // show sidebar 17 | export const SHOW_SIDEBAR = "SHOW_SIDEBAR" 18 | export const TOGGLE_LEFTMENU = "TOGGLE_LEFTMENU" 19 | 20 | /* RIGHT SIDEBAR */ 21 | export const SHOW_RIGHT_SIDEBAR = "SHOW_RIGHT_SIDEBAR" 22 | 23 | // Preloader 24 | export const CHANGE_PRELOADER = "CHANGE_PRELOADER" 25 | -------------------------------------------------------------------------------- /src/store/layout/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | CHANGE_LAYOUT, 3 | CHANGE_LAYOUT_WIDTH, 4 | CHANGE_SIDEBAR_THEME, 5 | CHANGE_SIDEBAR_TYPE, 6 | CHANGE_TOPBAR_THEME, 7 | CHANGE_LAYOUT_THEME, 8 | CHANGE_LAYOUT_POSITION, 9 | SHOW_RIGHT_SIDEBAR, 10 | SHOW_SIDEBAR, 11 | CHANGE_PRELOADER, 12 | TOGGLE_LEFTMENU, 13 | } from "./actionTypes" 14 | 15 | export const changeLayout = layout => ({ 16 | type: CHANGE_LAYOUT, 17 | payload: layout, 18 | }) 19 | 20 | export const changePreloader = layout => ({ 21 | type: CHANGE_PRELOADER, 22 | payload: layout, 23 | }) 24 | 25 | export const changeLayoutWidth = width => ({ 26 | type: CHANGE_LAYOUT_WIDTH, 27 | payload: width, 28 | }) 29 | 30 | export const changeSidebarTheme = theme => ({ 31 | type: CHANGE_SIDEBAR_THEME, 32 | payload: theme, 33 | }) 34 | 35 | export const changeSidebarType = (sidebarType, isMobile) => { 36 | return { 37 | type: CHANGE_SIDEBAR_TYPE, 38 | payload: { sidebarType, isMobile }, 39 | } 40 | } 41 | 42 | export const changeTopbarTheme = topbarTheme => ({ 43 | type: CHANGE_TOPBAR_THEME, 44 | payload: topbarTheme, 45 | }) 46 | 47 | export const changelayoutMode = (layoutMode, layoutType) => ({ 48 | type: CHANGE_LAYOUT_THEME, 49 | payload: { layoutMode, layoutType }, 50 | }) 51 | 52 | export const changeLayoutPosition = layoutPosition => ({ 53 | type: CHANGE_LAYOUT_POSITION, 54 | payload: layoutPosition, 55 | }) 56 | 57 | export const showRightSidebarAction = isopen => ({ 58 | type: SHOW_RIGHT_SIDEBAR, 59 | payload: isopen, 60 | }) 61 | 62 | export const showSidebar = isopen => ({ 63 | type: SHOW_SIDEBAR, 64 | payload: isopen, 65 | }) 66 | 67 | export const toggleLeftmenu = isopen => ({ 68 | type: TOGGLE_LEFTMENU, 69 | payload: isopen, 70 | }) 71 | -------------------------------------------------------------------------------- /src/store/reducers.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from "redux" 2 | import Layout from "./layout/reducer" 3 | import Login from "./auth/login/reducer" 4 | import Account from "./auth/register/reducer" 5 | import ForgetPassword from "./auth/forgetpwd/reducer" 6 | import Profile from "./auth/profile/reducer" 7 | import calendar from "./calendar/reducer" 8 | import chat from "./chat/reducer" 9 | import invoices from "./invoices/reducer" 10 | import contacts from "./contacts/reducer" 11 | import reports from "./reports/reducer" 12 | 13 | const rootReducer = combineReducers({ 14 | Layout, 15 | Login, 16 | Account, 17 | ForgetPassword, 18 | Profile, 19 | calendar, 20 | chat, 21 | invoices, 22 | reports, 23 | contacts, 24 | }) 25 | 26 | export default rootReducer 27 | -------------------------------------------------------------------------------- /src/store/reports/actionTypes.js: -------------------------------------------------------------------------------- 1 | 2 | export const GET_REPORT_HISTORY = "GET_REPORT_HISTORY" 3 | export const GET_REPORT_HISTORY_SUCCESS = 'GET_REPORT_HISTORY_SUCCESS' 4 | 5 | export const GET_REPORT_HISTORY_BYPROJECTID = 'GET_REPORT_HISTORY_BYPROJECTID' 6 | export const GET_REPORT_HISTORY_BYPROJECTID_SUCCESS = 'GET_REPORT_HISTORY_BYPROJECTID_SUCCESS' 7 | 8 | export const GET_REPORT_HISTORY_BYCOMPANY = 'GET_REPORT_HISTORY_BYCOMPANY' 9 | export const GET_REPORT_HISTORY_BYCOMPANY_SUCCESS = 'GET_REPORT_HISTORY_BYCOMPANY_SUCCESS' 10 | 11 | export const GET_REPORT_HISTORY_BYID = 'GET_REPORT_HISTORY_BYID' 12 | export const GET_REPORT_HISTORY_BYID_SUCCESS = 'GET_REPORT_HISTORY_BYID_SUCCESS' 13 | -------------------------------------------------------------------------------- /src/store/reports/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_REPORT_HISTORY, 3 | GET_REPORT_HISTORY_BYPROJECTID, 4 | GET_REPORT_HISTORY_BYPROJECTID_SUCCESS, 5 | GET_REPORT_HISTORY_BYCOMPANY, 6 | GET_REPORT_HISTORY_BYCOMPANY_SUCCESS, 7 | GET_REPORT_HISTORY_BYID, 8 | GET_REPORT_HISTORY_BYID_SUCCESS 9 | } from "./actionTypes" 10 | 11 | export const getReportHistories = () => ({ 12 | type: GET_REPORT_HISTORY, 13 | }) 14 | 15 | // export const getInvoicesSuccess = invoices => ({ 16 | // type: GET_INVOICES_SUCCESS, 17 | // payload: invoices, 18 | // }) 19 | 20 | export const getReportHisotryByProject = projectId => ({ 21 | type: GET_REPORT_HISTORY_BYPROJECTID, 22 | payload: projectId, 23 | }) 24 | 25 | export const getReportHisotryByProjectSuccess = reportHistory => ({ 26 | type: GET_REPORT_HISTORY_BYPROJECTID_SUCCESS, 27 | payload: reportHistory, 28 | }) 29 | 30 | export const getReportHistoriesByCompany = companyId => ({ 31 | type: GET_REPORT_HISTORY_BYCOMPANY, 32 | payload: companyId, 33 | }) 34 | 35 | export const getReportHistoriesByCompanySuccess = reportHistory => ({ 36 | type: GET_REPORT_HISTORY_BYCOMPANY_SUCCESS, 37 | payload: reportHistory, 38 | }) 39 | 40 | export const getReportHisotryById = id => ({ 41 | type: GET_REPORT_HISTORY_BYID, 42 | payload: id, 43 | }) 44 | 45 | export const getReportHisotryByIdSuccess = reportHistory => ({ 46 | type: GET_REPORT_HISTORY_BYID_SUCCESS, 47 | payload: reportHistory, 48 | }) 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/store/reports/reducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_REPORT_HISTORY_BYPROJECTID_SUCCESS, 3 | GET_REPORT_HISTORY_BYCOMPANY, 4 | GET_REPORT_HISTORY_BYCOMPANY_SUCCESS, 5 | GET_REPORT_HISTORY_BYID_SUCCESS, 6 | } from "./actionTypes"; 7 | 8 | const INIT_STATE = { 9 | report_histories: [], 10 | report_history: null, 11 | loading: false, 12 | }; 13 | 14 | const reports = (state = INIT_STATE, action) => { 15 | switch (action.type) { 16 | case GET_REPORT_HISTORY_BYPROJECTID_SUCCESS: 17 | return { 18 | ...state, 19 | report_history: action.payload, 20 | }; 21 | case GET_REPORT_HISTORY_BYID_SUCCESS: 22 | return { 23 | ...state, 24 | report_history: action.payload, 25 | }; 26 | case GET_REPORT_HISTORY_BYCOMPANY: 27 | return { 28 | ...state, 29 | loading: true, 30 | }; 31 | case GET_REPORT_HISTORY_BYCOMPANY_SUCCESS: 32 | return { 33 | ...state, 34 | loading: false, 35 | report_histories: action.payload, 36 | }; 37 | default: 38 | return state; 39 | } 40 | }; 41 | 42 | export default reports; 43 | -------------------------------------------------------------------------------- /src/store/reports/saga.js: -------------------------------------------------------------------------------- 1 | import { call, put, takeEvery } from "redux-saga/effects" 2 | 3 | // Crypto Redux States 4 | import { GET_REPORT_HISTORY_BYPROJECTID, GET_REPORT_HISTORY_BYCOMPANY, GET_REPORT_HISTORY_BYID} from "./actionTypes" 5 | import { 6 | getReportHisotryByProjectSuccess, 7 | getReportHistoriesByCompanySuccess, 8 | getReportHisotryByIdSuccess 9 | } from "./actions" 10 | import { getReportHistoryByProjectAsync, getReportHistoryByCompanyAsync, getReportHistoryByIdAsync } from "../../helpers/backend_helper" 11 | 12 | function* fetchReportHistoryByProject({payload: projectId}) { 13 | try { 14 | const response = yield call(getReportHistoryByProjectAsync, projectId) 15 | yield put(getReportHisotryByProjectSuccess(response)) 16 | } catch (error) { 17 | console.log('error =>',error) 18 | } 19 | } 20 | 21 | function* fetchReportHistoryByCompany({payload: companyId}) { 22 | try { 23 | const response = yield call(getReportHistoryByCompanyAsync, companyId) 24 | yield put(getReportHistoriesByCompanySuccess(response)) 25 | } catch (error) { 26 | console.log('error =>',error) 27 | } 28 | } 29 | 30 | 31 | function* fetchReportHistoryById({payload: id}) { 32 | try { 33 | const response = yield call(getReportHistoryByIdAsync, id) 34 | yield put(getReportHisotryByIdSuccess(response)) 35 | } catch (error) { 36 | console.log('error =>',error) 37 | } 38 | } 39 | 40 | 41 | 42 | 43 | function* reportsSaga() { 44 | yield takeEvery(GET_REPORT_HISTORY_BYPROJECTID, fetchReportHistoryByProject) 45 | yield takeEvery(GET_REPORT_HISTORY_BYCOMPANY, fetchReportHistoryByCompany) 46 | yield takeEvery(GET_REPORT_HISTORY_BYID, fetchReportHistoryById) 47 | } 48 | 49 | export default reportsSaga 50 | -------------------------------------------------------------------------------- /src/store/sagas.js: -------------------------------------------------------------------------------- 1 | import { all, fork } from "redux-saga/effects" 2 | 3 | //public 4 | import AccountSaga from "./auth/register/saga" 5 | import AuthSaga from "./auth/login/saga" 6 | import ForgetSaga from "./auth/forgetpwd/saga" 7 | import ProfileSaga from "./auth/profile/saga" 8 | import LayoutSaga from "./layout/saga" 9 | import calendarSaga from "./calendar/saga" 10 | import chatSaga from "./chat/saga" 11 | import invoiceSaga from "./invoices/saga" 12 | import contactsSaga from "./contacts/saga"; 13 | import reportsSaga from "./reports/saga" 14 | 15 | export default function* rootSaga() { 16 | yield all([ 17 | //public 18 | fork(AccountSaga), 19 | fork(AuthSaga), 20 | fork(ForgetSaga), 21 | fork(ProfileSaga), 22 | fork(LayoutSaga), 23 | fork(calendarSaga), 24 | fork(chatSaga), 25 | fork(invoiceSaga), 26 | fork(reportsSaga), 27 | fork(contactsSaga) 28 | ]) 29 | } 30 | --------------------------------------------------------------------------------