diff --git a/.env.example b/.env.example
deleted file mode 100644
index 4ca0343..0000000
--- a/.env.example
+++ /dev/null
@@ -1,6 +0,0 @@
-VITE_GRAPHQL_SUPPORT_API=https://example.com/graphql
-VITE_PAYMENT_API=https://example.com/payment/api
-VITE_GRAPHQL_SUPPORT_SUBSCRIPTIONS_API=https://example.com/graphql
-VITE_GRAPHQL_API=https://example.com/graphql
-VITE_STRIPE_PUBLIC_KEY=STRIPE_PUBLIC_KEY
-VITE_CLOUDINARY_URL=CLOUDINARY_URL
\ No newline at end of file
diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 82a9a73..0000000
--- a/.eslintignore
+++ /dev/null
@@ -1 +0,0 @@
-.eslintrc.js
\ No newline at end of file
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index ac9efb0..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,65 +0,0 @@
-module.exports = {
- extends: [
- 'airbnb-typescript',
- 'airbnb/hooks',
- 'plugin:jest/recommended',
- 'plugin:prettier/recommended',
- 'plugin:@typescript-eslint/recommended',
- 'plugin:import/recommended'
- ],
- plugins: ['react', '@typescript-eslint', 'jest', 'prettier'],
- env: {
- browser: true,
- es6: true,
- jest: true,
- },
- globals: {
- Atomics: 'readonly',
- SharedArrayBuffer: 'readonly',
- },
- parser: '@typescript-eslint/parser',
- parserOptions: {
- ecmaFeatures: {
- jsx: true,
- },
- ecmaVersion: 2018,
- sourceType: 'module',
- project: './tsconfig.json',
- },
- rules: {
- 'no-console': 0,
- 'no-nested-ternary': 'off',
- 'no-unused-expressions': 'off',
- '@typescript-eslint/no-unused-expressions': [
- 'warn',
- { allowShortCircuit: true, allowTernary: true },
- ],
- '@typescript-eslint/ban-ts-comment': 0,
- 'react-hooks/exhaustive-deps': 1,
- 'import/no-cycle': 'off',
- 'react/jsx-props-no-spreading': 'off',
- 'react/require-default-props': 0,
- 'import/prefer-default-export': 'off',
- 'import/no-extraneous-dependencies': 0,
- 'no-prototype-builtins': 'off',
- 'no-plusplus': 'off',
- '@typescript-eslint/no-use-before-define': 'off',
- '@typescript-eslint/no-non-null-asserted-optional-chain': 0,
- '@typescript-eslint/no-non-null-assertion': 0,
- 'react/prop-types': 'off',
- 'react/react-in-jsx-scope': 'off',
- 'react/self-closing-comp': 0,
- 'react/no-array-index-key': 0,
- '@typescript-eslint/camelcase': 'off',
- '@typescript-eslint/explicit-function-return-type': 0,
- '@typescript-eslint/explicit-module-boundary-types': 0,
- '@typescript-eslint/no-explicit-any': 0,
- 'linebreak-style': 'off',
- 'prettier/prettier': [
- 'error',
- {
- endOfLine: 'auto',
- },
- ],
- },
-};
diff --git a/.gitignore b/.gitignore
index 8f99cf5..f591aee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,11 +17,9 @@ codegen-*
# misc
.DS_Store
.env
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
+.env.*
npm-debug.log*
yarn-debug.log*
-yarn-error.log*
\ No newline at end of file
+yarn-error.log*
+*storybook.log
diff --git a/.storybook/main.ts b/.storybook/main.ts
new file mode 100644
index 0000000..092f81a
--- /dev/null
+++ b/.storybook/main.ts
@@ -0,0 +1,20 @@
+import type { StorybookConfig } from '@storybook/react-vite';
+
+const config: StorybookConfig = {
+ "stories": [
+ "../src/**/*.mdx",
+ "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
+ ],
+ "addons": [
+ "@storybook/addon-essentials",
+ "@storybook/addon-onboarding",
+ "@chromatic-com/storybook",
+ "@storybook/addon-interactions",
+ "@storybook/addon-themes"
+ ],
+ "framework": {
+ "name": "@storybook/react-vite",
+ "options": {}
+ }
+};
+export default config;
\ No newline at end of file
diff --git a/.storybook/preview.ts b/.storybook/preview.ts
new file mode 100644
index 0000000..5b87664
--- /dev/null
+++ b/.storybook/preview.ts
@@ -0,0 +1,30 @@
+import type { Preview } from '@storybook/react'
+
+import { ThemeProvider } from 'styled-components';
+import { withThemeFromJSXProvider } from '@storybook/addon-themes';
+
+import { theme } from '../src/themes';
+
+import GlobalStyles from '../src/components/GlobalStyles';
+
+const preview: Preview = {
+ parameters: {
+ controls: {
+ matchers: {
+ color: /(background|color)$/i,
+ date: /Date$/i,
+ },
+ },
+ },
+
+ decorators: [withThemeFromJSXProvider({
+ themes: {
+ theme,
+ },
+ defaultTheme: 'theme',
+ Provider: ThemeProvider,
+ GlobalStyles,
+ })]
+};
+
+export default preview;
diff --git a/README.md b/README.md
deleted file mode 100644
index e08ad52..0000000
--- a/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Access Accounts for The Demo
-1. Client
-```
-- Email: client@client.cc
-- Password: 123456
-```
-2. Product Owner
-```
-- Email: po@po.cc
-- Password: 123456
-```
-3. Developer
-```
-- Email: dev@dev.cc
-- Password: 123456
-```
-4. Admin
-```
-- Email: admin@admin.cc
-- Password: 123456
-```
-
-# Installation
-Check the `.env.example` for the list of APIs to use then clone and run
-
-```
-yarn
-```
-
-For the backend configuration check [here](https://github.com/MedAmineFouzai/astrobuild-api)
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..aaf69f9
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,35 @@
+import globals from 'globals';
+import pluginJs from '@eslint/js';
+import tseslint from 'typescript-eslint';
+import pluginReact from 'eslint-plugin-react';
+import hooksPlugin from 'eslint-plugin-react-hooks';
+import prettier from 'eslint-plugin-prettier';
+
+// TODO: Better understand and improve this config along with tsconfig.
+/** @type {import('eslint').Linter.Config[]} */
+export default [
+ { files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
+ { languageOptions: { globals: globals.browser } },
+ pluginJs.configs.recommended,
+ ...tseslint.configs.recommended,
+ pluginReact.configs.flat.recommended,
+ {
+ plugins: {
+ prettier,
+ },
+ rules: {
+ 'react/react-in-jsx-scope': 'off'
+ },
+ settings: {
+ react: {
+ version: 'detect'
+ }
+ }
+ },
+ {
+ plugins: {
+ 'react-hooks': hooksPlugin,
+ },
+ rules: hooksPlugin.configs.recommended.rules,
+ }
+];
diff --git a/index.html b/index.html
deleted file mode 100644
index 46a45a0..0000000
--- a/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- Astrobuild
-
-
-
-
-
-
-
diff --git a/package.json b/package.json
index fa7f242..2956803 100644
--- a/package.json
+++ b/package.json
@@ -1,45 +1,14 @@
{
"name": "astrobuild",
- "version": "0.1.0",
- "private": true,
- "dependencies": {
- "@apollo/client": "^3.7.10",
- "@testing-library/jest-dom": "^5.16.5",
- "@testing-library/react": "^14.0.0",
- "@testing-library/user-event": "^14.4.3",
- "@types/jest": "^29.5.0",
- "@types/jwt-decode": "^3.1.0",
- "@types/node": "^18.15.7",
- "@types/react": "^18.0.29",
- "@types/react-dom": "^18.0.11",
- "@types/react-router-dom": "^5.3.3",
- "@types/styled-components": "^5.1.26",
- "formik": "^2.2.9",
- "graphql": "^16.6.0",
- "graphql-ws": "^5.13.1",
- "jwt-decode": "^3.1.2",
- "localforage": "^1.10.0",
- "match-sorter": "^6.3.1",
- "react": "^18.2.0",
- "react-dom": "^18.2.0",
- "react-elastic-carousel": "^0.11.5",
- "react-router-dom": "^6.9.0",
- "react-to-print": "^2.14.12",
- "reactflow": "^11.7.0",
- "sort-by": "^1.2.0",
- "styled-components": "^5.3.10",
- "typescript": "^5.0.2",
- "vite-plugin-svgr": "^2.4.0",
- "web-vitals": "^3.3.0",
- "yup": "^1.0.2"
- },
+ "version": "1.0.0",
+ "private": false,
+ "type": "module",
"scripts": {
- "start": "vite",
"build": "vite build",
- "generate:main": "graphql-codegen --config codegen-main.yml",
- "lint": "yarn run eslint src --ext .ts,.tsx",
- "fix": "yarn lint --fix",
- "generate:support": "graphql-codegen --config codegen-support.ts"
+ "lint": "eslint src",
+ "format": "prettier -w src",
+ "storybook": "storybook dev -p 6006",
+ "build-storybook": "storybook build"
},
"browserslist": {
"production": [
@@ -54,24 +23,38 @@
]
},
"devDependencies": {
- "@graphql-codegen/cli": "3.3.1",
- "@graphql-codegen/client-preset": "3.0.1",
- "@graphql-codegen/introspection": "3.0.1",
- "@graphql-codegen/typescript": "^3.0.2",
- "@graphql-codegen/typescript-operations": "^3.0.2",
- "@typescript-eslint/eslint-plugin": "^5.56.0",
- "@typescript-eslint/parser": "^5.56.0",
+ "@chromatic-com/storybook": "^3",
+ "@eslint/js": "^9.22.0",
+ "@storybook/addon-essentials": "^8.6.7",
+ "@storybook/addon-interactions": "^8.6.7",
+ "@storybook/addon-onboarding": "^8.6.7",
+ "@storybook/addon-themes": "^8.6.7",
+ "@storybook/blocks": "^8.6.7",
+ "@storybook/react": "^8.6.7",
+ "@storybook/react-vite": "^8.6.7",
+ "@storybook/test": "^8.6.7",
+ "@types/node": "^22.13.10",
+ "@types/react": "^19.0.10",
+ "@types/react-dom": "^19.0.4",
+ "@types/styled-components": "^5.1.34",
+ "@typescript-eslint/eslint-plugin": "^8.26.1",
+ "@typescript-eslint/parser": "^8.26.1",
"@vitejs/plugin-react": "^4.0.0",
- "eslint-config-airbnb": "19.0.4",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.8.0",
- "eslint-plugin-import": "2.27.5",
- "eslint-plugin-jest": "^27.2.1",
- "eslint-plugin-jsx-a11y": "6.7.1",
- "eslint-plugin-prettier": "^4.2.1",
- "eslint-plugin-react": "7.32.2",
- "eslint-plugin-react-hooks": "4.6.0",
- "prettier": "^2.8.7",
- "vite": "^4.2.1"
+ "eslint": "^9.22.0",
+ "eslint-config-prettier": "^10.1.1",
+ "eslint-plugin-prettier": "^5.2.3",
+ "eslint-plugin-react": "7.37.4",
+ "eslint-plugin-react-hooks": "5.2.0",
+ "eslint-plugin-storybook": "^0.11.5",
+ "globals": "^16.0.0",
+ "prettier": "^3.5.3",
+ "react": "^19.0.0",
+ "react-dom": "^19.0.0",
+ "storybook": "^8.6.7",
+ "styled-components": "^6.1.15",
+ "typescript": "^5.8.2",
+ "typescript-eslint": "^8.26.1",
+ "vite": "^6.2.2",
+ "vite-plugin-svgr": "^4.3.0"
}
}
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100644
index b069b88..0000000
Binary files a/public/favicon.ico and /dev/null differ
diff --git a/public/logo192.png b/public/logo192.png
deleted file mode 100644
index fc44b0a..0000000
Binary files a/public/logo192.png and /dev/null differ
diff --git a/public/logo512.png b/public/logo512.png
deleted file mode 100644
index a4e47a6..0000000
Binary files a/public/logo512.png and /dev/null differ
diff --git a/public/manifest.json b/public/manifest.json
deleted file mode 100644
index 080d6c7..0000000
--- a/public/manifest.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "short_name": "React App",
- "name": "Create React App Sample",
- "icons": [
- {
- "src": "favicon.ico",
- "sizes": "64x64 32x32 24x24 16x16",
- "type": "image/x-icon"
- },
- {
- "src": "logo192.png",
- "type": "image/png",
- "sizes": "192x192"
- },
- {
- "src": "logo512.png",
- "type": "image/png",
- "sizes": "512x512"
- }
- ],
- "start_url": ".",
- "display": "standalone",
- "theme_color": "#000000",
- "background_color": "#ffffff"
-}
diff --git a/public/robots.txt b/public/robots.txt
deleted file mode 100644
index e9e57dc..0000000
--- a/public/robots.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# https://www.robotstxt.org/robotstxt.html
-User-agent: *
-Disallow:
diff --git a/screenshots/admin.png b/screenshots/admin.png
deleted file mode 100755
index 3b82587..0000000
Binary files a/screenshots/admin.png and /dev/null differ
diff --git a/screenshots/project.png b/screenshots/project.png
deleted file mode 100755
index 88e689e..0000000
Binary files a/screenshots/project.png and /dev/null differ
diff --git a/screenshots/prototype.png b/screenshots/prototype.png
deleted file mode 100755
index f474d68..0000000
Binary files a/screenshots/prototype.png and /dev/null differ
diff --git a/screenshots/support.png b/screenshots/support.png
deleted file mode 100755
index 6f12a65..0000000
Binary files a/screenshots/support.png and /dev/null differ
diff --git a/screenshots/template.png b/screenshots/template.png
deleted file mode 100755
index 9e25d6b..0000000
Binary files a/screenshots/template.png and /dev/null differ
diff --git a/src/App.tsx b/src/App.tsx
deleted file mode 100644
index 0917687..0000000
--- a/src/App.tsx
+++ /dev/null
@@ -1,352 +0,0 @@
-import jwtDecode from 'jwt-decode';
-import { useEffect } from 'react';
-import { Routes, Route, Navigate } from 'react-router-dom';
-import { useLazyQuery, useReactiveVar } from '@apollo/client';
-import { Protected, Public, Navbar, Sidebar, Spinner } from './components';
-import { roleVar, tokenVar, userVar } from './graphql/state';
-import {
- AdditionalInfo,
- ForgotPassword,
- Login,
- RecoverAccount,
- Signup,
- Project,
- Users,
- Settings,
- UserSettings,
- CreateUser,
- Template,
- Feature,
- Category,
- Prototype,
- AddCategory,
- AddFeature,
- AddTemplate,
- CategorySettings,
- FeatureSettings,
- TemplateSettings,
- AddProject,
- UpdateProject,
- Support,
-} from './pages';
-import { GetUserByIdQuery, GetUserByIdQueryVariables } from './graphql/types';
-import { GET_USER_BY_ID } from './graphql/auth.api';
-
-const App = () => {
- const token = useReactiveVar(tokenVar);
- const role = useReactiveVar(roleVar);
- const currentUser = useReactiveVar(userVar);
-
- const [getUserById, { loading }] = useLazyQuery<
- GetUserByIdQuery,
- GetUserByIdQueryVariables
- >(GET_USER_BY_ID, {
- onCompleted({ getUserById: user }) {
- userVar(user);
- switch (user.role) {
- case 'Client':
- roleVar('client');
- break;
- case 'ProductOwner':
- roleVar('productOwner');
- break;
- case 'Developer':
- roleVar('developer');
- break;
- case 'Admin':
- roleVar('admin');
- break;
- default:
- break;
- }
- },
- });
-
- useEffect(() => {
- const localStorageToken = localStorage.getItem('token');
-
- if (localStorageToken) {
- const { id } = jwtDecode<{ id: string; role: string }>(localStorageToken);
-
- getUserById({ variables: { id } });
- tokenVar(localStorageToken);
- }
- }, []);
-
- return !loading ? (
- <>
- {token && currentUser?.firstName && (
- <>
-
-
- >
- )}
-
-
- {role !== 'admin' ? (
-
- ) : (
-
- )}
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
-
-
- }
- />
-
- >
- ) : (
-
- );
-};
-
-export default App;
diff --git a/src/assets/index.ts b/src/assets/index.ts
index 5cfa15f..ba3fc58 100644
--- a/src/assets/index.ts
+++ b/src/assets/index.ts
@@ -1,39 +1,39 @@
-import { ReactComponent as Add } from './icons/add.svg';
-import { ReactComponent as Upload } from './icons/upload.svg';
-import { ReactComponent as ChevronDown } from './icons/chevron-down.svg';
-import { ReactComponent as ChevronLeft } from './icons/chevron-left.svg';
-import { ReactComponent as ChevronRight } from './icons/chevron-right.svg';
-import { ReactComponent as ArrowLeft } from './icons/arrow-left.svg';
-import { ReactComponent as ArrowRight } from './icons/arrow-right.svg';
-import { ReactComponent as Search } from './icons/search.svg';
-import { ReactComponent as Check } from './icons/check.svg';
-import { ReactComponent as CheckCircle } from './icons/check-circle.svg';
-import { ReactComponent as Google } from './icons/google.svg';
-import { ReactComponent as Settings } from './icons/settings.svg';
-import { ReactComponent as Logout } from './icons/logout.svg';
-import { ReactComponent as Logo } from './icons/logo.svg';
-import { ReactComponent as Profile } from './icons/profile.svg';
-import { ReactComponent as Security } from './icons/security.svg';
-import { ReactComponent as Edit } from './icons/edit.svg';
-import { ReactComponent as Delete } from './icons/delete.svg';
-import { ReactComponent as General } from './icons/general.svg';
-import { ReactComponent as Design } from './icons/design.svg';
-import { ReactComponent as FullBuild } from './icons/full-build.svg';
-import { ReactComponent as MVP } from './icons/mvp.svg';
-import { ReactComponent as Specification } from './icons/specification.svg';
-import { ReactComponent as Features } from './icons/features.svg';
-import { ReactComponent as Frontend } from './icons/frontend.svg';
-import { ReactComponent as Backend } from './icons/backend.svg';
-import { ReactComponent as Close } from './icons/close.svg';
-import { ReactComponent as Payment } from './icons/payment.svg';
-import { ReactComponent as Messaging } from './icons/messaging.svg';
-import { ReactComponent as Send } from './icons/send.svg';
-import { ReactComponent as Attachment } from './icons/attachment.svg';
-import { ReactComponent as Login } from './images/login.svg';
-import { ReactComponent as Signup } from './images/signup.svg';
-import { ReactComponent as Empty } from './images/empty.svg';
-import { ReactComponent as ThreadClient } from './images/thread-client.svg';
-import { ReactComponent as ThreadProductOwner } from './images/thread-po.svg';
+import Add from './icons/add.svg?react';
+import Upload from './icons/upload.svg?react';
+import ChevronDown from './icons/chevron-down.svg?react';
+import ChevronLeft from './icons/chevron-left.svg?react';
+import ChevronRight from './icons/chevron-right.svg?react';
+import ArrowLeft from './icons/arrow-left.svg?react';
+import ArrowRight from './icons/arrow-right.svg?react';
+import Search from './icons/search.svg?react';
+import Check from './icons/check.svg?react';
+import CheckCircle from './icons/check-circle.svg?react';
+import Google from './icons/google.svg?react';
+import Settings from './icons/settings.svg?react';
+import Logout from './icons/logout.svg?react';
+import Logo from './icons/logo.svg?react';
+import Profile from './icons/profile.svg?react';
+import Security from './icons/security.svg?react';
+import Edit from './icons/edit.svg?react';
+import Delete from './icons/delete.svg?react';
+import General from './icons/general.svg?react';
+import Design from './icons/design.svg?react';
+import FullBuild from './icons/full-build.svg?react';
+import MVP from './icons/mvp.svg?react';
+import Specification from './icons/specification.svg?react';
+import Features from './icons/features.svg?react';
+import Frontend from './icons/frontend.svg?react';
+import Backend from './icons/backend.svg?react';
+import Close from './icons/close.svg?react';
+import Payment from './icons/payment.svg?react';
+import Messaging from './icons/messaging.svg?react';
+import Send from './icons/send.svg?react';
+import Attachment from './icons/attachment.svg?react';
+import Login from './images/login.svg?react';
+import Signup from './images/signup.svg?react';
+import Empty from './images/empty.svg?react';
+import ThreadClient from './images/thread-client.svg?react';
+import ThreadProductOwner from './images/thread-po.svg?react';
export {
Add,
diff --git a/src/components/Alert/index.stories.ts b/src/components/Alert/index.stories.ts
new file mode 100644
index 0000000..75bb887
--- /dev/null
+++ b/src/components/Alert/index.stories.ts
@@ -0,0 +1,26 @@
+import type { Meta, StoryObj } from '@storybook/react';
+
+import Alert from '.';
+
+const meta = {
+ title: 'Alert',
+ component: Alert,
+ parameters: {
+ layout: 'centered',
+ },
+ tags: ['autodocs'],
+ argTypes: {
+ text: { control: 'text' },
+ color: { control: 'color' },
+ },
+} satisfies Meta;
+
+export default meta;
+type Story = StoryObj;
+
+export const Primary: Story = {
+ args: {
+ text: 'Alert',
+ color: 'client'
+ },
+};
diff --git a/src/GlobalStyles.tsx b/src/components/GlobalStyles/index.tsx
similarity index 100%
rename from src/GlobalStyles.tsx
rename to src/components/GlobalStyles/index.tsx
diff --git a/src/components/Protected/index.tsx b/src/components/Protected/index.tsx
deleted file mode 100644
index 04abfe3..0000000
--- a/src/components/Protected/index.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import { useReactiveVar } from '@apollo/client';
-import { Navigate } from 'react-router-dom';
-import { tokenVar } from '../../graphql/state';
-
-type Props = {
- children: React.ReactNode;
-};
-
-const Protected = ({ children }: Props) => {
- const token = useReactiveVar(tokenVar);
-
- return (
- <>
- {token ? children : }
- >
- );
-};
-
-export default Protected;
diff --git a/src/components/Public/index.tsx b/src/components/Public/index.tsx
deleted file mode 100644
index fac62d5..0000000
--- a/src/components/Public/index.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import { useReactiveVar } from '@apollo/client';
-import { Navigate } from 'react-router-dom';
-import { tokenVar } from '../../graphql/state';
-
-type Props = {
- children: React.ReactNode;
-};
-
-const Public = ({ children }: Props) => {
- const token = useReactiveVar(tokenVar);
-
- return (
- <>
- {!token ? children : }
- >
- );
-};
-
-export default Public;
diff --git a/src/components/Specification/index.tsx b/src/components/Specification/index.tsx
deleted file mode 100644
index e289489..0000000
--- a/src/components/Specification/index.tsx
+++ /dev/null
@@ -1,204 +0,0 @@
-import { forwardRef } from 'react';
-import { Box, Text } from '..';
-import { FeatureOutput, SpecificationOutput } from '../../graphql/types';
-import { Wrapper } from './styles';
-
-type SpecificationProps = {
- specification: SpecificationOutput;
- features: Array;
-};
-
-const Specification = forwardRef(
- ({ specification, features }, ref) => {
- return (
-
-
- Customer Requirements Specifications
-
-
-
-
- 1. Introduction
-
-
-
-
- 1.1. Purpose
-
- {specification.introduction.purpose}
-
-
-
- 1.2. Document Conventions
-
-
- {specification.introduction.documentConventions}
-
-
-
-
- 1.3. Intended Audience and Reading Suggestions
-
-
- {specification.introduction.intendedAudience}
-
-
-
-
- 1.4. Project Scope
-
-
- {specification.introduction.projectScope}
-
-
-
-
-
-
- 2. Overall Description
-
-
-
-
- 2.1. Project Perspective
-
-
- {specification.overallDescription.perspective}
-
-
-
-
- 2.2. User Classes and Characteristics
-
-
- {specification.overallDescription.userCharacteristics}
-
-
-
-
- 2.3. Operating Environment
-
-
- {specification.overallDescription.operatingEnvironment}
-
-
-
-
- 2.4. Design and Implementation Constraints
-
-
- {specification.overallDescription.designImplementationConstraints}
-
-
-
-
- 2.5. User Documentation
-
-
- {specification.overallDescription.userDocumentation}
-
-
-
-
- 2.6. Assumptions and Dependencies
-
-
- {specification.overallDescription.assemptionsDependencies}
-
-
-
-
-
-
- 3. System Features
-
-
- {features.map((feature, index) => (
-
-
- 3.{index + 1}. {feature.name}
-
- {feature.description}
-
- ))}
-
-
-
-
- 4. Other Non-Functional Requirements
-
-
-
-
- 4.1. Performance Requirements
-
-
- {specification.nonFunctionalRequirements.performanceRequirements}
-
-
-
-
- 4.2. Safety Requirements
-
-
- {specification.nonFunctionalRequirements.safetyRequirements}
-
-
-
-
- 4.3. Security Requirements
-
-
- {specification.nonFunctionalRequirements.securityRequirements}
-
-
-
-
- 4.4. Software Quality Attributes
-
-
- {
- specification.nonFunctionalRequirements
- .softwareQualityAttributes
- }
-
-
-
-
-
-
- 5. Other Requirements
-
-
- {specification.otherRequirements}
-
-
-
-
- 6. Glossary
-
-
- {specification.glossary}
-
-
-
-
- 6. Analysis Models
-
-
- {specification.analysisModels}
-
-
-
-
- 7. Issues List
-
-
- {specification.issuesList}
-
-
- );
- }
-);
-
-export default Specification;
diff --git a/src/components/Specification/styles.ts b/src/components/Specification/styles.ts
deleted file mode 100644
index 08b6808..0000000
--- a/src/components/Specification/styles.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- padding: 1rem;
-`;
diff --git a/src/components/index.tsx b/src/components/index.tsx
deleted file mode 100644
index ed61ee0..0000000
--- a/src/components/index.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import Button from './Button';
-import IconButton from './IconButton';
-import Box from './Box';
-import Text from './Text';
-import Link from './Link';
-import Input from './Input';
-import TextArea from './TextArea';
-import Select from './Select';
-import Search from './Search';
-import Avatar from './Avatar';
-import ContextMenu from './ContextMenu';
-import Spinner from './Spinner';
-import Alert from './Alert';
-import CheckBox from './CheckBox';
-import Menu from './Menu';
-import Navbar from './Navbar';
-import Sidebar from './Sidebar';
-import Protected from './Protected';
-import Public from './Public';
-import SectionSelector from './SectionSelector';
-import Modal from './Modal';
-import SidebarItem from './SidebarItem';
-import ImagePreview from './ImagePreview';
-import FeatureCard from './FeatureCard';
-import FrontendFeatureCard from './FrontendFeatureCard';
-import BackendFeatureCard from './BackendFeatureCard';
-import Specification from './Specification';
-import Chip from './Chip';
-import CategoryCard from './CategoryCard';
-import TemplateCard from './TemplateCard';
-import SupportSidebar from './SupportSidebar';
-
-export {
- Button,
- IconButton,
- Box,
- Text,
- Link,
- Input,
- TextArea,
- Select,
- Search,
- Avatar,
- ContextMenu,
- Menu,
- Spinner,
- Alert,
- CheckBox,
- Navbar,
- Sidebar,
- Protected,
- Public,
- SectionSelector,
- Modal,
- SidebarItem,
- ImagePreview,
- FeatureCard,
- FrontendFeatureCard,
- BackendFeatureCard,
- Specification,
- Chip,
- CategoryCard,
- TemplateCard,
- SupportSidebar,
-};
diff --git a/src/graphql/admin.api.ts b/src/graphql/admin.api.ts
deleted file mode 100644
index c74b14c..0000000
--- a/src/graphql/admin.api.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import gql from 'graphql-tag';
-
-export const GET_ALL_USERS = gql`
- query GetAllUsers {
- getAllUsers {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
-
-export const GET_USER_BY_ID = gql`
- query GetUserById($id: String!) {
- getUserById(id: $id) {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
-
-export const CREATE_USER = gql`
- mutation CreateUser($user: UserInput!) {
- createUser(user: $user) {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
diff --git a/src/graphql/auth.api.ts b/src/graphql/auth.api.ts
deleted file mode 100644
index 01ccc84..0000000
--- a/src/graphql/auth.api.ts
+++ /dev/null
@@ -1,192 +0,0 @@
-import gql from 'graphql-tag';
-
-export const SIGNUP = gql`
- mutation Signup($email: String!, $password: String!) {
- signup(email: $email, password: $password) {
- user {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- token
- }
- }
-`;
-
-export const LOGIN = gql`
- mutation Login($email: String!, $password: String!) {
- login(email: $email, password: $password) {
- user {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- token
- }
- }
-`;
-
-export const RESET_PASSWORD = gql`
- mutation ResetPassword($email: String!) {
- resetUserPassword(email: $email) {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
-
-export const CONFIRM_USER_RESET_PASSWORD = gql`
- mutation ConfirmUserResetPassword($id: String!, $password: String!) {
- confirmUserResetPassword(id: $id, password: $password) {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
-
-export const UPDATE_USER_INFO = gql`
- mutation UpdateUserInfo($user: UpdateUserInput!) {
- updateUserInfo(user: $user) {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
-
-export const UPDATE_USER_PASSWORD = gql`
- mutation UpdateUserPassword($id: String!, $password: PasswordInput!) {
- updateUserPassword(id: $id, password: $password) {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
-
-export const DELETE_USER = gql`
- mutation DeleteUser($id: String!, $password: String!) {
- deleteUser(id: $id, password: $password) {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
-
-export const GET_USER_BY_ID = gql`
- query GetUserById($id: String!) {
- getUserById(id: $id) {
- id
- email
- firstName
- lastName
- phone {
- prefix
- number
- }
- address {
- place
- city
- country
- zip
- }
- role
- }
- }
-`;
-
-export const GET_COUNTRY_CODES = gql`
- query GetCountryCodes {
- getCountryCode {
- prefix
- country
- }
- }
-`;
diff --git a/src/graphql/category.api.ts b/src/graphql/category.api.ts
deleted file mode 100644
index c4b6862..0000000
--- a/src/graphql/category.api.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import gql from 'graphql-tag';
-
-export const GET_ALL_CATEGORIES = gql`
- query GetAllCategories {
- getAllCategories {
- id
- name
- description
- image {
- name
- src
- }
- }
- }
-`;
-
-export const GET_CATEGORY_BY_ID = gql`
- query GetCategoryById($id: String!) {
- getCategoryById(id: $id) {
- id
- name
- description
- image {
- name
- src
- }
- }
- }
-`;
-
-export const ADD_CATEGORY = gql`
- mutation AddCategory($category: CategoryInput!) {
- addCategory(category: $category) {
- id
- name
- description
- image {
- name
- src
- }
- }
- }
-`;
-
-export const UPDATE_CATEGORY = gql`
- mutation UpdateCategory($id: String!, $category: CategoryInput!) {
- updateCategory(id: $id, category: $category) {
- id
- name
- description
- image {
- name
- src
- }
- }
- }
-`;
-
-export const DELETE_CATEGORY = gql`
- mutation DeleteCategory($id: String!) {
- deleteCategory(id: $id) {
- id
- name
- description
- image {
- name
- src
- }
- }
- }
-`;
diff --git a/src/graphql/chat.api.support.ts b/src/graphql/chat.api.support.ts
deleted file mode 100644
index 0673bd7..0000000
--- a/src/graphql/chat.api.support.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import gql from 'graphql-tag';
-
-export const GET_PROJECT_THREADS = gql`
- query GetProjectThreads($projectId: String!) {
- threads(projectId: $projectId) {
- id
- title
- threadDescription
- userMessages {
- id
- username
- text
- }
- }
- }
-`;
-
-export const GET_THREAD_BY_ID = gql`
- query GetThreadById($threadId: String!) {
- thread(threadId: $threadId) {
- id
- title
- threadDescription
- userMessages {
- id
- username
- text
- }
- }
- }
-`;
-
-export const MESSAGES = gql`
- query Messages($threadId: String!) {
- messages(threadId: $threadId) {
- username
- text
- }
- }
-`;
-
-export const CREATE_THREAD = gql`
- mutation CreateThread(
- $projectId: String!
- $title: String!
- $threadDescription: String!
- ) {
- createThread(
- projectId: $projectId
- title: $title
- threadDescription: $threadDescription
- ) {
- id
- }
- }
-`;
-
-export const SEND_MSG = gql`
- mutation SendMessage($threadId: String!, $username: String!, $text: String!) {
- sendMessage(threadId: $threadId, username: $username, text: $text)
- }
-`;
-
-export const MESSAGES_SUBSCRIPTION = gql`
- subscription messagesSubscription {
- messages {
- mutationType
- id
- userMessages {
- id
- username
- text
- }
- }
- }
-`;
diff --git a/src/graphql/feature.api.ts b/src/graphql/feature.api.ts
deleted file mode 100644
index 14ade39..0000000
--- a/src/graphql/feature.api.ts
+++ /dev/null
@@ -1,155 +0,0 @@
-import gql from 'graphql-tag';
-
-export const GET_ALL_FEATURES = gql`
- query GetAllFeatures {
- getAllFeatures {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- }
-`;
-
-export const GET_FEATURE_BY_ID = gql`
- query GetFeatureById($id: String!) {
- getFeatureById(id: $id) {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- }
-`;
-
-export const ADD_FEATURE = gql`
- mutation AddFeature($feature: FeatureInput!) {
- addFeature(feature: $feature) {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- }
-`;
-
-export const UPDATE_FEATURE = gql`
- mutation UpdateFeature($id: String!, $feature: FeatureInput!) {
- updateFeature(id: $id, feature: $feature) {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- }
-`;
-
-export const DELETE_FEATURE = gql`
- mutation DeleteFeature($id: String!) {
- deleteFeature(id: $id) {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- }
-`;
-
-export const ADD_FEATURE_WIREFRAMES = gql`
- mutation AddFeatureWireframes($id: String!, $wireframes: [InputFile!]!) {
- addFeatureWireframes(id: $id, wireframes: $wireframes) {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- }
-`;
-
-export const DELETE_FEATURE_WIREFRAME = gql`
- mutation DeleteFeatureWireframe($id: String!) {
- deleteFeatureWireframe(id: $id) {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- }
-`;
diff --git a/src/graphql/project.api.ts b/src/graphql/project.api.ts
deleted file mode 100644
index 525a6e2..0000000
--- a/src/graphql/project.api.ts
+++ /dev/null
@@ -1,1201 +0,0 @@
-import gql from 'graphql-tag';
-
-export const GET_ALL_PROJECTS = gql`
- query GetAllProjects {
- getAllProjects {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const GET_ALL_PROJECTS_BY_CLIENT_ID = gql`
- query GetAllProjectsByClientId($id: String!) {
- getAllProjectsByClientId(id: $id) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const GET_PROJECT_BY_ID = gql`
- query GetProjectById($id: String!) {
- getProjectById(id: $id) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const ADD_PROJECT = gql`
- mutation AddProject($project: ProjectInput!) {
- addProject(project: $project) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const CHANGE_PROJECT_STATE = gql`
- mutation ChangeProjectState($id: String!, $state: State!) {
- changeProjectState(id: $id, state: $state) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const UPDATE_PROJECT = gql`
- mutation UpdateProject($id: String!, $name: String!, $image: InputFile!) {
- updateProject(id: $id, name: $name, image: $image) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const ADD_PROJECT_PROPOSAL = gql`
- mutation AddProjectProposal($id: String!, $proposal: ProposalInput!) {
- addProjectProposal(id: $id, proposal: $proposal) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const ADD_PROJECT_DESIGN = gql`
- mutation AddProjectDesign($design: ProjectFileInput!) {
- addProjectDesign(design: $design) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const ADD_PROJECT_MVP = gql`
- mutation AddProjectMvp($mvp: ProjectFileInput!) {
- addProjectMvp(mvp: $mvp) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
-
-export const ADD_PROJECT_FULL_BUILD = gql`
- mutation AddProjectFullBuild($fullBuild: ProjectFullBuildInput!) {
- addProjectFullBuild(fullBuild: $fullBuild) {
- id
- clientId
- name
- image {
- name
- src
- }
- platforms
- template {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- state
- proposal {
- devtime {
- months
- days
- hours
- }
- summary
- purpose
- resources {
- resourceType
- developers
- }
- }
- paymentOption {
- optOne
- optTwo
- optThree
- }
- delivrable {
- specification {
- name
- src
- }
- fullBuild
- mvp {
- name
- src
- }
- design {
- name
- src
- }
- }
- totalPrice
- }
- }
-`;
diff --git a/src/graphql/prototype.api.ts b/src/graphql/prototype.api.ts
deleted file mode 100644
index 33dea31..0000000
--- a/src/graphql/prototype.api.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-import gql from 'graphql-tag';
-
-export const GET_PROTOTYPE_BY_ID = gql`
- query GetPrototypeById($id: String!) {
- getPrototypeById(id: $id) {
- id
- template
- prototype {
- feature {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- connections {
- to
- releations {
- back
- forword
- }
- }
- }
- }
- }
-`;
-
-export const ADD_PROTOTYPE = gql`
- mutation AddPrototype($prototype: TemplateProtoTypeInput!) {
- addPrototype(prototype: $prototype) {
- id
- template
- prototype {
- feature {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- connections {
- to
- releations {
- back
- forword
- }
- }
- }
- }
- }
-`;
-
-export const UPDATE_PROTOTYPE = gql`
- mutation UpdatePrototype($prototype: TemplateProtoTypeInput!) {
- updatePrototype(prototype: $prototype) {
- id
- template
- prototype {
- feature {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- connections {
- to
- releations {
- back
- forword
- }
- }
- }
- }
- }
-`;
diff --git a/src/graphql/state.ts b/src/graphql/state.ts
deleted file mode 100644
index 5c82426..0000000
--- a/src/graphql/state.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { makeVar } from '@apollo/client';
-import { UserOutput } from './types';
-
-export const tokenVar = makeVar(undefined);
-
-export const roleVar = makeVar<
- 'client' | 'productOwner' | 'developer' | 'admin' | undefined
->(undefined);
-
-export const userVar = makeVar(undefined);
diff --git a/src/graphql/template.api.ts b/src/graphql/template.api.ts
deleted file mode 100644
index d147905..0000000
--- a/src/graphql/template.api.ts
+++ /dev/null
@@ -1,460 +0,0 @@
-import gql from 'graphql-tag';
-
-export const GET_ALL_TEMPLATES = gql`
- query GetAllTemplates {
- getAllTemplates {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- }
-`;
-
-export const GET_TEMPLATE_BY_ID = gql`
- query GetTemplateById($id: String!) {
- getTemplateById(id: $id) {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- }
-`;
-
-export const GET_ALL_TEMPLATES_BY_CATEGORIES_ID = gql`
- query GetAllTemplatesByCategoriesId($categories: [String!]!) {
- getAllTemplatesByCategoriesId(categories: $categories) {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- }
-`;
-
-export const ADD_TEMPLATE = gql`
- mutation AddTemplate($template: TemplateInput!) {
- addTemplate(template: $template) {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- }
-`;
-
-export const UPDATE_TEMPLATE = gql`
- mutation UpdateTemplate(
- $id: String!
- $template: TemplateUpdateInput!
- $specification: SpecificationInput
- ) {
- updateTemplate(
- id: $id
- template: $template
- specification: $specification
- ) {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- }
-`;
-
-export const UPDATE_TEMPLATE_FEATURES = gql`
- mutation UpdateTemplateFeatures($id: String!, $featuresId: [String!]!) {
- updateTemplateFeatures(id: $id, featuresId: $featuresId) {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- }
-`;
-
-export const ADD_TEMPLATE_SPECIFICATION = gql`
- mutation AddTemplateSpecification(
- $id: String!
- $specification: SpecificationInput!
- ) {
- addTemplateSpecification(id: $id, specification: $specification) {
- id
- name
- description
- category
- features {
- id
- name
- description
- featureType
- image {
- name
- src
- }
- wireframes {
- id
- name
- src
- }
- price
- repo
- }
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- }
-`;
-
-export const DELETE_TEMPLATE = gql`
- mutation DeleteTemplate($id: String!) {
- deleteTemplate(id: $id) {
- id
- name
- description
- category
- features
- image {
- name
- src
- }
- specification {
- introduction {
- purpose
- documentConventions
- intendedAudience
- projectScope
- }
- overallDescription {
- perspective
- userCharacteristics
- operatingEnvironment
- designImplementationConstraints
- userDocumentation
- assemptionsDependencies
- }
- nonFunctionalRequirements {
- performanceRequirements
- safetyRequirements
- securityRequirements
- softwareQualityAttributes
- }
- otherRequirements
- glossary
- analysisModels
- issuesList
- }
- }
- }
-`;
diff --git a/src/graphql/types.support.ts b/src/graphql/types.support.ts
deleted file mode 100644
index 20571b7..0000000
--- a/src/graphql/types.support.ts
+++ /dev/null
@@ -1,180 +0,0 @@
-/* eslint-disable */
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = {
- [K in keyof T]: T[K];
-};
-export type MakeOptional = Omit & {
- [SubKey in K]?: Maybe;
-};
-export type MakeMaybe = Omit & {
- [SubKey in K]: Maybe;
-};
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: string;
- String: string;
- Boolean: boolean;
- Int: number;
- Float: number;
-};
-
-export type MutationRoot = {
- __typename?: 'MutationRoot';
- createThread: Support;
- deleteThread?: Maybe;
- sendMessage: Scalars['ID'];
-};
-
-export type MutationRootCreateThreadArgs = {
- projectId: Scalars['String'];
- threadDescription: Scalars['String'];
- title: Scalars['String'];
-};
-
-export type MutationRootDeleteThreadArgs = {
- threadId: Scalars['String'];
-};
-
-export type MutationRootSendMessageArgs = {
- text: Scalars['String'];
- threadId: Scalars['String'];
- username: Scalars['String'];
-};
-
-export enum MutationType {
- Created = 'CREATED',
-}
-
-export type QueryRoot = {
- __typename?: 'QueryRoot';
- messages?: Maybe>;
- thread?: Maybe;
- threads?: Maybe>;
-};
-
-export type QueryRootMessagesArgs = {
- threadId: Scalars['ID'];
-};
-
-export type QueryRootThreadArgs = {
- threadId: Scalars['ID'];
-};
-
-export type QueryRootThreadsArgs = {
- projectId: Scalars['ID'];
-};
-
-export type StreamChanged = {
- __typename?: 'StreamChanged';
- id: Scalars['ID'];
- mutationType: MutationType;
- userMessages?: Maybe;
-};
-
-export type SubscriptionRoot = {
- __typename?: 'SubscriptionRoot';
- interval: Scalars['Int'];
- messages: StreamChanged;
-};
-
-export type SubscriptionRootIntervalArgs = {
- n?: Scalars['Int'];
-};
-
-export type Support = {
- __typename?: 'Support';
- id: Scalars['ID'];
- projectId: Scalars['ID'];
- threadDescription: Scalars['String'];
- title: Scalars['String'];
- userMessages: Array;
-};
-
-export type UserMessages = {
- __typename?: 'UserMessages';
- id: Scalars['String'];
- username: Scalars['String'];
- text: Scalars['String'];
-};
-
-export type GetProjectThreadsQueryVariables = Exact<{
- projectId: Scalars['String'];
-}>;
-
-export type GetProjectThreadsQuery = { __typename?: 'QueryRoot' } & {
- threads: Array<
- { __typename?: 'Support' } & Pick<
- Support,
- 'id' | 'title' | 'projectId' | 'threadDescription' | 'userMessages'
- > & {
- userMessages: Array<
- { __typename?: 'UserMessage' } & Pick<
- UserMessages,
- 'id' | 'username' | 'text'
- >
- >;
- }
- >;
-};
-
-export type GetThreadByIdQueryVariables = Exact<{
- threadId: Scalars['String'];
-}>;
-
-export type GetThreadByIdQuery = { __typename?: 'QueryRoot' } & {
- thread: { __typename?: 'Support' } & Pick<
- Support,
- 'id' | 'title' | 'projectId' | 'threadDescription' | 'userMessages'
- > & {
- userMessages: Array<
- { __typename?: 'UserMessages' } & Pick
- >;
- };
-};
-
-export type MessagesQueryVariables = Exact<{
- threadId: Scalars['String'];
-}>;
-
-export type MessagesQuery = { __typename?: 'QueryRoot' } & {
- messages: Array<
- { __typename?: 'UserMessages' } & Pick
- >;
-};
-
-export type CreateThreadMutationVariables = Exact<{
- projectId: Scalars['String'];
- title: Scalars['String'];
- threadDescription: Scalars['String'];
-}>;
-
-export type CreateThreadMutation = { __typename?: 'MutationRoot' } & Pick<
- MutationRoot,
- 'createThread'
->;
-
-export type SendMsgMutationVariables = Exact<{
- threadId: Scalars['String'];
- username: Scalars['String'];
- text: Scalars['String'];
-}>;
-
-export type SendMsgMutation = { __typename?: 'MutationRoot' } & Pick<
- MutationRoot,
- 'sendMessage'
->;
-
-export type MessagesSubscription = { __typename?: 'SubscriptionRoot' } & {
- messages: { __typename?: 'StreamChanged' } & Pick<
- StreamChanged,
- 'mutationType'
- > & {
- userMessages?: Maybe<
- { __typename?: 'UserMessages' } & Pick<
- UserMessages,
- 'id' | 'username' | 'text'
- >
->;
- };
-};
diff --git a/src/graphql/types.ts b/src/graphql/types.ts
deleted file mode 100644
index c761dc2..0000000
--- a/src/graphql/types.ts
+++ /dev/null
@@ -1,2904 +0,0 @@
-export type Maybe = T | null;
-export type Exact = {
- [K in keyof T]: T[K];
-};
-export type MakeOptional = Omit & {
- [SubKey in K]?: Maybe;
-};
-export type MakeMaybe = Omit & {
- [SubKey in K]: Maybe;
-};
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: string;
- String: string;
- Boolean: boolean;
- Int: number;
- Float: number;
-};
-
-export type AddressInput = {
- place: Scalars['String'];
- city: Scalars['String'];
- zip: Scalars['String'];
- country: Scalars['String'];
-};
-
-export type AddressOutput = {
- __typename?: 'AddressOutput';
- place: Scalars['String'];
- city: Scalars['String'];
- zip: Scalars['String'];
- country: Scalars['String'];
-};
-
-export type CategoryInput = {
- name: Scalars['String'];
- description: Scalars['String'];
- image: InputFile;
-};
-
-export type CategoryOutput = {
- __typename?: 'CategoryOutput';
- id: Scalars['String'];
- name: Scalars['String'];
- description: Scalars['String'];
- image: File;
-};
-
-export type ConnectionsInput = {
- to: Scalars['String'];
- releations: RelationsInput;
-};
-
-export type ConnectionsOutput = {
- __typename?: 'ConnectionsOutput';
- to: Scalars['String'];
- releations: RelationsOutput;
-};
-
-export type CountryPrefixModel = {
- __typename?: 'CountryPrefixModel';
- country: Scalars['String'];
- prefix: Scalars['String'];
-};
-
-export type DelivrableInput = {
- specification: Scalars['Boolean'];
- fullBuild: Scalars['Boolean'];
- mvp: Scalars['Boolean'];
- design: Scalars['Boolean'];
-};
-
-export type DelivrableOutput = {
- __typename?: 'DelivrableOutput';
- specification: File;
- fullBuild: Scalars['String'];
- mvp: File;
- design: File;
-};
-
-export type DevtimeInput = {
- months: Scalars['Int'];
- days: Scalars['Int'];
- hours: Scalars['Int'];
-};
-
-export type DevtimeOutput = {
- __typename?: 'DevtimeOutput';
- months: Scalars['Int'];
- days: Scalars['Int'];
- hours: Scalars['Int'];
-};
-
-export type FeatureInput = {
- name: Scalars['String'];
- description: Scalars['String'];
- featureType: Scalars['String'];
- image: InputFile;
- wireframes?: Maybe>;
- price: Scalars['Float'];
- repo: Scalars['String'];
-};
-
-export type FeatureOutput = {
- __typename?: 'FeatureOutput';
- id: Scalars['String'];
- name: Scalars['String'];
- description: Scalars['String'];
- featureType: Scalars['String'];
- image: File;
- wireframes?: Maybe>;
- price: Scalars['Float'];
- repo: Scalars['String'];
-};
-
-export type File = {
- __typename?: 'File';
- name: Scalars['String'];
- src: Scalars['String'];
-};
-
-export type FileWithOutOId = {
- __typename?: 'FileWithOutOId';
- id: Scalars['String'];
- name: Scalars['String'];
- src: Scalars['String'];
-};
-
-export type InputFile = {
- name: Scalars['String'];
- src: Scalars['String'];
-};
-
-export type IntroductionInput = {
- purpose: Scalars['String'];
- documentConventions: Scalars['String'];
- intendedAudience: Scalars['String'];
- projectScope: Scalars['String'];
-};
-
-export type IntroductionOutput = {
- __typename?: 'IntroductionOutput';
- purpose: Scalars['String'];
- documentConventions: Scalars['String'];
- intendedAudience: Scalars['String'];
- projectScope: Scalars['String'];
-};
-
-export type MutationRoot = {
- __typename?: 'MutationRoot';
- signup: UserAuthenticationOutput;
- createUser: UserOutput;
- login: UserAuthenticationOutput;
- deleteUser: UserOutput;
- updateUserInfo: UserOutput;
- updateUserPassword: UserOutput;
- resetUserPassword: UserOutput;
- confirmUserResetPassword: UserOutput;
- deleteCategory: CategoryOutput;
- deleteFeature: FeatureOutput;
- deleteTemplate: TemplateDefactoredOutput;
- updateTemplateFeatures: TemplateOutput;
- addTemplateSpecification: TemplateOutput;
- addCategory: CategoryOutput;
- updateCategory: CategoryOutput;
- addFeature: FeatureOutput;
- updateFeature: FeatureOutput;
- deleteFeatureWireframe: FeatureOutput;
- addFeatureWireframes: FeatureOutput;
- addTemplate: TemplateOutput;
- updateTemplate: TemplateOutput;
- addPrototype: TemplateProtoTypeOutput;
- updatePrototype: TemplateProtoTypeOutput;
- addProject: ProjectOutput;
- changeProjectState: ProjectOutput;
- updateProject: ProjectOutput;
- addProjectProposal: ProjectOutput;
- addProjectMvp: ProjectOutput;
- addProjectFullBuild: ProjectOutput;
- addProjectDesign: ProjectOutput;
-};
-
-export type MutationRootSignupArgs = {
- email: Scalars['String'];
- password: Scalars['String'];
-};
-
-export type MutationRootCreateUserArgs = {
- user: UserInput;
-};
-
-export type MutationRootLoginArgs = {
- email: Scalars['String'];
- password: Scalars['String'];
-};
-
-export type MutationRootDeleteUserArgs = {
- id: Scalars['String'];
- password: Scalars['String'];
-};
-
-export type MutationRootUpdateUserInfoArgs = {
- user: UpdateUserInput;
-};
-
-export type MutationRootUpdateUserPasswordArgs = {
- id: Scalars['String'];
- password: PasswordInput;
-};
-
-export type MutationRootResetUserPasswordArgs = {
- email: Scalars['String'];
-};
-
-export type MutationRootConfirmUserResetPasswordArgs = {
- id: Scalars['String'];
- password: Scalars['String'];
-};
-
-export type MutationRootDeleteCategoryArgs = {
- id: Scalars['String'];
-};
-
-export type MutationRootDeleteFeatureArgs = {
- id: Scalars['String'];
-};
-
-export type MutationRootDeleteTemplateArgs = {
- id: Scalars['String'];
-};
-
-export type MutationRootUpdateTemplateFeaturesArgs = {
- id: Scalars['String'];
- featuresId: Array;
-};
-
-export type MutationRootAddTemplateSpecificationArgs = {
- id: Scalars['String'];
- specification: SpecificationInput;
-};
-
-export type MutationRootAddCategoryArgs = {
- category: CategoryInput;
-};
-
-export type MutationRootUpdateCategoryArgs = {
- id: Scalars['String'];
- category: CategoryInput;
-};
-
-export type MutationRootAddFeatureArgs = {
- feature: FeatureInput;
-};
-
-export type MutationRootUpdateFeatureArgs = {
- id: Scalars['String'];
- feature: FeatureInput;
-};
-
-export type MutationRootDeleteFeatureWireframeArgs = {
- id: Scalars['String'];
-};
-
-export type MutationRootAddFeatureWireframesArgs = {
- id: Scalars['String'];
- wireframes: Array;
-};
-
-export type MutationRootAddTemplateArgs = {
- template: TemplateInput;
-};
-
-export type MutationRootUpdateTemplateArgs = {
- id: Scalars['String'];
- template: TemplateUpdateInput;
- specification?: Maybe;
-};
-
-export type MutationRootAddPrototypeArgs = {
- prototype: TemplateProtoTypeInput;
-};
-
-export type MutationRootUpdatePrototypeArgs = {
- prototype: TemplateProtoTypeInput;
-};
-
-export type MutationRootAddProjectArgs = {
- project: ProjectInput;
-};
-
-export type MutationRootChangeProjectStateArgs = {
- id: Scalars['String'];
- state: State;
-};
-
-export type MutationRootUpdateProjectArgs = {
- id: Scalars['String'];
- name: Scalars['String'];
- image: InputFile;
-};
-
-export type MutationRootAddProjectProposalArgs = {
- id: Scalars['String'];
- proposal: ProposalInput;
-};
-
-export type MutationRootAddProjectMvpArgs = {
- mvp: ProjectFileInput;
-};
-
-export type MutationRootAddProjectFullBuildArgs = {
- fullBuild: ProjectFullBuildInput;
-};
-
-export type MutationRootAddProjectDesignArgs = {
- design: ProjectFileInput;
-};
-
-export type NonFunctionalRequirementsInput = {
- performanceRequirements: Scalars['String'];
- safetyRequirements: Scalars['String'];
- securityRequirements: Scalars['String'];
- softwareQualityAttributes: Scalars['String'];
-};
-
-export type NonFunctionalRequirementsOutput = {
- __typename?: 'NonFunctionalRequirementsOutput';
- performanceRequirements: Scalars['String'];
- safetyRequirements: Scalars['String'];
- securityRequirements: Scalars['String'];
- softwareQualityAttributes: Scalars['String'];
-};
-
-export type OverallDescriptionInput = {
- perspective: Scalars['String'];
- userCharacteristics: Scalars['String'];
- operatingEnvironment: Scalars['String'];
- designImplementationConstraints: Scalars['String'];
- userDocumentation: Scalars['String'];
- assemptionsDependencies: Scalars['String'];
-};
-
-export type OverallDescriptionOutput = {
- __typename?: 'OverallDescriptionOutput';
- perspective: Scalars['String'];
- userCharacteristics: Scalars['String'];
- operatingEnvironment: Scalars['String'];
- designImplementationConstraints: Scalars['String'];
- userDocumentation: Scalars['String'];
- assemptionsDependencies: Scalars['String'];
-};
-
-export type PasswordInput = {
- oldPassword: Scalars['String'];
- newPassword: Scalars['String'];
-};
-
-export type PaymentOptionInput = {
- optOne: Scalars['Int'];
- optTwo: Scalars['Int'];
- optThree: Scalars['Int'];
-};
-
-export type PaymentOptionOutput = {
- __typename?: 'PaymentOptionOutput';
- optOne: Scalars['Int'];
- optTwo: Scalars['Int'];
- optThree: Scalars['Int'];
-};
-
-export type PhoneInput = {
- prefix: Scalars['String'];
- number: Scalars['String'];
-};
-
-export type PhoneOutput = {
- __typename?: 'PhoneOutput';
- prefix: Scalars['String'];
- number: Scalars['String'];
-};
-
-export type ProjectFileInput = {
- id: Scalars['String'];
- name: Scalars['String'];
- src: Scalars['String'];
-};
-
-export type ProjectFullBuildInput = {
- id: Scalars['String'];
- url: Scalars['String'];
-};
-
-export type ProjectInput = {
- clientId: Scalars['String'];
- name: Scalars['String'];
- image: InputFile;
- platforms: Array;
- template: Scalars['String'];
- features: Array;
- paymentOption: PaymentOptionInput;
- delivrable?: Maybe;
- totalPrice: Scalars['Float'];
-};
-
-export type ProjectOutput = {
- __typename?: 'ProjectOutput';
- id: Scalars['String'];
- clientId: Scalars['String'];
- name: Scalars['String'];
- image: File;
- platforms: Array;
- template: TemplateOutput;
- features: Array;
- state: Scalars['String'];
- proposal?: Maybe;
- paymentOption: PaymentOptionOutput;
- delivrable?: Maybe;
- totalPrice: Scalars['Float'];
-};
-
-export type ProposalInput = {
- devtime: DevtimeInput;
- summary: Scalars['String'];
- purpose: Scalars['String'];
- resources: Array;
-};
-
-export type ProposalOutput = {
- __typename?: 'ProposalOutput';
- devtime: DevtimeOutput;
- summary: Scalars['String'];
- purpose: Scalars['String'];
- resources: Array;
-};
-
-export type ProtoTypeInput = {
- featureId: Scalars['String'];
- connections: Array;
-};
-
-export type ProtoTypeOutput = {
- __typename?: 'ProtoTypeOutput';
- feature: FeatureOutput;
- connections: Array;
-};
-
-export type QueryRoot = {
- __typename?: 'QueryRoot';
- getAllUsers: Array;
- getUserById: UserOutput;
- getCategoryById: CategoryOutput;
- getFeatureById: FeatureOutput;
- getPrototypeById: TemplateProtoTypeOutput;
- getTemplateById: TemplateOutput;
- getProjectById: ProjectOutput;
- getAllProjectsByClientId: Array;
- getAllProjects: Array;
- getAllCategories: Array;
- getAllFeatures: Array;
- getAllTemplates: Array;
- getAllTemplatesByCategoriesId: Array;
- getCountryCode: Array;
-};
-
-export type QueryRootGetUserByIdArgs = {
- id: Scalars['String'];
-};
-
-export type QueryRootGetCategoryByIdArgs = {
- id: Scalars['String'];
-};
-
-export type QueryRootGetFeatureByIdArgs = {
- id: Scalars['String'];
-};
-
-export type QueryRootGetPrototypeByIdArgs = {
- id: Scalars['String'];
-};
-
-export type QueryRootGetTemplateByIdArgs = {
- id: Scalars['String'];
-};
-
-export type QueryRootGetProjectByIdArgs = {
- id: Scalars['String'];
-};
-
-export type QueryRootGetAllProjectsByClientIdArgs = {
- id: Scalars['String'];
-};
-
-export type QueryRootGetAllTemplatesByCategoriesIdArgs = {
- categories: Array;
-};
-
-export type RelationsInput = {
- back: Scalars['Boolean'];
- forword: Scalars['Boolean'];
-};
-
-export type RelationsOutput = {
- __typename?: 'RelationsOutput';
- back: Scalars['Boolean'];
- forword: Scalars['Boolean'];
-};
-
-export type ResourceInput = {
- resourceType: Scalars['String'];
- developers: Scalars['Int'];
-};
-
-export type ResourceOutput = {
- __typename?: 'ResourceOutput';
- resourceType: Scalars['String'];
- developers: Scalars['Int'];
-};
-
-export type SpecificationInput = {
- introduction: IntroductionInput;
- overallDescription: OverallDescriptionInput;
- nonFunctionalRequirements: NonFunctionalRequirementsInput;
- otherRequirements: Scalars['String'];
- glossary: Scalars['String'];
- analysisModels: Scalars['String'];
- issuesList: Scalars['String'];
-};
-
-export type SpecificationOutput = {
- __typename?: 'SpecificationOutput';
- introduction: IntroductionOutput;
- overallDescription: OverallDescriptionOutput;
- nonFunctionalRequirements: NonFunctionalRequirementsOutput;
- otherRequirements: Scalars['String'];
- glossary: Scalars['String'];
- analysisModels: Scalars['String'];
- issuesList: Scalars['String'];
-};
-
-export type State = 'Approved' | 'Declined' | 'OnReview' | 'Archived';
-
-export type TemplateDefactoredOutput = {
- __typename?: 'TemplateDefactoredOutput';
- id: Scalars['String'];
- name: Scalars['String'];
- description: Scalars['String'];
- category: Scalars['String'];
- features?: Maybe>;
- image: File;
- specification?: Maybe;
-};
-
-export type TemplateInput = {
- name: Scalars['String'];
- description: Scalars['String'];
- category: Scalars['String'];
- features?: Maybe>;
- image: InputFile;
- specification?: Maybe;
-};
-
-export type TemplateOutput = {
- __typename?: 'TemplateOutput';
- id: Scalars['String'];
- name: Scalars['String'];
- description: Scalars['String'];
- category: Scalars['String'];
- features?: Maybe>;
- image: File;
- specification?: Maybe;
-};
-
-export type TemplateProtoTypeInput = {
- templateId: Scalars['String'];
- prototype: Array;
-};
-
-export type TemplateProtoTypeOutput = {
- __typename?: 'TemplateProtoTypeOutput';
- id: Scalars['String'];
- template: Scalars['String'];
- prototype: Array;
-};
-
-export type TemplateUpdateInput = {
- name: Scalars['String'];
- description: Scalars['String'];
- category: Scalars['String'];
- features?: Maybe>;
- image: InputFile;
-};
-
-export type UpdateUserInput = {
- id: Scalars['String'];
- email: Scalars['String'];
- firstName: Scalars['String'];
- lastName: Scalars['String'];
- phone: PhoneInput;
- address: AddressInput;
- role: Scalars['String'];
-};
-
-export type UserAuthenticationOutput = {
- __typename?: 'UserAuthenticationOutput';
- user: UserOutput;
- token: Scalars['String'];
-};
-
-export type UserInput = {
- email: Scalars['String'];
- password: Scalars['String'];
- firstName: Scalars['String'];
- lastName: Scalars['String'];
- phone: PhoneInput;
- address: AddressInput;
- role: Scalars['String'];
-};
-
-export type UserOutput = {
- __typename?: 'UserOutput';
- id: Scalars['String'];
- email: Scalars['String'];
- firstName: Scalars['String'];
- lastName: Scalars['String'];
- phone: PhoneOutput;
- address: AddressOutput;
- role: Scalars['String'];
-};
-
-export type GetAllUsersQueryVariables = Exact<{ [key: string]: never }>;
-
-export type GetAllUsersQuery = { __typename?: 'QueryRoot' } & {
- getAllUsers: Array<
- { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- }
- >;
-};
-
-export type GetUserByIdQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetUserByIdQuery = { __typename?: 'QueryRoot' } & {
- getUserById: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
-};
-
-export type CreateUserMutationVariables = Exact<{
- user: UserInput;
-}>;
-
-export type CreateUserMutation = { __typename?: 'MutationRoot' } & {
- createUser: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
-};
-
-export type SignupMutationVariables = Exact<{
- email: Scalars['String'];
- password: Scalars['String'];
-}>;
-
-export type SignupMutation = { __typename?: 'MutationRoot' } & {
- signup: { __typename?: 'UserAuthenticationOutput' } & Pick<
- UserAuthenticationOutput,
- 'token'
- > & {
- user: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
- };
-};
-
-export type LoginMutationVariables = Exact<{
- email: Scalars['String'];
- password: Scalars['String'];
-}>;
-
-export type LoginMutation = { __typename?: 'MutationRoot' } & {
- login: { __typename?: 'UserAuthenticationOutput' } & Pick<
- UserAuthenticationOutput,
- 'token'
- > & {
- user: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
- };
-};
-
-export type ResetPasswordMutationVariables = Exact<{
- email: Scalars['String'];
-}>;
-
-export type ResetPasswordMutation = { __typename?: 'MutationRoot' } & {
- resetUserPassword: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
-};
-
-export type ConfirmUserResetPasswordMutationVariables = Exact<{
- id: Scalars['String'];
- password: Scalars['String'];
-}>;
-
-export type ConfirmUserResetPasswordMutation = {
- __typename?: 'MutationRoot';
-} & {
- confirmUserResetPassword: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
-};
-
-export type UpdateUserInfoMutationVariables = Exact<{
- user: UpdateUserInput;
-}>;
-
-export type UpdateUserInfoMutation = { __typename?: 'MutationRoot' } & {
- updateUserInfo: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
-};
-
-export type UpdateUserPasswordMutationVariables = Exact<{
- id: Scalars['String'];
- password: PasswordInput;
-}>;
-
-export type UpdateUserPasswordMutation = { __typename?: 'MutationRoot' } & {
- updateUserPassword: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
-};
-
-export type DeleteUserMutationVariables = Exact<{
- id: Scalars['String'];
- password: Scalars['String'];
-}>;
-
-export type DeleteUserMutation = { __typename?: 'MutationRoot' } & {
- deleteUser: { __typename?: 'UserOutput' } & Pick<
- UserOutput,
- 'id' | 'email' | 'firstName' | 'lastName' | 'role'
- > & {
- phone: { __typename?: 'PhoneOutput' } & Pick<
- PhoneOutput,
- 'prefix' | 'number'
- >;
- address: { __typename?: 'AddressOutput' } & Pick<
- AddressOutput,
- 'place' | 'city' | 'country' | 'zip'
- >;
- };
-};
-
-export type GetCountryCodesQueryVariables = Exact<{ [key: string]: never }>;
-
-export type GetCountryCodesQuery = { __typename?: 'QueryRoot' } & {
- getCountryCode: Array<
- { __typename?: 'CountryPrefixModel' } & Pick<
- CountryPrefixModel,
- 'prefix' | 'country'
- >
- >;
-};
-
-export type GetAllCategoriesQueryVariables = Exact<{ [key: string]: never }>;
-
-export type GetAllCategoriesQuery = { __typename?: 'QueryRoot' } & {
- getAllCategories: Array<
- { __typename?: 'CategoryOutput' } & Pick<
- CategoryOutput,
- 'id' | 'name' | 'description'
- > & { image: { __typename?: 'File' } & Pick }
- >;
-};
-
-export type GetCategoryByIdQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetCategoryByIdQuery = { __typename?: 'QueryRoot' } & {
- getCategoryById: { __typename?: 'CategoryOutput' } & Pick<
- CategoryOutput,
- 'id' | 'name' | 'description'
- > & { image: { __typename?: 'File' } & Pick };
-};
-
-export type AddCategoryMutationVariables = Exact<{
- category: CategoryInput;
-}>;
-
-export type AddCategoryMutation = { __typename?: 'MutationRoot' } & {
- addCategory: { __typename?: 'CategoryOutput' } & Pick<
- CategoryOutput,
- 'id' | 'name' | 'description'
- > & { image: { __typename?: 'File' } & Pick };
-};
-
-export type UpdateCategoryMutationVariables = Exact<{
- id: Scalars['String'];
- category: CategoryInput;
-}>;
-
-export type UpdateCategoryMutation = { __typename?: 'MutationRoot' } & {
- updateCategory: { __typename?: 'CategoryOutput' } & Pick<
- CategoryOutput,
- 'id' | 'name' | 'description'
- > & { image: { __typename?: 'File' } & Pick };
-};
-
-export type DeleteCategoryMutationVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type DeleteCategoryMutation = { __typename?: 'MutationRoot' } & {
- deleteCategory: { __typename?: 'CategoryOutput' } & Pick<
- CategoryOutput,
- 'id' | 'name' | 'description'
- > & { image: { __typename?: 'File' } & Pick };
-};
-
-export type GetAllFeaturesQueryVariables = Exact<{ [key: string]: never }>;
-
-export type GetAllFeaturesQuery = { __typename?: 'QueryRoot' } & {
- getAllFeatures: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
-};
-
-export type GetFeatureByIdQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetFeatureByIdQuery = { __typename?: 'QueryRoot' } & {
- getFeatureById: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
-};
-
-export type AddFeatureMutationVariables = Exact<{
- feature: FeatureInput;
-}>;
-
-export type AddFeatureMutation = { __typename?: 'MutationRoot' } & {
- addFeature: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
-};
-
-export type UpdateFeatureMutationVariables = Exact<{
- id: Scalars['String'];
- feature: FeatureInput;
-}>;
-
-export type UpdateFeatureMutation = { __typename?: 'MutationRoot' } & {
- updateFeature: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
-};
-
-export type DeleteFeatureMutationVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type DeleteFeatureMutation = { __typename?: 'MutationRoot' } & {
- deleteFeature: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
-};
-
-export type AddFeatureWireframesMutationVariables = Exact<{
- id: Scalars['String'];
- wireframes: Array | InputFile;
-}>;
-
-export type AddFeatureWireframesMutation = { __typename?: 'MutationRoot' } & {
- addFeatureWireframes: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
-};
-
-export type DeleteFeatureWireframeMutationVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type DeleteFeatureWireframeMutation = { __typename?: 'MutationRoot' } & {
- deleteFeatureWireframe: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
-};
-
-export type GetAllProjectsQueryVariables = Exact<{ [key: string]: never }>;
-
-export type GetAllProjectsQuery = { __typename?: 'QueryRoot' } & {
- getAllProjects: Array<
- { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- | 'id'
- | 'name'
- | 'description'
- | 'featureType'
- | 'price'
- | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- | 'otherRequirements'
- | 'glossary'
- | 'analysisModels'
- | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick<
- File,
- 'name' | 'src'
- >;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- }
- >;
-};
-
-export type GetAllProjectsByClientIdQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetAllProjectsByClientIdQuery = { __typename?: 'QueryRoot' } & {
- getAllProjectsByClientId: Array<
- { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- | 'id'
- | 'name'
- | 'description'
- | 'featureType'
- | 'price'
- | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- | 'otherRequirements'
- | 'glossary'
- | 'analysisModels'
- | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick<
- File,
- 'name' | 'src'
- >;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- }
- >;
-};
-
-export type GetProjectByIdQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetProjectByIdQuery = { __typename?: 'QueryRoot' } & {
- getProjectById: { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- };
-};
-
-export type AddProjectMutationVariables = Exact<{
- project: ProjectInput;
-}>;
-
-export type AddProjectMutation = { __typename?: 'MutationRoot' } & {
- addProject: { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- };
-};
-
-export type ChangeProjectStateMutationVariables = Exact<{
- id: Scalars['String'];
- state: State;
-}>;
-
-export type ChangeProjectStateMutation = { __typename?: 'MutationRoot' } & {
- changeProjectState: { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- };
-};
-
-export type UpdateProjectMutationVariables = Exact<{
- id: Scalars['String'];
- name: Scalars['String'];
- image: InputFile;
-}>;
-
-export type UpdateProjectMutation = { __typename?: 'MutationRoot' } & {
- updateProject: { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- };
-};
-
-export type AddProjectProposalMutationVariables = Exact<{
- id: Scalars['String'];
- proposal: ProposalInput;
-}>;
-
-export type AddProjectProposalMutation = { __typename?: 'MutationRoot' } & {
- addProjectProposal: { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- };
-};
-
-export type AddProjectDesignMutationVariables = Exact<{
- design: ProjectFileInput;
-}>;
-
-export type AddProjectDesignMutation = { __typename?: 'MutationRoot' } & {
- addProjectDesign: { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- };
-};
-
-export type AddProjectMvpMutationVariables = Exact<{
- mvp: ProjectFileInput;
-}>;
-
-export type AddProjectMvpMutation = { __typename?: 'MutationRoot' } & {
- addProjectMvp: { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- };
-};
-
-export type AddProjectFullBuildMutationVariables = Exact<{
- fullBuild: ProjectFullBuildInput;
-}>;
-
-export type AddProjectFullBuildMutation = { __typename?: 'MutationRoot' } & {
- addProjectFullBuild: { __typename?: 'ProjectOutput' } & Pick<
- ProjectOutput,
- 'id' | 'clientId' | 'name' | 'platforms' | 'state' | 'totalPrice'
- > & {
- image: { __typename?: 'File' } & Pick;
- template: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
- features: Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >;
- proposal?: Maybe<
- { __typename?: 'ProposalOutput' } & Pick<
- ProposalOutput,
- 'summary' | 'purpose'
- > & {
- devtime: { __typename?: 'DevtimeOutput' } & Pick<
- DevtimeOutput,
- 'months' | 'days' | 'hours'
- >;
- resources: Array<
- { __typename?: 'ResourceOutput' } & Pick<
- ResourceOutput,
- 'resourceType' | 'developers'
- >
- >;
- }
- >;
- paymentOption: { __typename?: 'PaymentOptionOutput' } & Pick<
- PaymentOptionOutput,
- 'optOne' | 'optTwo' | 'optThree'
- >;
- delivrable?: Maybe<
- { __typename?: 'DelivrableOutput' } & Pick<
- DelivrableOutput,
- 'fullBuild'
- > & {
- specification: { __typename?: 'File' } & Pick;
- mvp: { __typename?: 'File' } & Pick;
- design: { __typename?: 'File' } & Pick;
- }
- >;
- };
-};
-
-export type GetPrototypeByIdQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetPrototypeByIdQuery = { __typename?: 'QueryRoot' } & {
- getPrototypeById: { __typename?: 'TemplateProtoTypeOutput' } & Pick<
- TemplateProtoTypeOutput,
- 'id' | 'template'
- > & {
- prototype: Array<
- { __typename?: 'ProtoTypeOutput' } & {
- feature: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
- connections: Array<
- { __typename?: 'ConnectionsOutput' } & Pick<
- ConnectionsOutput,
- 'to'
- > & {
- releations: { __typename?: 'RelationsOutput' } & Pick<
- RelationsOutput,
- 'back' | 'forword'
- >;
- }
- >;
- }
- >;
- };
-};
-
-export type AddPrototypeMutationVariables = Exact<{
- prototype: TemplateProtoTypeInput;
-}>;
-
-export type AddPrototypeMutation = { __typename?: 'MutationRoot' } & {
- addPrototype: { __typename?: 'TemplateProtoTypeOutput' } & Pick<
- TemplateProtoTypeOutput,
- 'id' | 'template'
- > & {
- prototype: Array<
- { __typename?: 'ProtoTypeOutput' } & {
- feature: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
- connections: Array<
- { __typename?: 'ConnectionsOutput' } & Pick<
- ConnectionsOutput,
- 'to'
- > & {
- releations: { __typename?: 'RelationsOutput' } & Pick<
- RelationsOutput,
- 'back' | 'forword'
- >;
- }
- >;
- }
- >;
- };
-};
-
-export type UpdatePrototypeMutationVariables = Exact<{
- prototype: TemplateProtoTypeInput;
-}>;
-
-export type UpdatePrototypeMutation = { __typename?: 'MutationRoot' } & {
- updatePrototype: { __typename?: 'TemplateProtoTypeOutput' } & Pick<
- TemplateProtoTypeOutput,
- 'id' | 'template'
- > & {
- prototype: Array<
- { __typename?: 'ProtoTypeOutput' } & {
- feature: { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- };
- connections: Array<
- { __typename?: 'ConnectionsOutput' } & Pick<
- ConnectionsOutput,
- 'to'
- > & {
- releations: { __typename?: 'RelationsOutput' } & Pick<
- RelationsOutput,
- 'back' | 'forword'
- >;
- }
- >;
- }
- >;
- };
-};
-
-export type GetAllTemplatesQueryVariables = Exact<{ [key: string]: never }>;
-
-export type GetAllTemplatesQuery = { __typename?: 'QueryRoot' } & {
- getAllTemplates: Array<
- { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- }
- >;
-};
-
-export type GetTemplateByIdQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetTemplateByIdQuery = { __typename?: 'QueryRoot' } & {
- getTemplateById: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
-};
-
-export type GetAllTemplatesByCategoriesIdQueryVariables = Exact<{
- categories: Array | Scalars['String'];
-}>;
-
-export type GetAllTemplatesByCategoriesIdQuery = {
- __typename?: 'QueryRoot';
-} & {
- getAllTemplatesByCategoriesId: Array<
- { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- }
- >;
-};
-
-export type AddTemplateMutationVariables = Exact<{
- template: TemplateInput;
-}>;
-
-export type AddTemplateMutation = { __typename?: 'MutationRoot' } & {
- addTemplate: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
-};
-
-export type UpdateTemplateMutationVariables = Exact<{
- id: Scalars['String'];
- template: TemplateUpdateInput;
- specification?: Maybe;
-}>;
-
-export type UpdateTemplateMutation = { __typename?: 'MutationRoot' } & {
- updateTemplate: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
-};
-
-export type UpdateTemplateFeaturesMutationVariables = Exact<{
- id: Scalars['String'];
- featuresId: Array | Scalars['String'];
-}>;
-
-export type UpdateTemplateFeaturesMutation = { __typename?: 'MutationRoot' } & {
- updateTemplateFeatures: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
-};
-
-export type AddTemplateSpecificationMutationVariables = Exact<{
- id: Scalars['String'];
- specification: SpecificationInput;
-}>;
-
-export type AddTemplateSpecificationMutation = {
- __typename?: 'MutationRoot';
-} & {
- addTemplateSpecification: { __typename?: 'TemplateOutput' } & Pick<
- TemplateOutput,
- 'id' | 'name' | 'description' | 'category'
- > & {
- features?: Maybe<
- Array<
- { __typename?: 'FeatureOutput' } & Pick<
- FeatureOutput,
- 'id' | 'name' | 'description' | 'featureType' | 'price' | 'repo'
- > & {
- image: { __typename?: 'File' } & Pick;
- wireframes?: Maybe<
- Array<
- { __typename?: 'FileWithOutOId' } & Pick<
- FileWithOutOId,
- 'id' | 'name' | 'src'
- >
- >
- >;
- }
- >
- >;
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
-};
-
-export type DeleteTemplateMutationVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type DeleteTemplateMutation = { __typename?: 'MutationRoot' } & {
- deleteTemplate: { __typename?: 'TemplateDefactoredOutput' } & Pick<
- TemplateDefactoredOutput,
- 'id' | 'name' | 'description' | 'category' | 'features'
- > & {
- image: { __typename?: 'File' } & Pick;
- specification?: Maybe<
- { __typename?: 'SpecificationOutput' } & Pick<
- SpecificationOutput,
- 'otherRequirements' | 'glossary' | 'analysisModels' | 'issuesList'
- > & {
- introduction: { __typename?: 'IntroductionOutput' } & Pick<
- IntroductionOutput,
- | 'purpose'
- | 'documentConventions'
- | 'intendedAudience'
- | 'projectScope'
- >;
- overallDescription: {
- __typename?: 'OverallDescriptionOutput';
- } & Pick<
- OverallDescriptionOutput,
- | 'perspective'
- | 'userCharacteristics'
- | 'operatingEnvironment'
- | 'designImplementationConstraints'
- | 'userDocumentation'
- | 'assemptionsDependencies'
- >;
- nonFunctionalRequirements: {
- __typename?: 'NonFunctionalRequirementsOutput';
- } & Pick<
- NonFunctionalRequirementsOutput,
- | 'performanceRequirements'
- | 'safetyRequirements'
- | 'securityRequirements'
- | 'softwareQualityAttributes'
- >;
- }
- >;
- };
-};
diff --git a/src/index.tsx b/src/index.tsx
index cd93795..fda0db3 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,108 +1,61 @@
-import React from 'react';
-import * as ReactDOMClient from 'react-dom/client';
-import { GraphQLWsLink } from '@apollo/client/link/subscriptions';
-import { createClient } from 'graphql-ws';
-import {
- ApolloClient,
- InMemoryCache,
- ApolloProvider,
- split,
- HttpLink,
-} from '@apollo/client';
-import { getMainDefinition } from '@apollo/client/utilities';
-import { setContext } from '@apollo/client/link/context';
-import { ThemeProvider } from 'styled-components';
-import { BrowserRouter } from 'react-router-dom';
-import { theme } from './themes';
-import App from './App';
-import GlobalStyles from './GlobalStyles';
-import reportWebVitals from './reportWebVitals';
+import Button from './components/Button';
+import IconButton from './components/IconButton';
+import Box from './components/Box';
+import Text from './components/Text';
+import Link from './components/Link';
+import Input from './components/Input';
+import TextArea from './components/TextArea';
+import Select from './components/Select';
+import Search from './components/Search';
+import Avatar from './components/Avatar';
+import ContextMenu from './components/ContextMenu';
+import Spinner from './components/Spinner';
+import Alert from './components/Alert';
+import CheckBox from './components/CheckBox';
+import Menu from './components/Menu';
+import Navbar from './components/Navbar';
+import Sidebar from './components/Sidebar';
+import SectionSelector from './components/SectionSelector';
+import Modal from './components/Modal';
+import SidebarItem from './components/SidebarItem';
+import ImagePreview from './components/ImagePreview';
+import FeatureCard from './components/FeatureCard';
+import FrontendFeatureCard from './components/FrontendFeatureCard';
+import BackendFeatureCard from './components/BackendFeatureCard';
+import Chip from './components/Chip';
+import CategoryCard from './components/CategoryCard';
+import TemplateCard from './components/TemplateCard';
+import SupportSidebar from './components/SupportSidebar';
+import GlobalStyles from './components/GlobalStyles';
-const httpLinkMain = new HttpLink({
- uri: import.meta.env.VITE_GRAPHQL_API,
-});
-
-const httpLinkSupport = new HttpLink({
- uri: import.meta.env.VITE_GRAPHQL_SUPPORT_API,
-});
-
-const wsLink = new GraphQLWsLink(
- createClient({
- url: `${import.meta.env.VITE_GRAPHQL_SUPPORT_SUBSCRIPTIONS_API}`,
- })
-);
-
-const splitLink = split(
- ({ query }) => {
- const definition = getMainDefinition(query);
- return (
- definition.kind === 'OperationDefinition' &&
- definition.operation === 'subscription'
- );
- },
- wsLink,
- httpLinkSupport
-);
-
-const authLink = setContext((_, { headers }) => {
- const token = localStorage.getItem('token');
-
- return {
- headers: {
- ...headers,
- authorization: token || '',
- },
- };
-});
-
-export const clientMain = new ApolloClient({
- link: authLink.concat(httpLinkMain),
- cache: new InMemoryCache(),
- defaultOptions: {
- watchQuery: {
- fetchPolicy: 'network-only',
- nextFetchPolicy: 'cache-and-network',
- },
- }
-});
-
-export const clientSupport = new ApolloClient({
- link: authLink.concat(splitLink),
- cache: new InMemoryCache(),
- defaultOptions: {
- watchQuery: {
- fetchPolicy: 'network-only',
- nextFetchPolicy: 'cache-and-network',
- },
- }
-});
-
-let root: ReactDOMClient.Root | null = null;
-
-document.addEventListener('DOMContentLoaded', () => {
- if (!root) {
- root = ReactDOMClient.createRoot(
- document.querySelector('#app') as HTMLElement
- );
-
- root.render(
-
-
- {/* @ts-ignore */}
-
-
-
- {/* @ts-ignore */}
-
-
-
-
-
- );
- }
-});
-
-// If you want to start measuring performance in your app, pass a function
-// to log results (for example: reportWebVitals(console.log))
-// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
-reportWebVitals();
+export {
+ Button,
+ IconButton,
+ Box,
+ Text,
+ Link,
+ Input,
+ TextArea,
+ Select,
+ Search,
+ Avatar,
+ ContextMenu,
+ Menu,
+ Spinner,
+ Alert,
+ CheckBox,
+ Navbar,
+ Sidebar,
+ SectionSelector,
+ Modal,
+ SidebarItem,
+ ImagePreview,
+ FeatureCard,
+ FrontendFeatureCard,
+ BackendFeatureCard,
+ Chip,
+ CategoryCard,
+ TemplateCard,
+ SupportSidebar,
+ GlobalStyles,
+};
diff --git a/src/pages/AddCategory/index.tsx b/src/pages/AddCategory/index.tsx
deleted file mode 100644
index f33ef83..0000000
--- a/src/pages/AddCategory/index.tsx
+++ /dev/null
@@ -1,201 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { Navigate, useNavigate } from 'react-router';
-import { useMutation, useReactiveVar } from '@apollo/client';
-import React, { useState } from 'react';
-import { roleVar } from '../../graphql/state';
-import {
- Box,
- Button,
- Text,
- SectionSelector,
- Input,
- Alert,
- TextArea,
-} from '../../components';
-import { Wrapper } from './styles';
-import { ArrowLeft, General } from '../../assets';
-import {
- AddCategoryMutation,
- AddCategoryMutationVariables,
-} from '../../graphql/types';
-import { ADD_CATEGORY } from '../../graphql/category.api';
-
-const AddCategory = () => {
- const navigate = useNavigate();
- const role = useReactiveVar(roleVar);
-
- const [error, setError] = useState('');
-
- const [addCategory, { loading }] = useMutation<
- AddCategoryMutation,
- AddCategoryMutationVariables
- >(ADD_CATEGORY, {
- onCompleted({ addCategory: { id } }) {
- navigate(`/category/${id}`);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const form = useFormik({
- initialValues: {
- name: '',
- description: '',
- imageName: '',
- imageSource: '',
- },
- validationSchema: Yup.object().shape({
- name: Yup.string().required('Name is required'),
- description: Yup.string().required('Description is required'),
- imageName: Yup.string().required('Image is required'),
- imageSource: Yup.string().required('Image is required'),
- }),
- onSubmit: ({ name, description, imageName, imageSource }) => {
- addCategory({
- variables: {
- category: {
- name,
- description,
- image: { name: imageName, src: imageSource },
- },
- },
- });
- },
- });
-
- if (role !== 'developer') return (
- <>
- {role === 'admin' && }
- {['client', 'productOwer'].includes(role as string) && }
- >
- )
-
- return (
-
-
-
-
-
- }
- color={role || 'client'}
- text='General'
- selected
- />
-
-
-
-
- General
-
- {error && }
-
-
-
-
-
- );
-};
-
-export default AddCategory;
diff --git a/src/pages/AddCategory/styles.ts b/src/pages/AddCategory/styles.ts
deleted file mode 100644
index a1193e9..0000000
--- a/src/pages/AddCategory/styles.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- padding: 35px 45px 35px 120px;
-`;
diff --git a/src/pages/AddFeature/index.tsx b/src/pages/AddFeature/index.tsx
deleted file mode 100644
index 1bba077..0000000
--- a/src/pages/AddFeature/index.tsx
+++ /dev/null
@@ -1,489 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { Navigate, useNavigate } from 'react-router';
-import { useMutation, useReactiveVar } from '@apollo/client';
-import React, { useState } from 'react';
-import { roleVar } from '../../graphql/state';
-import {
- Box,
- Button,
- Text,
- SectionSelector,
- Input,
- Alert,
- TextArea,
- CheckBox,
- ImagePreview,
-} from '../../components';
-import { Wrapper } from './styles';
-import { ArrowLeft, General, Design } from '../../assets';
-import {
- AddFeatureMutation,
- AddFeatureMutationVariables,
-} from '../../graphql/types';
-import { ADD_FEATURE } from '../../graphql/feature.api';
-
-const AddFeature = () => {
- const navigate = useNavigate();
- const role = useReactiveVar(roleVar);
- const [newFeature, setNewFeature] = useState<{
- name: string;
- description: string;
- featureType: string;
- image: {
- name: string;
- src: string;
- };
- wireframes?: Array<{
- name: string;
- src: string;
- }>;
- price: number;
- repo: string;
- }>({
- name: '',
- description: '',
- featureType: '',
- image: {
- name: '',
- src: '',
- },
- price: 0,
- repo: '',
- });
-
- const [selectedSection, setSelectedSection] = useState<
- 'general' | 'wireframes'
- >('general');
- const [error, setError] = useState('');
-
- const [addFeature, { loading }] = useMutation<
- AddFeatureMutation,
- AddFeatureMutationVariables
- >(ADD_FEATURE, {
- onCompleted({ addFeature: { id } }) {
- navigate(`/feature/${id}`);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const generalForm = useFormik({
- initialValues: {
- name: '',
- description: '',
- imageName: '',
- imageSource: '',
- featureType: '',
- price: '',
- repo: '',
- },
- validationSchema: Yup.object().shape({
- name: Yup.string().required('Name is required'),
- description: Yup.string().required('Description is required'),
- imageName: Yup.string().required('Image is required'),
- imageSource: Yup.string().required('Image is required'),
- featureType: Yup.string().required('Feature Type is required'),
- price: Yup.number().typeError('Price must be a number').required('Price is required'),
- repo: Yup.string().required('Repo is required'),
- }),
- onSubmit: ({
- name,
- description,
- imageName,
- imageSource,
- featureType,
- price,
- repo,
- }) => {
- setNewFeature({
- name,
- description,
- featureType,
- image: { name: imageName, src: imageSource },
- price: parseFloat(price),
- repo,
- });
- setSelectedSection('wireframes');
- },
- });
-
- const wireframesForm = useFormik<{
- wireframes: Array<{ name: string; src: string }>;
- }>({
- initialValues: {
- wireframes: [],
- },
- onSubmit: ({ wireframes }) => {
- addFeature({ variables: { feature: { ...newFeature, wireframes } } });
- },
- });
-
- if (role !== 'developer') return (
- <>
- {role === 'admin' && }
- {['client', 'productOwer'].includes(role as string) && }
- >
- )
-
- return (
-
-
-
-
-
- }
- color={role || 'client'}
- text='General'
- selected={selectedSection === 'general'}
- />
- }
- color={role || 'client'}
- text='Wireframes'
- selected={selectedSection === 'wireframes'}
- />
-
-
- {selectedSection === 'general' && (
- <>
-
-
- {selectedSection === 'general' ? 'General' : 'Wireframes'}
-
- {error && }
-
-
- >
- )}
- {selectedSection === 'wireframes' && (
- <>
-
-
- Wireframes
-
- {error && }
-
-
- >
- )}
-
-
-
- );
-};
-
-export default AddFeature;
diff --git a/src/pages/AddFeature/styles.ts b/src/pages/AddFeature/styles.ts
deleted file mode 100644
index ffc89a8..0000000
--- a/src/pages/AddFeature/styles.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- padding: 35px 45px 35px 120px;
-
- .feature-type {
- background: ${({ theme }) => theme.colors.gray.dark};
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
-`;
diff --git a/src/pages/AddProject/index.tsx b/src/pages/AddProject/index.tsx
deleted file mode 100644
index c07069b..0000000
--- a/src/pages/AddProject/index.tsx
+++ /dev/null
@@ -1,1970 +0,0 @@
-// @ts-ignore
-import Carousel, { consts } from 'react-elastic-carousel';
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { useNavigate } from 'react-router';
-import { useLazyQuery, useMutation, useReactiveVar } from '@apollo/client';
-import { useState, useEffect } from 'react';
-import { roleVar, userVar } from '../../graphql/state';
-import { Wrapper } from './styles';
-import {
- Alert,
- Box,
- Button,
- CategoryCard,
- FeatureCard,
- Input,
- SectionSelector,
- Select,
- Spinner,
- TemplateCard,
- Text,
- TextArea,
-} from '../../components';
-import {
- ArrowLeft,
- ArrowRight,
- ChevronLeft,
- ChevronRight,
- Profile,
- Security,
-} from '../../assets';
-import {
- AddProjectMutation,
- AddProjectMutationVariables,
- AddProjectProposalMutation,
- AddProjectProposalMutationVariables,
- CategoryOutput,
- CountryPrefixModel,
- CreateUserMutation,
- CreateUserMutationVariables,
- DelivrableInput,
- FeatureOutput,
- GetAllCategoriesQuery,
- GetAllCategoriesQueryVariables,
- GetAllFeaturesQuery,
- GetAllFeaturesQueryVariables,
- GetAllTemplatesByCategoriesIdQuery,
- GetAllTemplatesByCategoriesIdQueryVariables,
- GetAllUsersQuery,
- GetAllUsersQueryVariables,
- GetCountryCodesQuery,
- GetCountryCodesQueryVariables,
- PaymentOptionInput,
- ProjectInput,
- TemplateOutput,
- UserOutput,
-} from '../../graphql/types';
-import { theme } from '../../themes';
-import { GET_ALL_CATEGORIES } from '../../graphql/category.api';
-import { GET_ALL_TEMPLATES_BY_CATEGORIES_ID } from '../../graphql/template.api';
-import { GET_ALL_FEATURES } from '../../graphql/feature.api';
-import { ADD_PROJECT, ADD_PROJECT_PROPOSAL } from '../../graphql/project.api';
-import { CREATE_USER, GET_ALL_USERS } from '../../graphql/admin.api';
-import { GET_COUNTRY_CODES } from '../../graphql/auth.api';
-
-const AddProject = () => {
- const navigate = useNavigate();
- const role = useReactiveVar(roleVar);
- const currentUser = useReactiveVar(userVar);
- const [error, setError] = useState('');
- const [step, setStep] = useState<
- | 'basic-info'
- | 'categories'
- | 'template'
- | 'features'
- | 'deliverables-platforms'
- | 'payment-options'
- | 'client-creation'
- | 'project-metadata'
- >('basic-info');
- const [project, setProject] = useState>();
- const [chosenCategories, setChosenCategories] = useState>([]);
- const [chosenTemplate, setChosenTemplate] = useState<
- TemplateOutput | undefined
- >();
- const [chosenFeatures, setChosenFeatures] = useState>(
- []
- );
- const [chosenDeliverables, setChosenDeliverables] =
- useState();
- const [chosenPaymentOption, setChosenPaymentOption] =
- useState();
- const [chosenPlatforms, setChosenPlatforms] = useState>([]);
- const [selectedFeature, setSelectedFeature] = useState();
- const [categories, setCategories] = useState>([]);
- const [templates, setTemplates] = useState>([]);
- const [features, setFeatures] = useState>([]);
- const [newUser, setNewUser] = useState<{
- firstName: string;
- lastName: string;
- email: string;
- password: string;
- phone: {
- prefix: string;
- number: string;
- };
- address: {
- place: string;
- city: string;
- country: string;
- zip: string;
- };
- role: 'Client' | 'ProductOwner' | 'Developer';
- }>({
- firstName: '',
- lastName: '',
- email: '',
- password: '',
- phone: {
- prefix: '',
- number: '',
- },
- address: {
- place: '',
- city: '',
- country: '',
- zip: '',
- },
- role: 'Client',
- });
- const [selectedSection, setSelectedSection] = useState<
- 'general' | 'security'
- >('general');
- const [countryCodes, setCountryCodes] = useState>(
- []
- );
- const [client, setClient] = useState();
- const [proposal, setProposal] = useState<{
- devtime: {
- months: number;
- days: number;
- hours: number;
- };
- summary: string;
- purpose: string;
- resources: Array<{ resourceType: string; developers: number }>;
- }>();
- const [developers, setDevelopers] = useState>([]);
-
- const [getCategories, { loading: categoriesLoading }] = useLazyQuery<
- GetAllCategoriesQuery,
- GetAllCategoriesQueryVariables
- >(GET_ALL_CATEGORIES, {
- onCompleted({ getAllCategories }) {
- setCategories(getAllCategories);
- }
- });
-
- const [getTemplates, { loading: templatesLoading }] = useLazyQuery<
- GetAllTemplatesByCategoriesIdQuery,
- GetAllTemplatesByCategoriesIdQueryVariables
- >(GET_ALL_TEMPLATES_BY_CATEGORIES_ID, {
- onCompleted({ getAllTemplatesByCategoriesId }) {
- setTemplates(getAllTemplatesByCategoriesId);
- }
- });
-
- const [getFeatures, { loading: featuresLoading }] = useLazyQuery<
- GetAllFeaturesQuery,
- GetAllFeaturesQueryVariables
- >(GET_ALL_FEATURES, {
- onCompleted({ getAllFeatures }) {
- setFeatures(getAllFeatures);
- }
- });
-
- const [getDevelopers, { loading: developersLoading }] = useLazyQuery<
- GetAllUsersQuery,
- GetAllUsersQueryVariables
- >(GET_ALL_USERS, {
- onCompleted({ getAllUsers }) {
- setDevelopers(getAllUsers.filter((user) => user.role === 'Developer'));
- }
- });
-
- const [createUser, { loading: createUserLoading }] = useMutation<
- CreateUserMutation,
- CreateUserMutationVariables
- >(CREATE_USER, {
- onCompleted({ createUser: createdUser }) {
- setClient(createdUser);
- setStep('project-metadata');
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const [addProjectProposal, { loading: addProjectProposalLoading }] =
- useMutation<
- AddProjectProposalMutation,
- AddProjectProposalMutationVariables
- >(ADD_PROJECT_PROPOSAL, {
- onCompleted({ addProjectProposal: proposalData }) {
- navigate(`/project/${proposalData.id}`);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0].extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const [addProject, { loading: addProjectLoading }] = useMutation<
- AddProjectMutation,
- AddProjectMutationVariables
- >(ADD_PROJECT, {
- onCompleted({ addProject: projectData }) {
- if (role === 'client') navigate(`/project/${projectData.id}`);
- else {
- addProjectProposal({
- variables: {
- id: projectData.id,
- proposal: {
- devtime: proposal?.devtime!,
- resources: proposal?.resources!,
- summary: proposal?.summary!,
- purpose: proposal?.summary!,
- },
- },
- });
- }
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0].extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- useEffect(() => {
- if (step === 'categories') getCategories();
- if (step === 'template')
- getTemplates({ variables: { categories: chosenCategories } });
- if (step === 'features') getFeatures();
- if (step === 'client-creation') getCountryCodes();
- if (step === 'project-metadata') getDevelopers();
- }, [step]);
-
- const basicInfoForm = useFormik({
- initialValues: {
- name: '',
- imageName: '',
- imageSource: '',
- },
- validationSchema: Yup.object().shape({
- name: Yup.string().required('Name is required'),
- imageName: Yup.string().required('Image is required'),
- imageSource: Yup.string().required('Image is required'),
- }),
- onSubmit: ({ name, imageName, imageSource }) => {
- setProject({
- ...project,
- clientId: currentUser?.id,
- name,
- image: { name: imageName, src: imageSource },
- });
- setStep('categories');
- },
- });
-
- const categoriesForm = useFormik<{ selectedCategories: Array }>({
- initialValues: {
- selectedCategories: [],
- },
- onSubmit: ({ selectedCategories }) => {
- if (selectedCategories.length === 0) {
- setError('Select at least one category');
- setTimeout(() => setError(''), 3000);
- return;
- }
- setChosenCategories(selectedCategories);
- setStep('template');
- },
- });
-
- const templateForm = useFormik<{
- selectedTemplate: TemplateOutput | undefined;
- }>({
- initialValues: {
- selectedTemplate: undefined,
- },
- onSubmit: ({ selectedTemplate }) => {
- if (!selectedTemplate) {
- setError('You must select one template');
- setTimeout(() => setError(''), 3000);
- return;
- }
- setChosenTemplate(selectedTemplate);
- setStep('features');
- },
- });
-
- const featuresForm = useFormik<{
- selectedFeatures: Array;
- }>({
- initialValues: {
- selectedFeatures: [],
- },
- onSubmit: ({ selectedFeatures }) => {
- if (selectedFeatures.length === 0) {
- setError('Select at least one feature');
- setTimeout(() => setError(''), 3000);
- return;
- }
- setChosenFeatures(selectedFeatures);
- setStep('deliverables-platforms');
- },
- });
-
- const deliverablesPlatformsForm = useFormik<{
- selectedDeliverables: DelivrableInput;
- selectedPlatforms: Array;
- }>({
- initialValues: {
- selectedDeliverables: {
- specification: false,
- design: false,
- mvp: false,
- fullBuild: false,
- },
- selectedPlatforms: [],
- },
- onSubmit: ({ selectedDeliverables, selectedPlatforms }) => {
- if (
- Object.values(selectedDeliverables)
- .slice(0, 4)
- .filter((value) => value === true).length === 0
- ) {
- setError('Select at least one deliverable');
- setTimeout(() => setError(''), 3000);
- return;
- }
- if (selectedPlatforms.length === 0) {
- setError('Select at least one platform');
- setTimeout(() => setError(''), 3000);
- return;
- }
- setChosenPlatforms(selectedPlatforms);
- setChosenDeliverables(selectedDeliverables);
- setStep('payment-options');
- },
- });
-
- const paymentOptionsForm = useFormik<{
- optOne: number;
- optTwo: number;
- optThree: number;
- }>({
- initialValues: {
- optOne: 0,
- optTwo: 0,
- optThree: 0,
- },
- onSubmit: ({ optOne, optTwo, optThree }) => {
- if (!optOne && !optTwo && !optThree) {
- setError('You must choose one payment option');
- setTimeout(() => setError(''), 3000);
- return;
- }
- setChosenPaymentOption({ optOne, optTwo, optThree });
- if (role === 'client')
- addProject({
- variables: {
- project: {
- name: project?.name!,
- image: {
- name: project?.image?.name!,
- src: project?.image?.src!,
- },
- features: chosenFeatures.map((feature) => feature.id)!,
- template: chosenTemplate?.id!,
- clientId: currentUser?.id!,
- platforms: chosenPlatforms,
- delivrable: chosenDeliverables,
- paymentOption: {
- optOne,
- optTwo,
- optThree,
- }!,
- totalPrice: chosenFeatures.reduce(
- (accumulator, feature) => accumulator + feature.price,
- 0
- ),
- },
- },
- });
-
- if (role === 'productOwner') setStep('client-creation');
- },
- });
-
- const clientCreationGeneralForm = useFormik({
- initialValues: {
- firstName: '',
- lastName: '',
- email: '',
- prefix: '',
- number: '',
- place: '',
- city: '',
- zip: '',
- country: '',
- },
- validationSchema: Yup.object().shape({
- firstName: Yup.string().required('First Name is required'),
- lastName: Yup.string().required('Last Name is required'),
- email: Yup.string()
- .required('Email is required')
- .email('Email is invalid'),
- prefix: Yup.string().required('Prefix is required'),
- number: Yup.number().typeError('Phone must be a number').required('Phone is required'),
- place: Yup.string().required('Address is required'),
- city: Yup.string().required('City is required'),
- country: Yup.string().required('Country is required'),
- zip: Yup.number().typeError('Zip must be a number').required('Zip is required'),
- }),
- onSubmit: ({
- firstName,
- lastName,
- email,
- prefix,
- number,
- place,
- city,
- country,
- zip,
- }) => {
- setNewUser({
- ...newUser,
- firstName,
- lastName,
- email,
- phone: { prefix, number },
- address: { place, city, country, zip },
- });
- setSelectedSection('security');
- },
- });
-
- const [getCountryCodes, { loading: countryCodesLoading }] = useLazyQuery<
- GetCountryCodesQuery,
- GetCountryCodesQueryVariables
- >(GET_COUNTRY_CODES, {
- onCompleted({ getCountryCode }) {
- setCountryCodes(getCountryCode);
- clientCreationGeneralForm.setFieldValue(
- 'prefix',
- getCountryCode[0].prefix
- );
- clientCreationGeneralForm.setFieldValue(
- 'country',
- getCountryCode[0].country
- );
- }
- });
-
- const clientCreationSecurityForm = useFormik({
- initialValues: {
- password: '',
- confirmPassword: '',
- },
- validationSchema: Yup.object().shape({
- password: Yup.string()
- .required('Password is required')
- .min(6, 'Password is 6 characters minimum'),
- confirmPassword: Yup.string()
- .required('Confirm password is required')
- .oneOf(
- [Yup.ref('password')],
- "Confirm new password doesn't match with new password"
- ),
- }),
- onSubmit: ({ password }) => {
- setNewUser({ ...newUser, password });
- createUser({ variables: { user: { ...newUser, password } } });
- },
- });
-
- const projectMetadataForm = useFormik<{
- frontendDevelopers: Array;
- backendDevelopers: Array;
- months: string;
- summary: string;
- purpose: string;
- }>({
- initialValues: {
- frontendDevelopers: [],
- backendDevelopers: [],
- months: '',
- summary: '',
- purpose: '',
- },
- validationSchema: Yup.object().shape({
- summary: Yup.string().required('Summary is required'),
- purpose: Yup.string().required('Purpose is required'),
- months: Yup.number().typeError('Months must be a number').required('Months is required'),
- }),
- onSubmit: ({
- frontendDevelopers,
- backendDevelopers,
- months,
- summary,
- purpose,
- }) => {
- if (
- !frontendDevelopers ||
- frontendDevelopers.length === 0 ||
- !backendDevelopers ||
- backendDevelopers.length === 0
- ) {
- setError('You must select developers for your project');
- setTimeout(() => setError(''), 3000);
- return;
- }
- setProposal({
- ...proposal,
- devtime: {
- months: parseInt(months, 10),
- days: 0,
- hours: 0,
- },
- resources: [
- {
- resourceType: 'frontend-developers',
- developers: frontendDevelopers.length,
- },
- {
- resourceType: 'backend-developers',
- developers: backendDevelopers.length,
- },
- ],
- summary,
- purpose,
- });
- addProject({
- variables: {
- project: {
- name: project?.name!,
- image: {
- name: project?.image?.name!,
- src: project?.image?.src!,
- },
- features: chosenFeatures.map((feature) => feature.id)!,
- template: chosenTemplate?.id!,
- clientId: client?.id!,
- platforms: chosenPlatforms,
- delivrable: chosenDeliverables,
- paymentOption: {
- optOne: chosenPaymentOption?.optOne!,
- optTwo: chosenPaymentOption?.optTwo!,
- optThree: chosenPaymentOption?.optThree!,
- }!,
- totalPrice: chosenFeatures.reduce(
- (accumulator, feature) => accumulator + feature.price,
- 0
- ),
- },
- },
- });
- },
- });
-
- const carouselSettings = {
- pagination: false,
- itemsToShow: 1,
- enableSwipe: true,
- isRTL: false,
- disableArrowsOnEnd: true,
- enableTilt: false,
- renderArrow: ({
- type,
- onClick,
- isEdge,
- }: {
- type: string;
- onClick: () => void;
- isEdge: boolean;
- }) => (
- <>
- {type !== consts.PREV ? (
-
- ) : (
-
- )}
- >
- ),
- transitionMs: 0,
- };
-
- return (
-
-
-
-
-
- {error && }
-
-
- }
- onClick={() => {
- if (step === 'categories') setStep('basic-info');
- if (step === 'template') setStep('categories');
- if (step === 'features') setStep('template');
- if (step === 'deliverables-platforms') setStep('features');
- if (step === 'payment-options')
- setStep('deliverables-platforms');
- if (step === 'project-metadata') setStep('client-creation');
- }}
- />
-
-
- }
- onClick={() => {
- if (step === 'basic-info') basicInfoForm.handleSubmit();
- if (step === 'categories') categoriesForm.handleSubmit();
- if (step === 'template') templateForm.handleSubmit();
- if (step === 'features') featuresForm.handleSubmit();
- if (step === 'deliverables-platforms')
- deliverablesPlatformsForm.handleSubmit();
- if (step === 'payment-options')
- paymentOptionsForm.handleSubmit();
- if (step === 'client-creation')
- clientCreationSecurityForm.handleSubmit();
- if (step === 'project-metadata')
- projectMetadataForm.handleSubmit();
- }}
- />
-
-
-
- {step === 'basic-info' && (
-
-
-
- {basicInfoForm.values.imageSource ? (
-
-
-
- ) : (
-
- )}
-
-
- {basicInfoForm.values.name || 'Project Name'}
-
-
-
-
- )}
- {step === 'categories' && (
- <>
- {!categoriesLoading ? (
-
- ) : (
-
- )}
- >
- )}
- {step === 'template' && (
- <>
- {!templatesLoading ? (
-
- ) : (
-
- )}
- >
- )}
- {step === 'features' && (
- <>
- {!featuresLoading ? (
-
-
-
- {selectedFeature && (
- <>
-
-
- {selectedFeature.name}
-
-
- {selectedFeature.description}
-
-
-
- {selectedFeature?.wireframes?.map((wireframe) => (
-
-
-
- ))}
-
- >
- )}
-
-
- ) : (
-
- )}
- >
- )}
- {step === 'deliverables-platforms' && (
-
- )}
- {step === 'payment-options' && (
-
- )}
- {step === 'client-creation' && (
- <>
-
-
- }
- color={role || 'client'}
- text='General'
- selected={selectedSection === 'general'}
- />
- }
- color={role || 'client'}
- text='Security'
- selected={selectedSection === 'security'}
- />
-
-
-
-
- {selectedSection === 'general' ? 'General' : 'Security'}
-
- {error && }
-
- {selectedSection === 'general' && (
- <>
- {!countryCodesLoading ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
-
-
-
- )}
- >
- )}
- {selectedSection === 'security' && (
-
-
-
-
-
-
-
-
-
- )}
-
-
- >
- )}
- {step === 'project-metadata' && (
- <>
- {!developersLoading ? (
-
- ) : (
-
- )}
- >
- )}
-
-
- );
-};
-
-export default AddProject;
diff --git a/src/pages/AddProject/styles.ts b/src/pages/AddProject/styles.ts
deleted file mode 100644
index 986a768..0000000
--- a/src/pages/AddProject/styles.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import styled from 'styled-components';
-
-type WrapperProps = {
- color?: 'client' | 'productOwner' | 'developer' | 'admin';
-};
-
-export const Wrapper = styled.div`
- .carousel-arrow {
- background: none;
- border: none;
- align-self: center;
- cursor: pointer;
-
- svg {
- stroke: ${({ theme, color }) => theme.colors[color || 'client'].main};
- }
- }
-
- .wireframe {
- img {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- }
- }
-`;
diff --git a/src/pages/AddTemplate/index.tsx b/src/pages/AddTemplate/index.tsx
deleted file mode 100644
index db16a49..0000000
--- a/src/pages/AddTemplate/index.tsx
+++ /dev/null
@@ -1,833 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { Navigate, useNavigate } from 'react-router';
-import {
- useLazyQuery,
- useMutation,
- useQuery,
- useReactiveVar,
-} from '@apollo/client';
-import React, { useState } from 'react';
-import { roleVar } from '../../graphql/state';
-import {
- Box,
- Button,
- Text,
- SectionSelector,
- Input,
- Alert,
- TextArea,
- Select,
- Spinner,
- FeatureCard,
-} from '../../components';
-import { Wrapper } from './styles';
-import { ArrowLeft, General, Specification, Features, Empty } from '../../assets';
-import {
- AddTemplateMutation,
- AddTemplateMutationVariables,
- FeatureOutput,
- GetAllCategoriesQuery,
- GetAllCategoriesQueryVariables,
- GetAllFeaturesQuery,
- GetAllFeaturesQueryVariables,
- TemplateInput,
-} from '../../graphql/types';
-import { ADD_TEMPLATE } from '../../graphql/template.api';
-import { GET_ALL_CATEGORIES } from '../../graphql/category.api';
-import { GET_ALL_FEATURES } from '../../graphql/feature.api';
-
-const AddTemplate = () => {
- const navigate = useNavigate();
- const role = useReactiveVar(roleVar);
- const [newTemplate, setNewTemplate] = useState({
- name: '',
- description: '',
- image: {
- name: '',
- src: '',
- },
- category: '',
- specification: {
- introduction: {
- purpose: '',
- documentConventions: '',
- intendedAudience: '',
- projectScope: '',
- },
- overallDescription: {
- perspective: '',
- userCharacteristics: '',
- operatingEnvironment: '',
- designImplementationConstraints: '',
- userDocumentation: '',
- assemptionsDependencies: '',
- },
- nonFunctionalRequirements: {
- performanceRequirements: '',
- safetyRequirements: '',
- securityRequirements: '',
- softwareQualityAttributes: '',
- },
- otherRequirements: '',
- glossary: '',
- analysisModels: '',
- issuesList: '',
- },
- features: [],
- });
-
- const [availableFeatures, setAvailableFeatures] =
- useState>();
-
- const [selectedSection, setSelectedSection] = useState<
- 'general' | 'specification' | 'features'
- >('general');
- const [error, setError] = useState('');
-
- const { data: categories, loading: categoriesLoading, error: categoriesError } = useQuery<
- GetAllCategoriesQuery,
- GetAllCategoriesQueryVariables
- >(GET_ALL_CATEGORIES);
-
- const [getFeatures, { loading: featuresLoading, error: featuresError }] = useLazyQuery<
- GetAllFeaturesQuery,
- GetAllFeaturesQueryVariables
- >(GET_ALL_FEATURES, {
- onCompleted({ getAllFeatures }) {
- setAvailableFeatures(getAllFeatures);
- }
- });
-
- const [addTemplate, { loading }] = useMutation<
- AddTemplateMutation,
- AddTemplateMutationVariables
- >(ADD_TEMPLATE, {
- onCompleted({ addTemplate: { id } }) {
- navigate(`/template/${id}`);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const generalForm = useFormik({
- initialValues: {
- name: '',
- description: '',
- imageName: '',
- imageSource: '',
- category: '',
- },
- validationSchema: Yup.object().shape({
- name: Yup.string().required('Name is required'),
- description: Yup.string().required('Description is required'),
- imageName: Yup.string().required('Image is required'),
- imageSource: Yup.string().required('Image is required'),
- category: Yup.string().required('Category is required'),
- }),
- onSubmit: ({ name, description, category, imageName, imageSource }) => {
- setNewTemplate({
- name,
- description,
- image: { name: imageName, src: imageSource },
- category,
- });
- setSelectedSection('specification');
- },
- });
-
- const specificationForm = useFormik({
- initialValues: {
- purpose: '',
- documentConventions: '',
- intendedAudience: '',
- projectScope: '',
- perspective: '',
- userCharacteristics: '',
- operatingEnvironment: '',
- designImplementationConstraints: '',
- userDocumentation: '',
- assemptionsDependencies: '',
- performanceRequirements: '',
- safetyRequirements: '',
- securityRequirements: '',
- softwareQualityAttributes: '',
- otherRequirements: '',
- glossary: '',
- analysisModels: '',
- issuesList: '',
- },
- validationSchema: Yup.object().shape({
- purpose: Yup.string().required('Purpose is required'),
- documentConventions: Yup.string().required(
- 'Document conventions is required'
- ),
- intendedAudience: Yup.string().required('Intented audience is required'),
- projectScope: Yup.string().required('Project scope is required'),
- perspective: Yup.string().required('Perspective is required'),
- userCharacteristics: Yup.string().required(
- 'User characteristics is required'
- ),
- operatingEnvironment: Yup.string().required(
- 'Operating environment is required'
- ),
- designImplementationConstraints: Yup.string().required(
- 'Design and implementation constraints is required'
- ),
- userDocumentation: Yup.string().required(
- 'User documentation is required'
- ),
- assemptionsDependencies: Yup.string().required(
- 'Assumptions and dependencies is required'
- ),
- performanceRequirements: Yup.string().required(
- 'Performance requirements is required'
- ),
- safetyRequirements: Yup.string().required(
- 'Safety requirements is required'
- ),
- securityRequirements: Yup.string().required(
- 'Security requirements is required'
- ),
- softwareQualityAttributes: Yup.string().required(
- 'Software quality attributes is required'
- ),
- otherRequirements: Yup.string().required(
- 'Other requirements is required'
- ),
- glossary: Yup.string().required('Glossary is required'),
- analysisModels: Yup.string().required('Analysis models is required'),
- issuesList: Yup.string().required('Issues list is required'),
- }),
- onSubmit: ({
- purpose,
- documentConventions,
- intendedAudience,
- projectScope,
- perspective,
- userCharacteristics,
- operatingEnvironment,
- designImplementationConstraints,
- userDocumentation,
- assemptionsDependencies,
- performanceRequirements,
- safetyRequirements,
- securityRequirements,
- softwareQualityAttributes,
- otherRequirements,
- glossary,
- analysisModels,
- issuesList,
- }) => {
- setNewTemplate({
- ...newTemplate,
- specification: {
- introduction: {
- purpose,
- documentConventions,
- intendedAudience,
- projectScope,
- },
- overallDescription: {
- perspective,
- userCharacteristics,
- operatingEnvironment,
- designImplementationConstraints,
- userDocumentation,
- assemptionsDependencies,
- },
- nonFunctionalRequirements: {
- performanceRequirements,
- safetyRequirements,
- securityRequirements,
- softwareQualityAttributes,
- },
- otherRequirements,
- glossary,
- analysisModels,
- issuesList,
- },
- });
- setSelectedSection('features');
- getFeatures();
- },
- });
-
- const featuresForm = useFormik<{ features: Array }>({
- initialValues: {
- features: [],
- },
- onSubmit: ({ features }) => {
- addTemplate({ variables: { template: { ...newTemplate, features } } });
- },
- });
-
- if (role !== 'productOwner') return (
- <>
- {role === 'admin' && }
- {['client', 'developer'].includes(role as string) && }
- >
- );
-
- if (categoriesLoading || featuresLoading) return (
-
- );
-
- if (categoriesError || featuresError || !categories) return (
-
-
-
-
-
-
-
- );
-
- return (
-
-
-
-
-
- }
- color={role || 'client'}
- text='General'
- selected={selectedSection === 'general'}
- />
- }
- color={role || 'client'}
- text='Specification'
- selected={selectedSection === 'specification'}
- />
- }
- color={role || 'client'}
- text='Features'
- selected={selectedSection === 'features'}
- />
-
-
- {selectedSection === 'general' && (
- <>
- {!categoriesLoading ? (
- <>
-
-
- {selectedSection === 'general' ? 'General' : 'Wireframes'}
-
- {error && }
-
-
- >
- ) : (
-
-
-
- )}
- >
- )}
- {selectedSection === 'specification' && (
- <>
-
-
- Specification
-
- {error && }
-
-
- >
- )}
- {selectedSection === 'features' && (
- <>
-
-
- Features
-
- {error && }
-
-
- >
- )}
-
-
-
- );
-};
-
-export default AddTemplate;
diff --git a/src/pages/AddTemplate/styles.ts b/src/pages/AddTemplate/styles.ts
deleted file mode 100644
index 35a77fc..0000000
--- a/src/pages/AddTemplate/styles.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import styled from 'styled-components';
-
-type WrapperProps = {
- color?: 'client' | 'productOwner' | 'developer' | 'admin';
-};
-
-export const Wrapper = styled.div`
- padding: 35px 45px 35px 120px;
-
- .empty {
- fill: ${({ theme, color }) =>
- color ? theme.colors[color].main : theme.colors.client.main};
- }
-`;
diff --git a/src/pages/Auth/AdditionalInfo/index.tsx b/src/pages/Auth/AdditionalInfo/index.tsx
deleted file mode 100644
index 4254418..0000000
--- a/src/pages/Auth/AdditionalInfo/index.tsx
+++ /dev/null
@@ -1,279 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { useState } from 'react';
-import { useNavigate } from 'react-router-dom';
-import { useMutation, useQuery, useReactiveVar } from '@apollo/client';
-import {
- Box,
- Button,
- Input,
- Select,
- Text,
- Alert,
- Spinner,
-} from '../../../components';
-import { theme } from '../../../themes';
-import { Wrapper } from './styles';
-import {
- GetCountryCodesQuery,
- GetCountryCodesQueryVariables,
- UpdateUserInfoMutation,
- UpdateUserInfoMutationVariables,
-} from '../../../graphql/types';
-import { GET_COUNTRY_CODES, UPDATE_USER_INFO } from '../../../graphql/auth.api';
-import { userVar } from '../../../graphql/state';
-
-const AdditionalInfo = () => {
- const navigate = useNavigate();
- const [error, setError] = useState('');
- const currentUser = useReactiveVar(userVar);
- const { data: countryCodes, loading: countryCodesLoading } = useQuery<
- GetCountryCodesQuery,
- GetCountryCodesQueryVariables
- >(GET_COUNTRY_CODES);
-
- const [updateUserInfo, { loading }] = useMutation<
- UpdateUserInfoMutation,
- UpdateUserInfoMutationVariables
- >(UPDATE_USER_INFO, {
- onCompleted({ updateUserInfo: user }) {
- userVar(user);
- navigate('/');
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const form = useFormik({
- initialValues: {
- firstName: '',
- lastName: '',
- prefix: '',
- number: '',
- place: '',
- city: '',
- zip: '',
- country: '',
- },
- validationSchema: Yup.object().shape({
- firstName: Yup.string().required('First Name is required'),
- lastName: Yup.string().required('Last Name is required'),
- prefix: Yup.string().required('Prefix is required'),
- number: Yup.number()
- // prettier-ignore
- .typeError('Phone must be a number')
- .required('Phone is required'),
- place: Yup.string().required('Address is required'),
- city: Yup.string().required('City is required'),
- country: Yup.string().required('Country is required'),
- zip: Yup.number()
- // prettier-ignore
- .typeError('Zip must be a number')
- .required('Zip is required'),
- }),
- onSubmit: ({
- firstName,
- lastName,
- prefix,
- number,
- place,
- city,
- country,
- zip,
- }) =>
- updateUserInfo({
- variables: {
- user: {
- id: currentUser?.id!,
- email: currentUser?.email!,
- firstName,
- lastName,
- phone: { prefix, number },
- address: { place, city, country, zip },
- role: currentUser?.role!,
- },
- },
- }),
- });
-
- return (
-
-
-
-
-
- Tell us more about yourself
-
-
- {!countryCodesLoading ? (
-
- ) : (
-
- )}
-
-
-
- );
-};
-
-export default AdditionalInfo;
diff --git a/src/pages/Auth/AdditionalInfo/styles.ts b/src/pages/Auth/AdditionalInfo/styles.ts
deleted file mode 100644
index cd082fe..0000000
--- a/src/pages/Auth/AdditionalInfo/styles.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- background: ${({ theme }) => theme.colors.client.main};
-`;
diff --git a/src/pages/Auth/ForgotPassword/index.tsx b/src/pages/Auth/ForgotPassword/index.tsx
deleted file mode 100644
index b468920..0000000
--- a/src/pages/Auth/ForgotPassword/index.tsx
+++ /dev/null
@@ -1,161 +0,0 @@
-import * as Yup from 'yup';
-import { useMutation } from '@apollo/client';
-import { useFormik } from 'formik';
-import { useState } from 'react';
-import { Login as LoginIllustration, Logo } from '../../../assets';
-import { Box, Button, Input, Link, Text, Alert } from '../../../components';
-import { RESET_PASSWORD } from '../../../graphql/auth.api';
-import {
- ResetPasswordMutation,
- ResetPasswordMutationVariables,
-} from '../../../graphql/types';
-import { theme } from '../../../themes';
-import { Wrapper } from './styles';
-
-const ForgotPassword = () => {
- const [error, setError] = useState('');
- const [success, setSuccess] = useState(false);
-
- const [resetPassword, { loading }] = useMutation<
- ResetPasswordMutation,
- ResetPasswordMutationVariables
- >(RESET_PASSWORD, {
- onCompleted() {
- setSuccess(true);
- setTimeout(() => setSuccess(false), 3000);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const form = useFormik({
- initialValues: {
- email: '',
- password: '',
- },
- validationSchema: Yup.object().shape({
- email: Yup.string()
- .required('Email is required')
- .email('Email is invalid'),
- }),
- onSubmit: ({ email }) => {
- resetPassword({ variables: { email } });
- },
- });
-
- return (
-
-
-
-
-
-
-
-
-
-
- Forgot Password
-
- {error && }
- {success && (
-
- )}
-
-
-
-
-
-
-
-
-
- Make your idea alive
-
-
-
-
- Create your dream software with no coding skills
-
-
-
-
-
- );
-};
-
-export default ForgotPassword;
diff --git a/src/pages/Auth/ForgotPassword/styles.ts b/src/pages/Auth/ForgotPassword/styles.ts
deleted file mode 100644
index 14ea300..0000000
--- a/src/pages/Auth/ForgotPassword/styles.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div``;
diff --git a/src/pages/Auth/Login/index.tsx b/src/pages/Auth/Login/index.tsx
deleted file mode 100644
index b26f5af..0000000
--- a/src/pages/Auth/Login/index.tsx
+++ /dev/null
@@ -1,180 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { useMutation } from '@apollo/client';
-import { useNavigate } from 'react-router';
-import { useState } from 'react';
-import { tokenVar, roleVar, userVar } from '../../../graphql/state';
-import { Login as LoginIllustration, Logo } from '../../../assets';
-import { Alert, Box, Button, Input, Link, Text } from '../../../components';
-import { theme } from '../../../themes';
-import { Wrapper } from './styles';
-import { LOGIN } from '../../../graphql/auth.api';
-import { LoginMutation, LoginMutationVariables } from '../../../graphql/types';
-
-const Login = () => {
- const navigate = useNavigate();
- const [error, setError] = useState('');
-
- const [login, { loading }] = useMutation<
- LoginMutation,
- LoginMutationVariables
- >(LOGIN, {
- onCompleted({ login: { user, token } }) {
- switch (user.role) {
- case 'Client':
- roleVar('client');
- break;
- case 'ProductOwner':
- roleVar('productOwner');
- break;
- case 'Developer':
- roleVar('developer');
- break;
- case 'Admin':
- roleVar('admin');
- break;
- default:
- break;
- }
- tokenVar(token);
- userVar(user);
- localStorage.setItem('token', token);
- navigate('/');
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const form = useFormik({
- initialValues: {
- email: '',
- password: '',
- },
- validationSchema: Yup.object().shape({
- email: Yup.string()
- .required('Email is required')
- .email('Email is invalid'),
- password: Yup.string()
- .required('Password is required')
- .min(6, 'Password is 6 characters minimum'),
- }),
- onSubmit: ({ email, password }) => {
- login({ variables: { email, password } });
- },
- });
-
- return (
-
-
-
-
-
-
-
-
-
-
- Login
-
- {error && }
-
-
-
-
-
-
-
-
-
- Make your idea alive
-
-
-
-
- Create your dream software with no coding skills
-
-
-
-
-
- );
-};
-
-export default Login;
diff --git a/src/pages/Auth/Login/styles.ts b/src/pages/Auth/Login/styles.ts
deleted file mode 100644
index 8522aec..0000000
--- a/src/pages/Auth/Login/styles.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- button svg path {
- stroke: transparent !important;
- }
-`;
diff --git a/src/pages/Auth/RecoverAccount/index.tsx b/src/pages/Auth/RecoverAccount/index.tsx
deleted file mode 100644
index 300b28f..0000000
--- a/src/pages/Auth/RecoverAccount/index.tsx
+++ /dev/null
@@ -1,162 +0,0 @@
-import * as Yup from 'yup';
-import { useMutation } from '@apollo/client';
-import { useFormik } from 'formik';
-import { useState } from 'react';
-import { useNavigate } from 'react-router-dom';
-import { Login as LoginIllustration, Logo } from '../../../assets';
-import { Box, Button, Input, Text, Alert } from '../../../components';
-import { CONFIRM_USER_RESET_PASSWORD } from '../../../graphql/auth.api';
-import {
- ConfirmUserResetPasswordMutation,
- ConfirmUserResetPasswordMutationVariables,
-} from '../../../graphql/types';
-import { theme } from '../../../themes';
-import { Wrapper } from './styles';
-
-const RecoverAccount = () => {
- const params = new URLSearchParams(window.location.search);
- const navigate = useNavigate();
- const [error, setError] = useState('');
-
- const [confirmResetPassword, { loading }] = useMutation<
- ConfirmUserResetPasswordMutation,
- ConfirmUserResetPasswordMutationVariables
- >(CONFIRM_USER_RESET_PASSWORD, {
- onCompleted() {
- navigate('/login');
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const form = useFormik({
- initialValues: {
- newPassword: '',
- confirmNewPassword: '',
- },
- validationSchema: Yup.object().shape({
- newPassword: Yup.string()
- .required('New password is required')
- .min(6, 'new Password is 6 characters minimum'),
- confirmNewPassword: Yup.string().oneOf(
- [Yup.ref('newPassword')],
- "Passwords don't match"
- ),
- }),
- onSubmit: ({ newPassword }) => {
- confirmResetPassword({
- variables: { id: params.get('code')!, password: newPassword },
- });
- },
- });
-
- return (
-
-
-
-
-
-
-
-
-
-
- Recover Account
-
- {error && }
-
-
-
-
-
-
-
-
-
- Make your idea alive
-
-
-
-
- Create your dream software with no coding skills
-
-
-
-
-
- );
-};
-
-export default RecoverAccount;
diff --git a/src/pages/Auth/RecoverAccount/styles.ts b/src/pages/Auth/RecoverAccount/styles.ts
deleted file mode 100644
index 14ea300..0000000
--- a/src/pages/Auth/RecoverAccount/styles.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div``;
diff --git a/src/pages/Auth/Signup/index.tsx b/src/pages/Auth/Signup/index.tsx
deleted file mode 100644
index 0e1df2a..0000000
--- a/src/pages/Auth/Signup/index.tsx
+++ /dev/null
@@ -1,170 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { useState } from 'react';
-import { useNavigate } from 'react-router-dom';
-import { useMutation } from '@apollo/client';
-import { Signup as SignupIllustration, Logo } from '../../../assets';
-import { Box, Button, Input, Link, Text, Alert } from '../../../components';
-import { theme } from '../../../themes';
-import { Wrapper } from './styles';
-import {
- SignupMutation,
- SignupMutationVariables,
-} from '../../../graphql/types';
-import { SIGNUP } from '../../../graphql/auth.api';
-import { roleVar, tokenVar, userVar } from '../../../graphql/state';
-
-const Signup = () => {
- const navigate = useNavigate();
- const [error, setError] = useState('');
-
- const [signup, { loading }] = useMutation<
- SignupMutation,
- SignupMutationVariables
- >(SIGNUP, {
- onCompleted({ signup: { token, user } }) {
- roleVar('client');
- tokenVar(token);
- userVar(user);
- localStorage.setItem('token', token);
- navigate('/additional-info');
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const form = useFormik({
- initialValues: {
- email: '',
- password: '',
- },
- validationSchema: Yup.object().shape({
- email: Yup.string()
- .required('Email is required')
- .email('Email is invalid'),
- password: Yup.string()
- .required('Password is required')
- .min(6, 'Password is 6 characters minimum'),
- }),
- onSubmit: ({ email, password }) => {
- signup({ variables: { email, password } });
- },
- });
-
- return (
-
-
-
-
-
-
-
-
-
-
- Signup
-
- {error && }
-
-
-
-
-
-
-
-
-
- Make your idea alive
-
-
-
-
- Create your dream software with no coding skills
-
-
-
-
-
- );
-};
-
-export default Signup;
diff --git a/src/pages/Auth/Signup/styles.ts b/src/pages/Auth/Signup/styles.ts
deleted file mode 100644
index 8522aec..0000000
--- a/src/pages/Auth/Signup/styles.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- button svg path {
- stroke: transparent !important;
- }
-`;
diff --git a/src/pages/Category/index.tsx b/src/pages/Category/index.tsx
deleted file mode 100644
index e7c78d6..0000000
--- a/src/pages/Category/index.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import { useEffect, useState } from 'react';
-import { useLazyQuery, useReactiveVar } from '@apollo/client';
-import { Navigate, useNavigate, useParams } from 'react-router';
-import { roleVar } from '../../graphql/state';
-import { Empty, Settings } from '../../assets';
-import { Box, Button, Spinner, Text } from '../../components';
-import { Wrapper } from './styles';
-import {
- CategoryOutput,
- GetAllCategoriesQuery,
- GetAllCategoriesQueryVariables,
- GetCategoryByIdQuery,
- GetCategoryByIdQueryVariables,
-} from '../../graphql/types';
-import {
- GET_ALL_CATEGORIES,
- GET_CATEGORY_BY_ID,
-} from '../../graphql/category.api';
-
-const Category = () => {
- const role = useReactiveVar(roleVar);
- const navigate = useNavigate();
- const { id } = useParams<{ id: string }>();
- const [category, setCategory] = useState();
-
- const [getCategories, { loading: categoriesLoading, error: categoriesError }] = useLazyQuery<
- GetAllCategoriesQuery,
- GetAllCategoriesQueryVariables
- >(GET_ALL_CATEGORIES, {
- onCompleted({ getAllCategories }) {
- setCategory(getAllCategories[0]);
- }
- });
-
- const [getCategory, { loading: categoryLoading, error: categoryError }] = useLazyQuery<
- GetCategoryByIdQuery,
- GetCategoryByIdQueryVariables
- >(GET_CATEGORY_BY_ID, {
- onCompleted({ getCategoryById }) {
- setCategory(getCategoryById);
- }
- });
-
- useEffect(() => {
- if (id) {
- getCategory({ variables: { id } });
- } else {
- getCategories();
- }
- }, [id]);
-
- if (role !== 'developer') return (
- <>
- {role === 'admin' && }
- {['client', 'productOwer'].includes(role as string) && }
- >
- )
-
- if (categoriesLoading || categoryLoading) return (
-
- );
-
- if (categoriesError || categoryError || !category) return (
-
-
-
-
-
-
-
- );
-
- return (
-
-
-
-
-
- {category.name}
-
-
- }
- onClick={() =>
- navigate(`/category-settings/${id || category.id}`)
- }
- />
-
-
- Description
- {category.description}
-
-
-
- );
-};
-
-export default Category;
diff --git a/src/pages/Category/styles.ts b/src/pages/Category/styles.ts
deleted file mode 100644
index bf7ee3d..0000000
--- a/src/pages/Category/styles.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import styled from 'styled-components';
-
-type WrapperProps = {
- color?: 'client' | 'productOwner' | 'developer' | 'admin';
-};
-
-export const Wrapper = styled.div`
- .empty {
- fill: ${({ theme, color }) =>
- color ? theme.colors[color].main : theme.colors.client.main};
- }
-`;
diff --git a/src/pages/CategorySettings/index.tsx b/src/pages/CategorySettings/index.tsx
deleted file mode 100644
index 40e4e7d..0000000
--- a/src/pages/CategorySettings/index.tsx
+++ /dev/null
@@ -1,294 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { Navigate, useNavigate, useParams } from 'react-router';
-import { useLazyQuery, useMutation, useReactiveVar } from '@apollo/client';
-import React, { useEffect, useState } from 'react';
-import { roleVar } from '../../graphql/state';
-import {
- Box,
- Button,
- Text,
- SectionSelector,
- Input,
- Alert,
- TextArea,
- Spinner,
- Modal,
-} from '../../components';
-import { Wrapper } from './styles';
-import { ArrowLeft, Empty, General } from '../../assets';
-import {
- CategoryOutput,
- DeleteCategoryMutation,
- DeleteCategoryMutationVariables,
- GetCategoryByIdQuery,
- GetCategoryByIdQueryVariables,
- UpdateCategoryMutation,
- UpdateCategoryMutationVariables,
-} from '../../graphql/types';
-import {
- DELETE_CATEGORY,
- GET_CATEGORY_BY_ID,
- UPDATE_CATEGORY,
-} from '../../graphql/category.api';
-
-const CategorySettings = () => {
- const navigate = useNavigate();
- const { id } = useParams<{ id: string }>();
- const role = useReactiveVar(roleVar);
-
- const [error, setError] = useState('');
- const [success, setSuccess] = useState(false);
- const [category, setCategory] = useState();
-
- const [deleteCategoryModal, setDeleteCategoryModal] =
- useState(false);
-
- const [getCategory, { loading: categoryLoading, error: categoryError }] = useLazyQuery<
- GetCategoryByIdQuery,
- GetCategoryByIdQueryVariables
- >(GET_CATEGORY_BY_ID, {
- onCompleted({ getCategoryById }) {
- setCategory(getCategoryById);
- }
- });
-
- const [updateCategory, { loading }] = useMutation<
- UpdateCategoryMutation,
- UpdateCategoryMutationVariables
- >(UPDATE_CATEGORY, {
- onCompleted({ updateCategory: data }) {
- setCategory(data);
- setSuccess(true);
- setTimeout(() => setSuccess(false), 3000);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const [deleteCategory] = useMutation<
- DeleteCategoryMutation,
- DeleteCategoryMutationVariables
- >(DELETE_CATEGORY, {
- onCompleted() {
- navigate('/category');
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- useEffect(() => {
- getCategory({ variables: { id: id as string } });
- }, [id]);
-
- const form = useFormik({
- initialValues: {
- name: category?.name || '',
- description: category?.description || '',
- imageName: category?.image.name || '',
- imageSource: category?.image.src || '',
- },
- validationSchema: Yup.object().shape({
- name: Yup.string().required('Name is required'),
- description: Yup.string().required('Description is required'),
- imageName: Yup.string().required('Image is required'),
- imageSource: Yup.string().required('Image is required'),
- }),
- onSubmit: ({ name, description, imageName, imageSource }) => {
- updateCategory({
- variables: {
- id: id as string,
- category: {
- name,
- description,
- image: { name: imageName, src: imageSource },
- },
- },
- });
- },
- enableReinitialize: true,
- });
-
- if (role !== 'developer') return (
- <>
- {role === 'admin' && }
- {['client', 'productOwer'].includes(role as string) && }
- >
- )
-
- if (categoryLoading) return (
-
- );
-
- if (categoryError || !category) return (
-
-
-
-
-
-
-
- );
-
- return (
-
- {deleteCategoryModal && (
- setDeleteCategoryModal(false)}
- onConfirm={() => deleteCategory({ variables: { id: id as string } })}
- >
- )}
-
-
-
-
- }
- color={role || 'client'}
- text='General'
- selected
- />
-
-
-
-
- General
-
- {error && }
- {success && (
-
- )}
-
-
-
-
-
- );
-};
-
-export default CategorySettings;
diff --git a/src/pages/CategorySettings/styles.ts b/src/pages/CategorySettings/styles.ts
deleted file mode 100644
index a1193e9..0000000
--- a/src/pages/CategorySettings/styles.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- padding: 35px 45px 35px 120px;
-`;
diff --git a/src/pages/CreateUser/index.tsx b/src/pages/CreateUser/index.tsx
deleted file mode 100644
index d2b6a76..0000000
--- a/src/pages/CreateUser/index.tsx
+++ /dev/null
@@ -1,480 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { Navigate, useNavigate, useParams } from 'react-router';
-import { useMutation, useQuery, useReactiveVar } from '@apollo/client';
-import { useState } from 'react';
-import { roleVar } from '../../graphql/state';
-import {
- Box,
- Button,
- Text,
- SectionSelector,
- Input,
- Select,
- Alert,
- Spinner,
-} from '../../components';
-import { Wrapper } from './styles';
-import { ArrowLeft, Profile, Security } from '../../assets';
-import {
- GetCountryCodesQuery,
- GetCountryCodesQueryVariables,
- CreateUserMutation,
- CreateUserMutationVariables,
-} from '../../graphql/types';
-import { GET_COUNTRY_CODES } from '../../graphql/auth.api';
-import { CREATE_USER, GET_ALL_USERS } from '../../graphql/admin.api';
-
-const CreateUser = () => {
- const navigate = useNavigate();
- const { role: newUserRole } = useParams<{
- role: 'Client' | 'ProductOwner' | 'Developer';
- }>();
- const role = useReactiveVar(roleVar);
- const [newUser, setNewUser] = useState<{
- firstName: string;
- lastName: string;
- email: string;
- password: string;
- phone: {
- prefix: string;
- number: string;
- };
- address: {
- place: string;
- city: string;
- country: string;
- zip: string;
- };
- role: 'Client' | 'ProductOwner' | 'Developer';
- }>({
- firstName: '',
- lastName: '',
- email: '',
- password: '',
- phone: {
- prefix: '',
- number: '',
- },
- address: {
- place: '',
- city: '',
- country: '',
- zip: '',
- },
- role: newUserRole!,
- });
-
- const [selectedSection, setSelectedSection] = useState<
- 'general' | 'security'
- >('general');
- const [error, setError] = useState('');
-
- const [createUser, { loading: createUserLoading }] = useMutation<
- CreateUserMutation,
- CreateUserMutationVariables
- >(CREATE_USER, {
- onCompleted() {
- const location =
- newUserRole === 'Client'
- ? '/clients'
- : newUserRole === 'ProductOwner'
- ? '/product-owners'
- : '/developers';
- navigate(location);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- refetchQueries: [{ query: GET_ALL_USERS }],
- });
-
- const generalForm = useFormik({
- initialValues: {
- firstName: '',
- lastName: '',
- email: '',
- prefix: '',
- number: '',
- place: '',
- city: '',
- zip: '',
- country: '',
- },
- validationSchema: Yup.object().shape({
- firstName: Yup.string().required('First Name is required'),
- lastName: Yup.string().required('Last Name is required'),
- email: Yup.string()
- .required('Email is required')
- .email('Email is invalid'),
- prefix: Yup.string().required('Prefix is required'),
- // prettier-ignore
- number: Yup.number().typeError('Phone must be a number').required('Phone is required'),
- place: Yup.string().required('Address is required'),
- city: Yup.string().required('City is required'),
- country: Yup.string().required('Country is required'),
- // prettier-ignore
- zip: Yup.number().typeError('Zip must be a number').required('Zip is required'),
- }),
- onSubmit: ({
- firstName,
- lastName,
- email,
- prefix,
- number,
- place,
- city,
- country,
- zip,
- }) => {
- setNewUser({
- ...newUser,
- firstName,
- lastName,
- email,
- phone: { prefix, number },
- address: { place, city, country, zip },
- });
- setSelectedSection('security');
- },
- });
-
- const { data: countryCodes, loading: countryCodesLoading } = useQuery<
- GetCountryCodesQuery,
- GetCountryCodesQueryVariables
- >(GET_COUNTRY_CODES, {
- onCompleted({ getCountryCode }) {
- generalForm.setFieldValue('prefix', getCountryCode[0].prefix);
- generalForm.setFieldValue('country', getCountryCode[0].country);
- },
- });
-
- const securityForm = useFormik({
- initialValues: {
- password: '',
- confirmPassword: '',
- },
- validationSchema: Yup.object().shape({
- password: Yup.string()
- .required('Password is required')
- .min(6, 'Password is 6 characters minimum'),
- confirmPassword: Yup.string()
- .required('Confirm password is required')
- .oneOf(
- [Yup.ref('password')],
- "Confirm new password doesn't match with new password"
- ),
- }),
- onSubmit: ({ password }) => {
- setNewUser({ ...newUser, password });
- createUser({ variables: { user: { ...newUser, password } } });
- },
- });
-
- if (role !== 'admin') return (
-
- )
-
- return (
-
-
-
-
-
- }
- color={role || 'client'}
- text='General'
- selected={selectedSection === 'general'}
- />
- }
- color={role || 'client'}
- text='Security'
- selected={selectedSection === 'security'}
- />
-
-
-
-
- {selectedSection === 'general' ? 'General' : 'Security'}
-
- {error && }
-
- {selectedSection === 'general' && (
- <>
- {!countryCodesLoading ? (
-
- ) : (
-
-
-
- )}
- >
- )}
- {selectedSection === 'security' && (
-
- )}
-
-
-
- );
-};
-
-export default CreateUser;
diff --git a/src/pages/CreateUser/styles.ts b/src/pages/CreateUser/styles.ts
deleted file mode 100644
index d81e173..0000000
--- a/src/pages/CreateUser/styles.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- padding: 35px 45px 35px 120px;
-
- div {
- cursor: default;
- }
-`;
diff --git a/src/pages/Feature/index.tsx b/src/pages/Feature/index.tsx
deleted file mode 100644
index 67b7005..0000000
--- a/src/pages/Feature/index.tsx
+++ /dev/null
@@ -1,179 +0,0 @@
-import { useEffect, useState } from 'react';
-import { useNavigate, useParams } from 'react-router-dom';
-import { useLazyQuery, useReactiveVar } from '@apollo/client';
-import { Navigate } from 'react-router';
-import { roleVar } from '../../graphql/state';
-import { Empty, Settings } from '../../assets';
-import {
- Box,
- Text,
- Button,
- Spinner,
- ImagePreview,
- Link,
-} from '../../components';
-import { Wrapper } from './styles';
-import {
- FeatureOutput,
- GetAllFeaturesQuery,
- GetAllFeaturesQueryVariables,
- GetFeatureByIdQuery,
- GetFeatureByIdQueryVariables,
-} from '../../graphql/types';
-import { GET_ALL_FEATURES, GET_FEATURE_BY_ID } from '../../graphql/feature.api';
-
-const Feature = () => {
- const role = useReactiveVar(roleVar);
- const navigate = useNavigate();
- const { id } = useParams<{ id: string }>();
- const [feature, setFeature] = useState();
-
- const [getFeatures, { loading: featuresLoading, error: featuresError }] = useLazyQuery<
- GetAllFeaturesQuery,
- GetAllFeaturesQueryVariables
- >(GET_ALL_FEATURES, {
- onCompleted({ getAllFeatures }) {
- setFeature(getAllFeatures[0]);
- }
- });
-
- const [getFeature, { loading: featureLoading, error: featureError }] = useLazyQuery<
- GetFeatureByIdQuery,
- GetFeatureByIdQueryVariables
- >(GET_FEATURE_BY_ID, {
- onCompleted({ getFeatureById }) {
- setFeature(getFeatureById);
- }
- });
-
- useEffect(() => {
- if (id) {
- getFeature({ variables: { id } });
- } else {
- getFeatures();
- }
- }, [id]);
-
- if (role !== 'developer') return (
- <>
- {role === 'admin' && }
- {['client', 'productOwer'].includes(role as string) && }
- >
- );
-
- if (featureLoading || featureLoading) return (
-
- );
-
- if (featuresError || featureError || !feature) return (
-
-
-
-
-
-
-
- );
-
- return (
-
-
-
-
-
- {feature.name}
-
-
- }
- onClick={() =>
- navigate(`/feature-settings/${id || feature.id}`)
- }
- />
-
-
-
- Description
-
- {feature.description}
-
-
-
-
- Price
-
-
-
- ${feature.price}
-
-
- {feature.wireframes && (
-
-
- Wireframes
-
-
- {feature.wireframes.map((image) => (
-
- ))}
-
-
- )}
-
-
-
- Repo
-
-
-
- {feature.repo}
-
-
-
-
- );
-};
-
-export default Feature;
diff --git a/src/pages/Feature/styles.ts b/src/pages/Feature/styles.ts
deleted file mode 100644
index bf7ee3d..0000000
--- a/src/pages/Feature/styles.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import styled from 'styled-components';
-
-type WrapperProps = {
- color?: 'client' | 'productOwner' | 'developer' | 'admin';
-};
-
-export const Wrapper = styled.div`
- .empty {
- fill: ${({ theme, color }) =>
- color ? theme.colors[color].main : theme.colors.client.main};
- }
-`;
diff --git a/src/pages/FeatureSettings/index.tsx b/src/pages/FeatureSettings/index.tsx
deleted file mode 100644
index fc199f5..0000000
--- a/src/pages/FeatureSettings/index.tsx
+++ /dev/null
@@ -1,586 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { Navigate, useNavigate, useParams } from 'react-router';
-import { useLazyQuery, useMutation, useReactiveVar } from '@apollo/client';
-import React, { useEffect, useState } from 'react';
-import { roleVar } from '../../graphql/state';
-import {
- Box,
- Button,
- Text,
- SectionSelector,
- Input,
- Alert,
- TextArea,
- Spinner,
- Modal,
- CheckBox,
- ImagePreview,
-} from '../../components';
-import { Wrapper } from './styles';
-import { ArrowLeft, Design, Empty, General } from '../../assets';
-import {
- DeleteFeatureMutation,
- DeleteFeatureMutationVariables,
- FeatureOutput,
- GetFeatureByIdQuery,
- GetFeatureByIdQueryVariables,
- UpdateFeatureMutation,
- UpdateFeatureMutationVariables,
-} from '../../graphql/types';
-import {
- DELETE_FEATURE,
- GET_FEATURE_BY_ID,
- UPDATE_FEATURE,
-} from '../../graphql/feature.api';
-
-const FeatureSettings = () => {
- const navigate = useNavigate();
- const { id } = useParams<{ id: string }>();
- const role = useReactiveVar(roleVar);
-
- const [selectedSection, setSelectedSection] = useState<
- 'general' | 'wireframes'
- >('general');
- const [error, setError] = useState('');
- const [success, setSuccess] = useState(false);
- const [feature, setFeature] = useState({
- id: id as string,
- name: '',
- description: '',
- featureType: '',
- image: {
- name: '',
- src: '',
- },
- price: 0,
- repo: '',
- });
-
- const [deleteFeatureModal, setDeleteFeatureModal] = useState(false);
-
- const [getFeature, { loading: featureLoading, error: featureError }] = useLazyQuery<
- GetFeatureByIdQuery,
- GetFeatureByIdQueryVariables
- >(GET_FEATURE_BY_ID, {
- onCompleted({ getFeatureById }) {
- setFeature(getFeatureById);
- }
- });
-
- const [updateFeature, { loading }] = useMutation<
- UpdateFeatureMutation,
- UpdateFeatureMutationVariables
- >(UPDATE_FEATURE, {
- onCompleted({ updateFeature: data }) {
- setFeature(data);
- setSuccess(true);
- setTimeout(() => setSuccess(false), 3000);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const [deleteFeature] = useMutation<
- DeleteFeatureMutation,
- DeleteFeatureMutationVariables
- >(DELETE_FEATURE, {
- onCompleted() {
- navigate('/feature');
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- useEffect(() => {
- getFeature({ variables: { id: id as string } });
- }, [id]);
-
- const generalForm = useFormik({
- initialValues: {
- name: feature?.name || '',
- description: feature?.description || '',
- imageName: feature?.image.name || '',
- imageSource: feature?.image.src || '',
- featureType: feature?.featureType || '',
- price: feature?.price.toString() || '',
- repo: feature?.repo || '',
- },
- validationSchema: Yup.object().shape({
- name: Yup.string().required('Name is required'),
- description: Yup.string().required('Description is required'),
- imageName: Yup.string().required('Image is required'),
- imageSource: Yup.string().required('Image is required'),
- featureType: Yup.string().required('Feature Type is required'),
- // prettier-ignore
- price: Yup.number().typeError('Price must be a number').required('Price is required'),
- repo: Yup.string().required('Repo is required'),
- }),
- onSubmit: ({
- name,
- description,
- imageName,
- imageSource,
- featureType,
- price,
- repo,
- }) => {
- updateFeature({
- variables: {
- id: id as string,
- feature: {
- name,
- description,
- featureType,
- image: { name: imageName, src: imageSource },
- price: parseFloat(price),
- repo,
- },
- },
- });
- },
- enableReinitialize: true,
- });
-
- const wireframesForm = useFormik<{
- wireframes: Array<{ name: string; src: string }>;
- }>({
- initialValues: {
- wireframes:
- feature?.wireframes?.map((wireframe) => ({
- name: wireframe.name,
- src: wireframe.src,
- })) || [],
- },
- onSubmit: ({ wireframes }) => {
- updateFeature({
- variables: {
- id: id as string,
- feature: {
- name: feature.name,
- description: feature.description,
- price: feature.price,
- repo: feature.repo,
- featureType: feature.featureType,
- image: { name: feature.image.name, src: feature.image.src },
- wireframes,
- },
- },
- });
- },
- enableReinitialize: true,
- });
-
- if (role !== 'developer') return (
- <>
- {role === 'admin' && }
- {['client', 'productOwer'].includes(role as string) && }
- >
- )
-
- if (featureLoading || featureLoading) return (
-
- );
-
- if (featureError || !feature) return (
-
-
-
-
-
-
-
- );
-
- return (
-
-
-
-
-
- }
- color={role || 'client'}
- text='General'
- selected={selectedSection === 'general'}
- onClick={() => setSelectedSection('general')}
- />
- }
- color={role || 'client'}
- text='Wireframes'
- selected={selectedSection === 'wireframes'}
- onClick={() => setSelectedSection('wireframes')}
- />
-
-
-
-
- {selectedSection === 'general' ? 'General' : 'Wireframes'}
-
- {error && }
- {success && (
-
- )}
-
- {selectedSection === 'general' && (
- <>
- {deleteFeatureModal && (
- setDeleteFeatureModal(false)}
- onConfirm={() =>
- deleteFeature({ variables: { id: id as string } })
- }
- >
- )}
-
- >
- )}
- {selectedSection === 'wireframes' && (
-
- )}
-
-
-
- );
-};
-
-export default FeatureSettings;
diff --git a/src/pages/FeatureSettings/styles.ts b/src/pages/FeatureSettings/styles.ts
deleted file mode 100644
index 7f5a7db..0000000
--- a/src/pages/FeatureSettings/styles.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- padding: 35px 45px 35px 120px;
-
- .feature-type {
- background: ${({ theme }) => theme.colors.gray.dark};
- background-clip: text;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
-`;
diff --git a/src/pages/Payments/index.tsx b/src/pages/Payments/index.tsx
deleted file mode 100644
index 85fcbf2..0000000
--- a/src/pages/Payments/index.tsx
+++ /dev/null
@@ -1,503 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { useNavigate, useParams } from 'react-router-dom';
-import { useEffect, useState } from 'react';
-import { useLazyQuery, useReactiveVar } from '@apollo/client';
-import { Navigate } from 'react-router';
-import { roleVar } from '../../graphql/state';
-import { Wrapper } from './styles';
-import { Alert, Box, Button, Input, Spinner, Text } from '../../components';
-import { ArrowLeft } from '../../assets';
-import {
- GetProjectByIdQuery,
- GetProjectByIdQueryVariables,
- ProjectOutput,
-} from '../../graphql/types';
-import { GET_PROJECT_BY_ID } from '../../graphql/project.api';
-
-type Transaction = {
- amount: number;
- created: boolean;
- selectedOption: number;
- _id: string;
-};
-
-type TransactionData = {
- transactions: Array;
- remaining_amount: number;
- amount: number;
- project_id: string;
- status: boolean;
- total_amount: number;
- _id: string;
-};
-
-const Payments = () => {
- const role = useReactiveVar(roleVar);
- const navigate = useNavigate();
- const { id } = useParams<{ id: string }>();
- const [project, setProject] = useState();
- const [success, setSuccess] = useState(false);
- const [error, setError] = useState('');
- const [transactionsData, setTransactionsData] = useState();
- const [selectedChunk, setSelectedChunk] = useState();
- const [paymentLoading, setPaymentLoading] = useState(false);
-
- const [getProject, { loading: projectLoading }] = useLazyQuery<
- GetProjectByIdQuery,
- GetProjectByIdQueryVariables
- >(GET_PROJECT_BY_ID, {
- onCompleted({ getProjectById }) {
- setProject(getProjectById);
- }
- });
-
- useEffect(() => {
- (async () => {
- if (id) {
- getProject({ variables: { id } });
-
- try {
- const transactionsResult = await (
- await fetch(`${import.meta.env.VITE_PAYMENT_API}/transactions`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({ project_id: id }),
- })
- ).json();
- if (transactionsResult) setTransactionsData(transactionsResult);
- } catch (err) {
- console.error(err);
- }
- }
- })();
-
- // eslint-disable-next-line
- }, [id]);
-
- const paymentForm = useFormik({
- initialValues: {
- number: '',
- expMonth: '',
- expYear: '',
- cvc: '',
- },
- validationSchema: Yup.object().shape({
- number: Yup.number()
- .typeError('Card Number must be a number')
- .required('Card Number is required'),
-
- expMonth: Yup.number()
- .typeError('Expiary Month must be a number')
- .required('Expiary Month is required'),
-
- expYear: Yup.number()
- .typeError('Expiary Year must be a number')
- .required('Expiary Year is required'),
-
- cvc: Yup.number()
- .typeError('CVC must be a number')
- .required('CVC is required'),
- }),
- onSubmit: async ({ number, expMonth, expYear, cvc }, { resetForm }) => {
- try {
- setPaymentLoading(true);
- let amount = 0;
-
- switch (selectedChunk) {
- case 0: {
- amount =
- (project?.paymentOption.optOne! * project?.totalPrice!) / 100;
- break;
- }
- case 1: {
- amount =
- (project?.paymentOption.optTwo! * project?.totalPrice!) / 100;
- break;
- }
- case 2: {
- amount =
- (project?.paymentOption.optThree! * project?.totalPrice!) / 100;
- break;
- }
- default:
- break;
- }
-
- const transactionsResult = await (
- await fetch(`${import.meta.env.VITE_PAYMENT_API}/charge`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- project_id: project?.id,
- total_amount: project?.totalPrice,
- selectedOption: selectedChunk,
- amount,
- card: {
- number,
- exp_month: expMonth,
- exp_year: expYear,
- cvc,
- },
- }),
- })
- ).json();
-
- if (transactionsResult) {
- setPaymentLoading(false);
- setTransactionsData(transactionsResult);
- setSuccess(true);
- setSelectedChunk(undefined);
- resetForm();
- setTimeout(() => setSuccess(false), 3000);
- }
- } catch (err) {
- setPaymentLoading(false);
- setError(err as string);
- setSelectedChunk(undefined);
- resetForm();
- setTimeout(() => setError(''), 3000);
- }
- },
- });
-
- return role === 'client' ? (
- <>
- {!projectLoading ? (
-
-
-
-
-
- {error && }
- {success && }
-
-
-
-
- Part
- Percentage
- Action
-
-
- {project?.paymentOption.optOne && (
- {
- setSelectedChunk(0);
- }}
- >
-
- #1
-
-
- {project?.paymentOption.optOne}%
-
-
-
-
- )}
- {project?.paymentOption.optTwo && (
- {
- setSelectedChunk(1);
- }}
- >
-
- #2
-
-
- {project?.paymentOption.optTwo}%
-
-
-
-
- )}
- {project?.paymentOption.optThree && (
- {
- setSelectedChunk(2);
- }}
- >
-
- #3
-
-
- {project?.paymentOption.optThree}%
-
-
-
-
- )}
-
-
-
-
-
- Paid Costs
-
- {transactionsData?.remaining_amount && project?.totalPrice
- ? project.totalPrice ===
- transactionsData.remaining_amount
- ? project.totalPrice
- : project.totalPrice -
- transactionsData.remaining_amount
- : 0}
- $
-
-
-
- Remaining Costs
-
- {transactionsData?.transactions
- ? transactionsData?.remaining_amount
- : project?.totalPrice}
- $
-
-
-
- {selectedChunk !== undefined && (
-
-
-
- Pay with Credit Card
-
-
-
-
- )}
-
-
-
-
- ) : (
-
- )}
- >
- ) : (
- <>
- {role === 'admin' && }
- {role === 'developer' ||
- (role === 'productOwner' && )}
- >
- );
-};
-
-export default Payments;
diff --git a/src/pages/Payments/styles.ts b/src/pages/Payments/styles.ts
deleted file mode 100644
index 57eb643..0000000
--- a/src/pages/Payments/styles.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- .empty {
- fill: ${({ theme, color }) =>
- color ? theme.colors[color].main : theme.colors.client.main};
- }
-`;
diff --git a/src/pages/Project/index.tsx b/src/pages/Project/index.tsx
deleted file mode 100644
index 375981b..0000000
--- a/src/pages/Project/index.tsx
+++ /dev/null
@@ -1,800 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { useReactToPrint } from 'react-to-print';
-import { useNavigate, useParams } from 'react-router-dom';
-import { useEffect, useState, useRef } from 'react';
-import { useLazyQuery, useMutation, useReactiveVar } from '@apollo/client';
-import { Navigate } from 'react-router';
-import { roleVar, userVar } from '../../graphql/state';
-import {
- Design,
- Empty,
- FullBuild,
- MVP,
- Settings,
- Specification,
-} from '../../assets';
-import {
- Box,
- Button,
- FeatureCard,
- Text,
- Spinner,
- Link,
- Specification as SpecificationPrint,
- Chip,
- Alert,
- Modal,
- Input,
-} from '../../components';
-import { Wrapper } from './styles';
-import {
- AddProjectDesignMutation,
- AddProjectDesignMutationVariables,
- AddProjectFullBuildMutation,
- AddProjectFullBuildMutationVariables,
- AddProjectMvpMutation,
- AddProjectMvpMutationVariables,
- ChangeProjectStateMutation,
- ChangeProjectStateMutationVariables,
- GetAllProjectsByClientIdQuery,
- GetAllProjectsByClientIdQueryVariables,
- GetAllProjectsQuery,
- GetAllUsersQueryVariables,
- GetProjectByIdQuery,
- GetProjectByIdQueryVariables,
- ProjectOutput,
-} from '../../graphql/types';
-import {
- ADD_PROJECT_DESIGN,
- ADD_PROJECT_FULL_BUILD,
- ADD_PROJECT_MVP,
- CHANGE_PROJECT_STATE,
- GET_ALL_PROJECTS,
- GET_ALL_PROJECTS_BY_CLIENT_ID,
- GET_PROJECT_BY_ID,
-} from '../../graphql/project.api';
-
-const Project = () => {
- const role = useReactiveVar(roleVar);
- const currentUser = useReactiveVar(userVar);
- const navigate = useNavigate();
- const printRef = useRef(null);
- const { id } = useParams<{ id: string }>();
- const [project, setProject] = useState();
- const [error, setError] = useState('');
- const [designModal, setDesignModal] = useState(false);
- const [mvpModal, setMvpModal] = useState(false);
- const [fullBuildModal, setFullBuildModal] = useState(false);
-
- const [
- getProjectsByClientId,
- { loading: clientProjectsLoading, error: clientProjectsError },
- ] = useLazyQuery<
- GetAllProjectsByClientIdQuery,
- GetAllProjectsByClientIdQueryVariables
- >(GET_ALL_PROJECTS_BY_CLIENT_ID, {
- variables: {
- id: currentUser?.id!,
- },
- onCompleted({ getAllProjectsByClientId }) {
- if (getAllProjectsByClientId.length > 0) {
- setProject(getAllProjectsByClientId[0]);
- navigate(`/project/${getAllProjectsByClientId[0]?.id}`, { replace: true })
- }
- },
- });
-
- const [getProjects, { loading: projectsLoading, error: projectsError }] =
- useLazyQuery(
- GET_ALL_PROJECTS,
- {
- onCompleted({ getAllProjects }) {
- if (getAllProjects.length > 0) setProject(getAllProjects[0]);
- },
- }
- );
-
- const [getProject, { loading: projectLoading, error: projectError }] =
- useLazyQuery(
- GET_PROJECT_BY_ID,
- {
- onCompleted({ getProjectById }) {
- setProject(getProjectById);
- },
- }
- );
-
- const [changeProjectState] = useMutation<
- ChangeProjectStateMutation,
- ChangeProjectStateMutationVariables
- >(CHANGE_PROJECT_STATE, {
- onCompleted({ changeProjectState: changedStateProject }) {
- setProject(changedStateProject);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0].extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const [addProjectDesign] = useMutation<
- AddProjectDesignMutation,
- AddProjectDesignMutationVariables
- >(ADD_PROJECT_DESIGN, {
- onCompleted({ addProjectDesign: projectWithDesign }) {
- setDesignModal(false);
- setProject(projectWithDesign);
- },
- onError({ graphQLErrors }) {
- setDesignModal(false);
- setError(graphQLErrors[0].extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const [addProjectMvp] = useMutation<
- AddProjectMvpMutation,
- AddProjectMvpMutationVariables
- >(ADD_PROJECT_MVP, {
- onCompleted({ addProjectMvp: projectWithMvp }) {
- setMvpModal(false);
- setProject(projectWithMvp);
- },
- onError({ graphQLErrors }) {
- setMvpModal(false);
- setError(graphQLErrors[0].extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const [addProjectFullBuild] = useMutation<
- AddProjectFullBuildMutation,
- AddProjectFullBuildMutationVariables
- >(ADD_PROJECT_FULL_BUILD, {
- onCompleted({ addProjectFullBuild: projectWithFullBuild }) {
- setFullBuildModal(false);
- setProject(projectWithFullBuild);
- },
- onError({ graphQLErrors }) {
- setFullBuildModal(false);
- setError(graphQLErrors[0].extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- useEffect(() => {
- if (id) {
- getProject({ variables: { id } });
- } else if (role === 'client' && currentUser?.id) {
- getProjectsByClientId({
- variables: {
- id: currentUser?.id!,
- },
- });
- } else getProjects();
-
- return () => {
- setProject(undefined);
- };
- }, [id, role]);
-
- const handlePrint = useReactToPrint({
- content: () => printRef.current,
- });
-
- const addDesignForm = useFormik({
- initialValues: {
- fileName: '',
- fileSource: '',
- },
- onSubmit: ({ fileName, fileSource }) => {
- addProjectDesign({
- variables: {
- design: {
- id: project?.id!,
- name: fileName,
- src: fileSource,
- },
- },
- });
- },
- });
-
- const addMvpForm = useFormik({
- initialValues: {
- fileName: '',
- fileSource: '',
- },
- onSubmit: ({ fileName, fileSource }) => {
- addProjectMvp({
- variables: {
- mvp: {
- id: project?.id!,
- name: fileName,
- src: fileSource,
- },
- },
- });
- },
- });
-
- const addFullBuildForm = useFormik({
- initialValues: {
- url: '',
- },
- validationSchema: Yup.object().shape({
- url: Yup.string().required('URL is required'),
- }),
- onSubmit: ({ url }) => {
- addProjectFullBuild({
- variables: {
- fullBuild: {
- id: project?.id!,
- url,
- },
- },
- });
- },
- });
-
- if (role === 'admin') return ;
-
- if (clientProjectsLoading || projectsLoading || projectLoading)
- return ;
-
- if (clientProjectsError || projectsError || projectError || !project)
- return (
-
-
-
-
-
-
-
- );
-
- return (
- <>
- {designModal && (
- setDesignModal(false)}
- onConfirm={addDesignForm.handleSubmit}
- >
- ) => {
- const formData = new FormData();
-
- if (event.target.files && event.target.files[0]) {
- formData.append('file', event.target.files[0]);
- formData.append('upload_preset', 'xofll5kc');
-
- addDesignForm.setFieldValue('fileName', '');
- addDesignForm.setFieldValue('fileSource', '');
-
- const data = await (
- await fetch(`${import.meta.env.VITE_CLOUDINARY_URL}`, {
- method: 'POST',
- body: formData,
- })
- ).json();
-
- const filename = data.original_filename;
- const filesource = data.secure_url;
-
- addDesignForm.setFieldValue('fileName', filename);
- addDesignForm.setFieldValue('fileSource', filesource);
- }
- }}
- error={
- addDesignForm.touched.fileName &&
- (!!addDesignForm.errors.fileName ||
- !!addDesignForm.errors.fileSource)
- }
- errorMessage={addDesignForm.errors.fileName}
- />
-
- )}
- {mvpModal && (
- setMvpModal(false)}
- onConfirm={addMvpForm.handleSubmit}
- >
- ) => {
- const formData = new FormData();
-
- if (event.target.files && event.target.files[0]) {
- formData.append('file', event.target.files[0]);
- formData.append('upload_preset', 'xofll5kc');
-
- addMvpForm.setFieldValue('fileName', '');
- addMvpForm.setFieldValue('fileSource', '');
-
- const data = await (
- await fetch(`${import.meta.env.VITE_CLOUDINARY_URL}`, {
- method: 'POST',
- body: formData,
- })
- ).json();
-
- const filename = data.original_filename;
- const filesource = data.secure_url;
-
- addMvpForm.setFieldValue('fileName', filename);
- addMvpForm.setFieldValue('fileSource', filesource);
- }
- }}
- error={
- addMvpForm.touched.fileName &&
- (!!addMvpForm.errors.fileName || !!addMvpForm.errors.fileSource)
- }
- errorMessage={addMvpForm.errors.fileName}
- />
-
- )}
- {fullBuildModal && (
- setMvpModal(false)}
- onConfirm={addFullBuildForm.handleSubmit}
- >
-
-
- )}
-
-
-
-
-
- {project.name}
-
-
- {error && (
-
-
-
- )}
- {project.state === 'Approved' ? (
- <>
-
- }
- disabled={!project.template.id}
- onClick={() =>
- navigate(`/prototype/${project.template.id}`)
- }
- />
-
- {role === 'client' && (
-
- }
- onClick={() => navigate(`/project-settings/${id}`)}
- />
-
- )}
- >
- ) : (
- <>
- {project.state === 'OnReview' && role === 'productOwner' ? (
- <>
-
-
-
-
- >
- ) : (
- <>
- {project.state === 'OnReview' && (
-
- )}
- {project.state === 'Declined' && (
-
- )}
- >
- )}
- >
- )}
-
- {project.template.features && (
-
-
-
- Features
-
-
-
- {project.template.features.map((feature) => (
-
- ))}
-
-
- )}
- {project.delivrable && (
-
-
-
- Deliverables
-
-
-
-
-
-
-
-
- Specification
-
-
- {project.state === 'Approved' ? (
-
- Print
-
- ) : (
- <>
- {project.state === 'OnReview' && (
-
- {project.state}
-
- )}
- {project.state === 'Declined' && (
-
- {project.state}
-
- )}
- >
- )}
-
-
-
-
-
-
- Design
-
- {project.delivrable.design.src ? (
-
- Download
-
- ) : role !== 'productOwner' ? (
- <>
- {project.state === 'OnReview' && (
-
- {project.state}
-
- )}
- {project.state === 'Declined' && (
-
- {project.state}
-
- )}
- {project.state === 'Approved' && (
-
- In Progress
-
- )}
- >
- ) : (
- <>
- {project.state === 'Approved' ? (
- setDesignModal(true)}
- >
-
- Upload
-
-
- ) : (
- <>
- {project.state === 'OnReview' && (
-
- {project.state}
-
- )}
- {project.state === 'Declined' && (
-
- {project.state}
-
- )}
- >
- )}
- >
- )}
-
-
-
-
-
-
- MVP
-
- {project.delivrable.mvp.src ? (
-
- Download
-
- ) : role !== 'productOwner' ? (
- <>
- {project.state === 'OnReview' && (
-
- {project.state}
-
- )}
- {project.state === 'Declined' && (
-
- {project.state}
-
- )}
- {project.state === 'Approved' && (
-
- In Progress
-
- )}
- >
- ) : (
- <>
- {project.state === 'Approved' ? (
- setDesignModal(true)}
- >
-
- Upload
-
-
- ) : (
- <>
- {project.state === 'OnReview' && (
-
- {project.state}
-
- )}
- {project.state === 'Declined' && (
-
- {project.state}
-
- )}
- {project.state === 'Approved' && (
-
- In Progress
-
- )}
- >
- )}
- >
- )}
-
-
-
-
-
-
- Full Build
-
- {project.delivrable.fullBuild !== '' ? (
-
- Get
-
- ) : role !== 'productOwner' ? (
- <>
- {project.state === 'OnReview' && (
-
- {project.state}
-
- )}
- {project.state === 'Declined' && (
-
- {project.state}
-
- )}
- {project.state === 'Approved' && (
-
- In Progress
-
- )}
- >
- ) : (
- <>
- {project.state === 'Approved' ? (
- setDesignModal(true)}
- >
-
- Add
-
-
- ) : (
- <>
- {project.state === 'OnReview' && (
-
- {project.state}
-
- )}
- {project.state === 'Declined' && (
-
- {project.state}
-
- )}
- {project.state === 'Approved' && (
-
- In Progress
-
- )}
- >
- )}
- >
- )}
-
-
-
- )}
- {project.template.specification && project.template.features && (
-
-
-
- )}
-
-
- >
- );
-};
-
-export default Project;
diff --git a/src/pages/Project/styles.ts b/src/pages/Project/styles.ts
deleted file mode 100644
index 2a18f78..0000000
--- a/src/pages/Project/styles.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import styled from 'styled-components';
-
-type WrapperProps = {
- color?: 'client' | 'productOwner' | 'developer' | 'admin';
-};
-
-export const Wrapper = styled.div`
- .empty {
- fill: ${({ theme, color }) =>
- color ? theme.colors[color].main : theme.colors.client.main};
- }
-
- .deliverables {
- svg path {
- stroke: black;
- }
- }
-`;
diff --git a/src/pages/Prototype/index.tsx b/src/pages/Prototype/index.tsx
deleted file mode 100644
index ab24801..0000000
--- a/src/pages/Prototype/index.tsx
+++ /dev/null
@@ -1,355 +0,0 @@
-import { useEffect, useState, useRef, useCallback, useMemo } from 'react';
-import ReactFlow, {
- addEdge,
- MiniMap,
- Controls,
- ControlButton,
- Connection,
- Edge,
- MarkerType,
- useEdgesState,
- useNodesState
-} from 'reactflow';
-import 'reactflow/dist/style.css';
-import { useNavigate, useParams } from 'react-router-dom';
-import { useLazyQuery, useMutation, useReactiveVar } from '@apollo/client';
-import { Navigate } from 'react-router';
-import { roleVar } from '../../graphql/state';
-import { Empty, ArrowLeft, Edit, Close, CheckCircle } from '../../assets';
-import {
- Box,
- Text,
- Button,
- Spinner,
- FrontendFeatureCard,
- BackendFeatureCard,
- Alert,
-} from '../../components';
-import { Wrapper } from './styles';
-import {
- AddPrototypeMutation,
- AddPrototypeMutationVariables,
- FeatureOutput,
- GetPrototypeByIdQuery,
- GetPrototypeByIdQueryVariables,
- GetTemplateByIdQuery,
- GetTemplateByIdQueryVariables,
- ProtoTypeOutput,
- TemplateOutput,
- UpdatePrototypeMutation,
- UpdatePrototypeMutationVariables,
-} from '../../graphql/types';
-import { GET_TEMPLATE_BY_ID } from '../../graphql/template.api';
-import {
- ADD_PROTOTYPE,
- GET_PROTOTYPE_BY_ID,
- UPDATE_PROTOTYPE,
-} from '../../graphql/prototype.api';
-
-const Prototype = () => {
- const role = useReactiveVar(roleVar);
- const navigate = useNavigate();
- const { id } = useParams<{ id: string }>();
- const nodeTypes = useMemo(() => ({ featureCard: FrontendFeatureCard }), []);
- const [template, setTemplate] = useState();
- const [prototype, setPrototype] = useState>();
- const [nodes, setNodes, onNodesChange] = useNodesState([]);
- const [edges, setEdges, onEdgesChange] = useEdgesState([]);
- const [editing, setEditing] = useState(false);
- const [error, setError] = useState('');
- const [success, setSuccess] = useState(false);
- const diagramParentRef = useRef(null);
-
- const [getTemplate, { loading: templateLoading, error: templateError }] = useLazyQuery<
- GetTemplateByIdQuery,
- GetTemplateByIdQueryVariables
- >(GET_TEMPLATE_BY_ID, {
- onCompleted({ getTemplateById }) {
- setTemplate(getTemplateById);
- },
- });
-
- const [getPrototype, { loading: prototypeLoading }] = useLazyQuery<
- GetPrototypeByIdQuery,
- GetPrototypeByIdQueryVariables
- >(GET_PROTOTYPE_BY_ID, {
- onCompleted({ getPrototypeById }) {
- setPrototype(getPrototypeById.prototype);
- },
- });
-
- const [addPrototype] = useMutation<
- AddPrototypeMutation,
- AddPrototypeMutationVariables
- >(ADD_PROTOTYPE, {
- onCompleted({ addPrototype: addPrototypeResult }) {
- setPrototype(addPrototypeResult.prototype);
- setSuccess(true);
- setTimeout(() => setSuccess(false), 3000);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const [updatePrototype] = useMutation<
- UpdatePrototypeMutation,
- UpdatePrototypeMutationVariables
- >(UPDATE_PROTOTYPE, {
- onCompleted({ updatePrototype: updatePrototypeResult }) {
- setPrototype(updatePrototypeResult.prototype);
- setSuccess(true);
- setTimeout(() => setSuccess(false), 3000);
- },
- });
-
- useEffect(() => {
- if (id) {
- getTemplate({ variables: { id } });
- getPrototype({ variables: { id } });
- }
- }, [id]);
-
- useEffect(() => {
- if (template && template.features) {
- const initialNodes = template?.features?.map((feature, index) => ({
- id: feature.id,
- type: 'featureCard',
- data: feature,
- position: { x: index * 100, y: index * 200 },
- style: {
- width: 'auto',
- },
- connectable: role === 'developer' && editing
- }));
-
- if (initialNodes) setNodes(initialNodes);
- }
-
- if (prototype) {
- const initialEdges: Array = [];
-
- prototype.forEach((link) => {
- link.connections.forEach((connection) => {
- initialEdges.push({
- id: `edge-${link.feature.id}`,
- source: link.feature.id,
- target: connection.to,
- markerEnd: MarkerType.Arrow,
- className: 'normal-edge'
- });
- });
- });
-
- if (initialEdges) setEdges(initialEdges);
- }
- }, [template, prototype, editing]);
-
- const onConnect = useCallback(
- (params: Edge | Connection) => setEdges((els) => addEdge(params, els)),
- [setEdges]
- );
-
- const handleEditPrototype = () => {
- if (editing) {
- const prototypeInput = edges
- .map((edge) => ({
- featureId: edge.source,
- connections: [
- {
- to: edge.target,
- releations: { back: false, forword: true },
- },
- ],
- }));
- if (prototypeInput && prototypeInput.length > 0) {
- if (prototype) {
- updatePrototype({
- variables: {
- prototype: {
- templateId: id as string,
- prototype: prototypeInput,
- },
- },
- });
- } else {
- addPrototype({
- variables: {
- prototype: {
- templateId: id as string,
- prototype: prototypeInput,
- },
- },
- });
- }
- }
-
- setEditing(false);
- }
- };
-
- if (role === 'admin') return (
-
- )
-
- if (templateLoading || prototypeLoading) return (
-
- );
-
- if (templateError || !template) return (
-
-
-
-
-
-
-
- );
-
- return (
-
-
-
-
-
- {success && (
-
- )}
- {error && }
-
- {template.features && (
- <>
-
-
-
- Frontend Features
-
-
-
-
-
- {role === 'developer' && (
- <>
-
-
- {!editing && (
- setEditing(true)}>
-
-
- )}
- {editing && (
- <>
- setEditing(false)}>
-
-
-
-
-
- >
- )}
-
- >
- )}
-
-
-
-
-
-
-
- Backend Features
-
-
-
- {template.features.map((feature) => {
- if (
- feature.featureType === 'backend' ||
- feature.featureType === 'fullstack'
- ) {
- return (
-
- );
- }
- return null;
- })}
-
-
- >
- )}
-
-
- );
-};
-
-export default Prototype;
diff --git a/src/pages/Prototype/styles.ts b/src/pages/Prototype/styles.ts
deleted file mode 100644
index bf7ee3d..0000000
--- a/src/pages/Prototype/styles.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import styled from 'styled-components';
-
-type WrapperProps = {
- color?: 'client' | 'productOwner' | 'developer' | 'admin';
-};
-
-export const Wrapper = styled.div`
- .empty {
- fill: ${({ theme, color }) =>
- color ? theme.colors[color].main : theme.colors.client.main};
- }
-`;
diff --git a/src/pages/Settings/index.tsx b/src/pages/Settings/index.tsx
deleted file mode 100644
index a7222d6..0000000
--- a/src/pages/Settings/index.tsx
+++ /dev/null
@@ -1,548 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { useNavigate } from 'react-router';
-import { useMutation, useQuery, useReactiveVar } from '@apollo/client';
-import { useState } from 'react';
-import { roleVar, tokenVar, userVar } from '../../graphql/state';
-import {
- Box,
- Button,
- Text,
- SectionSelector,
- Input,
- Select,
- Alert,
- Spinner,
- Modal,
-} from '../../components';
-import { Wrapper } from './styles';
-import { ArrowLeft, Profile, Security } from '../../assets';
-import {
- UpdateUserInfoMutation,
- UpdateUserPasswordMutation,
- UpdateUserInfoMutationVariables,
- UpdateUserPasswordMutationVariables,
- GetCountryCodesQuery,
- GetCountryCodesQueryVariables,
- DeleteUserMutation,
- DeleteUserMutationVariables,
-} from '../../graphql/types';
-import {
- DELETE_USER,
- GET_COUNTRY_CODES,
- UPDATE_USER_INFO,
- UPDATE_USER_PASSWORD,
-} from '../../graphql/auth.api';
-
-const Settings = () => {
- const navigate = useNavigate();
- const role = useReactiveVar(roleVar);
- const currentUser = useReactiveVar(userVar);
- const { data: countryCodes, loading: countryCodesLoading } = useQuery<
- GetCountryCodesQuery,
- GetCountryCodesQueryVariables
- >(GET_COUNTRY_CODES);
-
- const [selectedSection, setSelectedSection] = useState<
- 'general' | 'security'
- >('general');
- const [error, setError] = useState('');
- const [success, setSuccess] = useState(false);
- const [deleteAccountModal, setDeleteAccountModal] = useState(false);
-
- const [updateUserInfo, { loading: generalLoading }] = useMutation<
- UpdateUserInfoMutation,
- UpdateUserInfoMutationVariables
- >(UPDATE_USER_INFO, {
- onCompleted({ updateUserInfo: user }) {
- userVar(user);
- generalForm.setFieldValue('firstName', user.firstName);
- generalForm.setFieldValue('lastName', user.lastName);
- generalForm.setFieldValue('prefix', user.phone.prefix);
- generalForm.setFieldValue('number', user.phone.number);
- generalForm.setFieldValue('place', user.address.place);
- generalForm.setFieldValue('city', user.address.city);
- generalForm.setFieldValue('zip', user.address.zip);
- generalForm.setFieldValue('country', user.address.country);
- setSuccess(true);
- setTimeout(() => setSuccess(false), 3000);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const generalForm = useFormik({
- initialValues: {
- firstName: currentUser?.firstName || '',
- lastName: currentUser?.lastName || '',
- prefix: currentUser?.phone.prefix || '',
- number: currentUser?.phone.number || '',
- place: currentUser?.address.place || '',
- city: currentUser?.address.city || '',
- zip: currentUser?.address.zip || '',
- country: currentUser?.address.country || '',
- },
- validationSchema: Yup.object().shape({
- firstName: Yup.string().required('First Name is required'),
- lastName: Yup.string().required('Last Name is required'),
- prefix: Yup.string().required('Prefix is required'),
- // prettier-ignore
- number: Yup.number().typeError('Phone must be a number').required('Phone is required'),
- place: Yup.string().required('Address is required'),
- city: Yup.string().required('City is required'),
- country: Yup.string().required('Country is required'),
- // prettier-ignore
- zip: Yup.number().typeError('Zip must be a number').required('Zip is required'),
- }),
- onSubmit: ({
- firstName,
- lastName,
- prefix,
- number,
- place,
- city,
- country,
- zip,
- }) =>
- updateUserInfo({
- variables: {
- user: {
- id: currentUser?.id!,
- email: currentUser?.email!,
- firstName,
- lastName,
- phone: { prefix, number },
- address: { place, city, country, zip },
- role: currentUser?.role!,
- },
- },
- }),
- });
-
- const [updateUserPassword, { loading: securityLoading }] = useMutation<
- UpdateUserPasswordMutation,
- UpdateUserPasswordMutationVariables
- >(UPDATE_USER_PASSWORD, {
- onCompleted({ updateUserPassword: user }) {
- userVar(user);
- setSuccess(true);
- setTimeout(() => setSuccess(false), 3000);
- },
- onError({ graphQLErrors }) {
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const securityForm = useFormik({
- initialValues: {
- oldPassword: '',
- newPassword: '',
- confirmNewPassword: '',
- },
- validationSchema: Yup.object().shape({
- oldPassword: Yup.string()
- .required('Old password is required')
- .min(6, 'Old password is 6 characters minimum'),
- newPassword: Yup.string()
- .required('New password is required')
- .notOneOf(
- [Yup.ref('oldPassword')],
- 'New password should not be old password'
- )
- .required('New password is required')
- .min(6, 'New password is 6 characters minimum'),
- confirmNewPassword: Yup.string()
- .required('Confirm new password is required')
- .oneOf(
- [Yup.ref('newPassword')],
- "Confirm new password doesn't match with new password"
- ),
- }),
- onSubmit: ({ oldPassword, newPassword }) =>
- updateUserPassword({
- variables: {
- id: currentUser?.id!,
- password: { oldPassword, newPassword },
- },
- }),
- });
-
- const [deleteUser] = useMutation<
- DeleteUserMutation,
- DeleteUserMutationVariables
- >(DELETE_USER, {
- onCompleted() {
- localStorage.removeItem('token');
- tokenVar(undefined);
- userVar(undefined);
- roleVar(undefined);
- setDeleteAccountModal(false);
- navigate('/signup');
- },
- onError({ graphQLErrors }) {
- setDeleteAccountModal(false);
- setError(graphQLErrors[0]?.extensions?.info as string);
- setTimeout(() => setError(''), 3000);
- },
- });
-
- const deleteAccountForm = useFormik({
- initialValues: {
- password: '',
- },
- validationSchema: Yup.object().shape({
- password: Yup.string()
- .required('Password is required')
- .min(6, 'Password is 6 characters minimum'),
- }),
- onSubmit: ({ password }, { resetForm }) => {
- try {
- deleteUser({ variables: { id: currentUser?.id!, password } });
- } finally {
- resetForm();
- }
- },
- });
-
- return (
-
-
-
-
-
- }
- color={role || 'client'}
- text='General'
- selected={selectedSection === 'general'}
- onClick={() => setSelectedSection('general')}
- />
- }
- color={role || 'client'}
- text='Security'
- selected={selectedSection === 'security'}
- onClick={() => setSelectedSection('security')}
- />
-
-
-
-
- {selectedSection === 'general' ? 'General' : 'Security'}
-
- {error && }
- {success && (
-
- )}
-
- {selectedSection === 'general' && (
- <>
- {!countryCodesLoading ? (
-
- ) : (
-
-
-
- )}
- >
- )}
- {selectedSection === 'security' && (
- <>
- {deleteAccountModal && (
- setDeleteAccountModal(false)}
- onConfirm={deleteAccountForm.handleSubmit}
- >
-
-
- )}
-
- >
- )}
-
-
-
- );
-};
-
-export default Settings;
diff --git a/src/pages/Settings/styles.ts b/src/pages/Settings/styles.ts
deleted file mode 100644
index a1193e9..0000000
--- a/src/pages/Settings/styles.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import styled from 'styled-components';
-
-export const Wrapper = styled.div`
- padding: 35px 45px 35px 120px;
-`;
diff --git a/src/pages/Support/index.tsx b/src/pages/Support/index.tsx
deleted file mode 100644
index 005cdc4..0000000
--- a/src/pages/Support/index.tsx
+++ /dev/null
@@ -1,329 +0,0 @@
-import * as Yup from 'yup';
-import { useFormik } from 'formik';
-import { useParams, useNavigate } from 'react-router-dom';
-import { useReactiveVar } from '@apollo/client';
-import { useState, useEffect } from 'react';
-import { roleVar, userVar } from '../../graphql/state';
-import { Wrapper } from './styles';
-import {
- CreateThreadMutation,
- CreateThreadMutationVariables,
- GetThreadByIdQuery,
- GetThreadByIdQueryVariables,
- MessagesQuery,
- MessagesQueryVariables,
- MessagesSubscription,
- SendMsgMutation,
- SendMsgMutationVariables,
- Support as SupportType,
- UserMessages,
-} from '../../graphql/types.support';
-import { Box, Button, Input, TextArea, Text } from '../../components';
-import { Send, ThreadClient, ThreadProductOwner } from '../../assets';
-import {
- CREATE_THREAD,
- GET_THREAD_BY_ID,
- MESSAGES,
- MESSAGES_SUBSCRIPTION,
- SEND_MSG,
-} from '../../graphql/chat.api.support';
-import { theme } from '../../themes';
-import { clientSupport } from '../..';
-
-const Support = () => {
- const { projectId, threadId } = useParams<{ projectId: string, threadId: string }>();
- const role = useReactiveVar(roleVar);
- const currentUser = useReactiveVar(userVar);
- const navigate = useNavigate();
- const [thread, setThread] = useState();
- const [messages, setMessages] = useState>([]);
- const [addedMessages, setAddedMessages] = useState>([]);
-
- useEffect(() => {
- (async () => {
- if (threadId) {
- const threadResult = await clientSupport.query<
- GetThreadByIdQuery,
- GetThreadByIdQueryVariables
- >({
- query: GET_THREAD_BY_ID,
- variables: {
- threadId: threadId!,
- },
- });
-
- setThread(threadResult?.data?.thread);
-
- const messagesResult = await clientSupport.query<
- MessagesQuery,
- MessagesQueryVariables
- >({
- query: MESSAGES,
- variables: {
- threadId: threadId!,
- }
- });
- setMessages(
- Array.from(messagesResult?.data?.messages).map(
- (message: UserMessages) => ({
- text: message.text,
- username: message.username,
- id: message.id,
- })
- )
- );
-
- clientSupport.subscribe<
- MessagesSubscription
- >({
- query: MESSAGES_SUBSCRIPTION,
- }).subscribe(({ data }) => {
- setAddedMessages((prevMessages) => [
- ...prevMessages,
- {
- id: data?.messages?.userMessages?.id!,
- username: data?.messages?.userMessages?.username!,
- text: data?.messages?.userMessages?.text!,
- },
- ]);
- });
- }
- })();
- }, [threadId]);
-
- const createThreadForm = useFormik({
- initialValues: {
- title: '',
- description: '',
- },
- validationSchema: Yup.object().shape({
- title: Yup.string().required('Title is required'),
- description: Yup.string().required('Description is required'),
- }),
- onSubmit: async ({ title, description }) => {
- const createdThread = await clientSupport.mutate<
- CreateThreadMutation,
- CreateThreadMutationVariables
- >({
- mutation: CREATE_THREAD,
- variables: {
- projectId: projectId as string,
- title,
- threadDescription: description,
- },
- });
- navigate(`/support/${projectId}/${createdThread.data?.createThread.id}`);
- },
- });
-
- const sendMsgForm = useFormik({
- initialValues: {
- msg: '',
- },
- validationSchema: Yup.object().shape({
- msg: Yup.string().required('Message is required'),
- }),
- onSubmit: async ({ msg }, { resetForm }) => {
- await clientSupport.mutate({
- mutation: SEND_MSG,
- variables: {
- threadId: threadId as string,
- username: `${currentUser?.firstName} ${currentUser?.lastName}`,
- text: msg,
- },
- });
- resetForm();
- },
- });
-
- return (
-
-
- {!thread ? (
- <>
-
- {role === 'client' ? : }
-
-
- >
- ) : (
- <>
-
-
-
- {thread.title}
-
-
- {thread.threadDescription}
-
-
- {messages.map((msg) => (
-
-
- {msg.text}
-
-
- ))}
- {addedMessages.map((msg) => (
-
-
- {msg.text}
-
-
- ))}
-
-
- >
- )}
-
-
- );
-};
-
-export default Support;
diff --git a/src/pages/Support/styles.ts b/src/pages/Support/styles.ts
deleted file mode 100644
index e210012..0000000
--- a/src/pages/Support/styles.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import styled from 'styled-components';
-
-type WrapperProps = {
- color?: 'client' | 'productOwner' | 'developer' | 'admin';
-};
-
-export const Wrapper = styled.div``;
diff --git a/src/pages/Template/index.tsx b/src/pages/Template/index.tsx
deleted file mode 100644
index 7a6c6e4..0000000
--- a/src/pages/Template/index.tsx
+++ /dev/null
@@ -1,252 +0,0 @@
-import { useReactToPrint } from 'react-to-print';
-import { useEffect, useState, useRef } from 'react';
-import { useLazyQuery, useReactiveVar } from '@apollo/client';
-import { Navigate } from 'react-router';
-import { useNavigate, useParams } from 'react-router-dom';
-import { roleVar } from '../../graphql/state';
-import { Design, Empty, Settings, Specification } from '../../assets';
-import {
- Box,
- Button,
- FeatureCard,
- Text,
- Spinner,
- Link,
- Specification as SpecificationPrint,
- Chip,
-} from '../../components';
-import { Wrapper } from './styles';
-import {
- CategoryOutput,
- GetAllTemplatesQuery,
- GetAllTemplatesQueryVariables,
- GetCategoryByIdQuery,
- GetCategoryByIdQueryVariables,
- GetTemplateByIdQuery,
- GetTemplateByIdQueryVariables,
- TemplateOutput,
-} from '../../graphql/types';
-import {
- GET_ALL_TEMPLATES,
- GET_TEMPLATE_BY_ID,
-} from '../../graphql/template.api';
-import { GET_CATEGORY_BY_ID } from '../../graphql/category.api';
-
-const Template = () => {
- const role = useReactiveVar(roleVar);
- const navigate = useNavigate();
- const printRef = useRef(null);
- const { id } = useParams<{ id: string }>();
- const [template, setTemplate] = useState();
- const [category, setCategory] = useState();
-
- const [getCategory, { loading: categoryLoading, error: categoryError }] = useLazyQuery<
- GetCategoryByIdQuery,
- GetCategoryByIdQueryVariables
- >(GET_CATEGORY_BY_ID, {
- onCompleted({ getCategoryById }) {
- setCategory(getCategoryById);
- }
- });
-
- const [getTemplates, { loading: templatesLoading, error: templatesError }] = useLazyQuery<
- GetAllTemplatesQuery,
- GetAllTemplatesQueryVariables
- >(GET_ALL_TEMPLATES, {
- onCompleted({ getAllTemplates }) {
- if (getAllTemplates.length > 0) {
- setTemplate(getAllTemplates[0]);
- getCategory({ variables: { id: getAllTemplates[0]?.category! } });
- }
- }
- });
-
- const [getTemplate, { loading: templateLoading, error: templateError }] = useLazyQuery<
- GetTemplateByIdQuery,
- GetTemplateByIdQueryVariables
- >(GET_TEMPLATE_BY_ID, {
- onCompleted({ getTemplateById }) {
- setTemplate(getTemplateById);
- getCategory({ variables: { id: getTemplateById?.category! } });
- }
- });
-
- useEffect(() => {
- if (id) {
- getTemplate({ variables: { id } });
- } else {
- getTemplates();
- }
-
- return () => {
- setTemplate(undefined);
- setCategory(undefined);
- };
- }, [id]);
-
- const handlePrint = useReactToPrint({
- content: () => printRef.current,
- });
-
- if (role !== 'productOwner' && role !== 'developer') return (
- <>
- {role === 'admin' && }
- {role === 'client' && }
- >
- );
-
- if (templatesLoading || templateLoading || categoryLoading) return (
-
- );
-
- if (templatesError || templateError || categoryError || !template) return (
-
-
-
-