@imj_media/tareas 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.template +8 -0
- package/.storybook/main.ts +26 -0
- package/.storybook/preview.ts +15 -0
- package/LICENSE.md +21 -0
- package/README.md +50 -0
- package/core/actions/get_all_users.action.ts +16 -0
- package/core/actions/get_salesman_response.action.ts +16 -0
- package/core/actions/get_tasks_project.action.ts +62 -0
- package/core/actions/get_tasks_response.action.ts +56 -0
- package/eslint.config.js +28 -0
- package/global.d.ts +3 -0
- package/infraestructure/interfaces/salesmans-obp-response.ts +43 -0
- package/infraestructure/interfaces/salesmans-obp.ts +4 -0
- package/infraestructure/interfaces/tasks-campania-response.ts +118 -0
- package/infraestructure/interfaces/tasks-campania.ts +26 -0
- package/infraestructure/interfaces/tasks-kanban-general.ts +25 -0
- package/infraestructure/interfaces/tasks-reponse.ts +111 -0
- package/infraestructure/interfaces/teams-response.ts +7 -0
- package/infraestructure/interfaces/teams.ts +5 -0
- package/infraestructure/interfaces/users-obp-response.ts +52 -0
- package/infraestructure/interfaces/users.ts +5 -0
- package/infraestructure/mappers/all-users-obp.ts +12 -0
- package/infraestructure/mappers/campaign-tasks.ts +35 -0
- package/infraestructure/mappers/kanban-tasks.ts +35 -0
- package/infraestructure/mappers/salesmans-obp.ts +11 -0
- package/infraestructure/mappers/teams.ts +12 -0
- package/package.json +61 -0
- package/postcss.config.js +6 -0
- package/src/components/atoms/Avatar.tsx +14 -0
- package/src/components/atoms/Comment.tsx +33 -0
- package/src/components/atoms/InputSearch.tsx +40 -0
- package/src/components/atoms/SkeletonCard.tsx +17 -0
- package/src/components/atoms/TabButton.tsx +16 -0
- package/src/components/atoms/TooltipUser.tsx +26 -0
- package/src/components/atoms/index.ts +2 -0
- package/src/components/index.ts +3 -0
- package/src/components/kanban-campania/DoneBoard.tsx +12 -0
- package/src/components/kanban-campania/KanbanCampania.tsx +39 -0
- package/src/components/kanban-campania/ToDoBoard.tsx +12 -0
- package/src/components/kanban-campania/WorkingBoard.tsx +13 -0
- package/src/components/kanban-campania/filters.ts +46 -0
- package/src/components/kanban-campania/index.ts +3 -0
- package/src/components/kanban-general/DoneBoard.tsx +12 -0
- package/src/components/kanban-general/KanbanGeneral.tsx +40 -0
- package/src/components/kanban-general/ToDoBoard.tsx +12 -0
- package/src/components/kanban-general/WorkingBoard.tsx +13 -0
- package/src/components/kanban-general/filters.ts +58 -0
- package/src/components/kanban-general/index.ts +3 -0
- package/src/components/layout/FilterButton.tsx +50 -0
- package/src/components/layout/FilterContent.tsx +70 -0
- package/src/components/layout/IndexComponents.tsx +32 -0
- package/src/components/lista-campania/ChildTask.tsx +22 -0
- package/src/components/lista-campania/Date.tsx +30 -0
- package/src/components/lista-campania/ListaCampania.tsx +21 -0
- package/src/components/lista-campania/ParentTask.tsx +57 -0
- package/src/components/molecules/AllComments.tsx +78 -0
- package/src/components/molecules/ButtonAssignUsers.tsx +175 -0
- package/src/components/molecules/DependentTasks.tsx +64 -0
- package/src/components/molecules/Tabs.tsx +39 -0
- package/src/components/molecules/index.ts +1 -0
- package/src/components/organisms/Board.tsx +87 -0
- package/src/components/organisms/Checkbox.tsx +45 -0
- package/src/components/organisms/DetailsTask.tsx +286 -0
- package/src/components/organisms/TabDetailsTask.tsx +39 -0
- package/src/components/organisms/Task.tsx +176 -0
- package/src/components/organisms/index.ts +2 -0
- package/src/components/tasks/PriorityButton.tsx +79 -0
- package/src/components/templates/Layout.tsx +84 -0
- package/src/components/templates/TableList/components/TableList.scss +270 -0
- package/src/components/templates/TableList/components/TableList.tsx +239 -0
- package/src/components/templates/TableList/components/index.tsx +1 -0
- package/src/constants/colors.ts +64 -0
- package/src/constants/gaps.ts +8 -0
- package/src/constants/paddings.ts +8 -0
- package/src/constants/shadows.ts +5 -0
- package/src/context/filtersLayout.context.tsx +118 -0
- package/src/context/kanbanCampania.context.tsx +50 -0
- package/src/context/useApis.context.tsx +47 -0
- package/src/context/userLog.context.tsx +50 -0
- package/src/env.d.ts +10 -0
- package/src/functions/taskCalculations.tsx +818 -0
- package/src/hooks/useAllUsers.ts +18 -0
- package/src/hooks/useCheckTask.tsx +15 -0
- package/src/hooks/useComerciales.ts +58 -0
- package/src/hooks/useDoneTasks.ts +90 -0
- package/src/hooks/useElementPosition.ts +34 -0
- package/src/hooks/useFunctionsTasks.ts +57 -0
- package/src/hooks/useNormalizedData.ts +36 -0
- package/src/hooks/useTeams.ts +19 -0
- package/src/hooks/useToDoTasks.ts +89 -0
- package/src/hooks/useWorkingTasks.ts +85 -0
- package/src/index.css +55 -0
- package/src/index.ts +2 -0
- package/src/index.tsx +1 -0
- package/src/pages/App.tsx +42 -0
- package/src/pages/NoAccessToken.tsx +20 -0
- package/src/pages/NoUser.tsx +20 -0
- package/src/stories/AppTasks.stories.tsx +36 -0
- package/src/stories/Table.stories.tsx +160 -0
- package/src/types/index.ts +107 -0
- package/src/types/interfaces.ts +67 -0
- package/src/types/layout.types.ts +30 -0
- package/src/utils/filters.functions.ts +17 -0
- package/src/utils/formats.ts +33 -0
- package/src/utils/functionsStorybook.tsx +0 -0
- package/src/utils/inputs.functions.ts +25 -0
- package/src/utils/tanstack.functions.ts +19 -0
- package/src/utils/utils.ts +12 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +31 -0
- package/tsconfig.app.json +26 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +24 -0
- package/vite.config.ts +16 -0
package/.env.template
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { join, dirname } from 'path';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This function is used to resolve the absolute path of a package.
|
|
7
|
+
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
|
|
8
|
+
*/
|
|
9
|
+
function getAbsolutePath(value: string): any {
|
|
10
|
+
return dirname(require.resolve(join(value, 'package.json')));
|
|
11
|
+
}
|
|
12
|
+
const config: StorybookConfig = {
|
|
13
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
14
|
+
addons: [
|
|
15
|
+
getAbsolutePath('@storybook/addon-onboarding'),
|
|
16
|
+
getAbsolutePath('@storybook/addon-essentials'),
|
|
17
|
+
getAbsolutePath('@chromatic-com/storybook'),
|
|
18
|
+
getAbsolutePath('@storybook/addon-interactions'),
|
|
19
|
+
getAbsolutePath("@storybook/addon-styling-webpack")
|
|
20
|
+
],
|
|
21
|
+
framework: {
|
|
22
|
+
name: getAbsolutePath('@storybook/react-vite'),
|
|
23
|
+
options: {},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export default config;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Preview } from '@storybook/react';
|
|
2
|
+
import '../src/index.css';
|
|
3
|
+
|
|
4
|
+
const preview: Preview = {
|
|
5
|
+
parameters: {
|
|
6
|
+
controls: {
|
|
7
|
+
matchers: {
|
|
8
|
+
color: /(background|color)$/i,
|
|
9
|
+
date: /Date$/i,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default preview;
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present IMJ MEDIA
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
13
|
+
|
|
14
|
+
- Configure the top-level `parserOptions` property like this:
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
export default tseslint.config({
|
|
18
|
+
languageOptions: {
|
|
19
|
+
// other options...
|
|
20
|
+
parserOptions: {
|
|
21
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
22
|
+
tsconfigRootDir: import.meta.dirname,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
|
|
29
|
+
- Optionally add `...tseslint.configs.stylisticTypeChecked`
|
|
30
|
+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
// eslint.config.js
|
|
34
|
+
import react from 'eslint-plugin-react'
|
|
35
|
+
|
|
36
|
+
export default tseslint.config({
|
|
37
|
+
// Set the react version
|
|
38
|
+
settings: { react: { version: '18.3' } },
|
|
39
|
+
plugins: {
|
|
40
|
+
// Add the react plugin
|
|
41
|
+
react,
|
|
42
|
+
},
|
|
43
|
+
rules: {
|
|
44
|
+
// other rules...
|
|
45
|
+
// Enable its recommended rules
|
|
46
|
+
...react.configs.recommended.rules,
|
|
47
|
+
...react.configs['jsx-runtime'].rules,
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { normalizeData } from "../../src/hooks/useNormalizedData";
|
|
3
|
+
import { IAllUsersOBPResponse } from "../../infraestructure/interfaces/users-obp-response";
|
|
4
|
+
import { IUsers } from "../../infraestructure/interfaces/users";
|
|
5
|
+
import { AllUsersOBPMapper } from "../../infraestructure/mappers/all-users-obp";
|
|
6
|
+
export const getAllUSersResponse = async ({tasks_api}:{tasks_api:AxiosInstance}): Promise<IUsers[]> =>{
|
|
7
|
+
try{
|
|
8
|
+
const response:{ data: IAllUsersOBPResponse[] } = await tasks_api.get("/api/allOBPUsers");
|
|
9
|
+
const data = normalizeData(response.data)
|
|
10
|
+
|
|
11
|
+
return data.map(AllUsersOBPMapper.toUsers);
|
|
12
|
+
}catch(error){
|
|
13
|
+
console.log("Error al obtener los usuarios comerciales", error)
|
|
14
|
+
throw `Error al obtener los usuarios comerciales: ${error}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { SalesmanUsersMapper } from "../../infraestructure/mappers/salesmans-obp";
|
|
3
|
+
import { ISalesmanUsers } from "../../infraestructure/interfaces/salesmans-obp";
|
|
4
|
+
import { normalizeData } from "../../src/hooks/useNormalizedData";
|
|
5
|
+
|
|
6
|
+
export const getSalesmanUsersResponse = async ({tasks_api}:{tasks_api:AxiosInstance}): Promise<ISalesmanUsers[]> =>{
|
|
7
|
+
try{
|
|
8
|
+
const response = await tasks_api.get("/api/obtener-comerciales");
|
|
9
|
+
const data = normalizeData(response.data)
|
|
10
|
+
|
|
11
|
+
return data.map(SalesmanUsersMapper.toSalesmanUsers) as ISalesmanUsers[];
|
|
12
|
+
}catch(error){
|
|
13
|
+
console.log("Error al obtener los usuarios comerciales", error)
|
|
14
|
+
throw `Error al obtener los usuarios comerciales: ${error}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { normalizeData } from "../../src/hooks/useNormalizedData";
|
|
2
|
+
import { CampaignTasksMapper } from "../../infraestructure/mappers/campaign-tasks";
|
|
3
|
+
import { AxiosInstance } from "axios";
|
|
4
|
+
export interface IFilters {
|
|
5
|
+
owner: IOwner;
|
|
6
|
+
taskName?: string;
|
|
7
|
+
difficulty?: TDifficulty;
|
|
8
|
+
priority?: TPriority;
|
|
9
|
+
dependency?: IDependency;
|
|
10
|
+
status?: TStatus;
|
|
11
|
+
project?: IProject;
|
|
12
|
+
salesman?: ISalesman;
|
|
13
|
+
pagination?: IPagination;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface IOwner {
|
|
17
|
+
user: number;
|
|
18
|
+
config?: TConfigs;
|
|
19
|
+
}
|
|
20
|
+
interface IProject {
|
|
21
|
+
id?: number;
|
|
22
|
+
name?: string;
|
|
23
|
+
}
|
|
24
|
+
interface ISalesman {
|
|
25
|
+
id?: number;
|
|
26
|
+
name?: string;
|
|
27
|
+
}
|
|
28
|
+
interface IPagination {
|
|
29
|
+
page?: number;
|
|
30
|
+
pageSize?: number;
|
|
31
|
+
withCount?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface IGetTasksResponse {
|
|
34
|
+
filters: IFilters;
|
|
35
|
+
page?: number;
|
|
36
|
+
limit?: number;
|
|
37
|
+
tasks_api: AxiosInstance;
|
|
38
|
+
project: number;
|
|
39
|
+
}
|
|
40
|
+
type TConfigs = "yo_y_mis_equipos" | "mis_equipos" | "yo";
|
|
41
|
+
type TDifficulty = "Muy facil" | "Facil" | "Media" | "Dificil" | "Muy dificil";
|
|
42
|
+
type TPriority = "Sin prioridad" | "Prioridad Baja" | "Prioridad Media" | "Prioridad Alta";
|
|
43
|
+
type IDependency = "con" | "sin";
|
|
44
|
+
type TStatus = "por_hacer" | "trabajando" | "completadas";
|
|
45
|
+
export const getTasksProject = async ({filters, tasks_api, project}: IGetTasksResponse) => {
|
|
46
|
+
try {
|
|
47
|
+
const response = await tasks_api.get(`/api/listado_tareas`,{
|
|
48
|
+
params:{
|
|
49
|
+
...filters,
|
|
50
|
+
project: {
|
|
51
|
+
id: project
|
|
52
|
+
},
|
|
53
|
+
includeAllTasks:true
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
let data = normalizeData(response.data.tareas)
|
|
57
|
+
|
|
58
|
+
return data.map(CampaignTasksMapper.toCampaignTasks)
|
|
59
|
+
} catch (error) {
|
|
60
|
+
console.log(error)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { normalizeData } from "../../src/hooks/useNormalizedData";
|
|
2
|
+
import { KanbanTasksMapper } from "../../infraestructure/mappers/kanban-tasks";
|
|
3
|
+
import { AxiosInstance } from "axios";
|
|
4
|
+
export interface IFilters {
|
|
5
|
+
owner: IOwner;
|
|
6
|
+
taskName?: string;
|
|
7
|
+
difficulty?: TDifficulty;
|
|
8
|
+
priority?: TPriority;
|
|
9
|
+
dependency?: IDependency;
|
|
10
|
+
status?: TStatus;
|
|
11
|
+
project?: IProject;
|
|
12
|
+
salesman?: ISalesman;
|
|
13
|
+
pagination?: IPagination;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface IOwner {
|
|
17
|
+
user: number;
|
|
18
|
+
config?: TConfigs;
|
|
19
|
+
}
|
|
20
|
+
interface IProject {
|
|
21
|
+
id?: number;
|
|
22
|
+
name?: string;
|
|
23
|
+
}
|
|
24
|
+
interface ISalesman {
|
|
25
|
+
id?: number;
|
|
26
|
+
name?: string;
|
|
27
|
+
}
|
|
28
|
+
interface IPagination {
|
|
29
|
+
page?: number;
|
|
30
|
+
pageSize?: number;
|
|
31
|
+
withCount?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface IGetTasksResponse {
|
|
34
|
+
filters: IFilters;
|
|
35
|
+
page?: number;
|
|
36
|
+
limit?: number;
|
|
37
|
+
tasks_api: AxiosInstance;
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
type TConfigs = "yo_y_mis_equipos" | "mis_equipos" | "yo";
|
|
41
|
+
type TDifficulty = "Muy facil" | "Facil" | "Media" | "Dificil" | "Muy dificil";
|
|
42
|
+
type TPriority = "Sin prioridad" | "Prioridad Baja" | "Prioridad Media" | "Prioridad Alta";
|
|
43
|
+
type IDependency = "con" | "sin";
|
|
44
|
+
type TStatus = "por_hacer" | "trabajando" | "completadas";
|
|
45
|
+
|
|
46
|
+
export const getTasksResponse = async ({filters, tasks_api}: IGetTasksResponse)=>{
|
|
47
|
+
try{
|
|
48
|
+
const response = await tasks_api.get("/api/listado_tareas",{ params: filters })
|
|
49
|
+
const data = response.data.tareas.map(normalizeData);
|
|
50
|
+
|
|
51
|
+
return data.map(KanbanTasksMapper.toKanbanTasks)
|
|
52
|
+
}catch(error){
|
|
53
|
+
console.log({error})
|
|
54
|
+
throw `Error al obtener las tareas: ${error}`;
|
|
55
|
+
}
|
|
56
|
+
}
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{ ignores: ['dist'] },
|
|
9
|
+
{
|
|
10
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
globals: globals.browser,
|
|
15
|
+
},
|
|
16
|
+
plugins: {
|
|
17
|
+
'react-hooks': reactHooks,
|
|
18
|
+
'react-refresh': reactRefresh,
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...reactHooks.configs.recommended.rules,
|
|
22
|
+
'react-refresh/only-export-components': [
|
|
23
|
+
'warn',
|
|
24
|
+
{ allowConstantExport: true },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
)
|
package/global.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface SalesmansOBPResponse {
|
|
2
|
+
id: number;
|
|
3
|
+
nombre: string;
|
|
4
|
+
username: string;
|
|
5
|
+
email: string;
|
|
6
|
+
blocked: boolean;
|
|
7
|
+
siglas: string;
|
|
8
|
+
role: Role;
|
|
9
|
+
imagen: Imagen;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Imagen {
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
formats: Formats;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface Formats {
|
|
19
|
+
large: Large;
|
|
20
|
+
small: Large;
|
|
21
|
+
medium: Large;
|
|
22
|
+
thumbnail: Large;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Large {
|
|
26
|
+
ext: Text;
|
|
27
|
+
url: string;
|
|
28
|
+
hash: string;
|
|
29
|
+
mime: TMime;
|
|
30
|
+
name: string;
|
|
31
|
+
path: string;
|
|
32
|
+
size: number;
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type Text = ".jpg" | ".png";
|
|
38
|
+
export type TMime = "image/jpeg" | "image/png";
|
|
39
|
+
|
|
40
|
+
export interface Role {
|
|
41
|
+
id: number;
|
|
42
|
+
name: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
export interface ITasksCampaignResponse {
|
|
2
|
+
id: number;
|
|
3
|
+
texto_corto: string;
|
|
4
|
+
orden: number;
|
|
5
|
+
prioridad: null;
|
|
6
|
+
estatus: number;
|
|
7
|
+
nivel_dificultad: number;
|
|
8
|
+
cancelada: boolean;
|
|
9
|
+
aprobada: boolean;
|
|
10
|
+
es_pausable: boolean;
|
|
11
|
+
tipo_tarea: number;
|
|
12
|
+
idmedio: null;
|
|
13
|
+
idruta: null;
|
|
14
|
+
idindoor: null;
|
|
15
|
+
idvalla: null;
|
|
16
|
+
finicio: Date;
|
|
17
|
+
ffin: Date;
|
|
18
|
+
fterminada: null;
|
|
19
|
+
fterminada_sup: null;
|
|
20
|
+
repeticiones: null;
|
|
21
|
+
repeticiones_realizadas: null;
|
|
22
|
+
proyecto: Proyecto;
|
|
23
|
+
responsable: Responsable | null;
|
|
24
|
+
equipo: Equipo;
|
|
25
|
+
tarea_padre: TareaPadre;
|
|
26
|
+
tareas: TareaPadre[];
|
|
27
|
+
supervisor: null;
|
|
28
|
+
id_t_requerida: TareaPadre | null;
|
|
29
|
+
created_by: null;
|
|
30
|
+
updated_by: null;
|
|
31
|
+
comentarios: Comentario[];
|
|
32
|
+
nombre_medio: NombreMedio;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface Comentario {
|
|
36
|
+
id: number;
|
|
37
|
+
comentario: string;
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface Equipo {
|
|
42
|
+
id: number;
|
|
43
|
+
nombre: string;
|
|
44
|
+
miembros: Miembro[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface Miembro {
|
|
48
|
+
id: number;
|
|
49
|
+
idUser: Responsable;
|
|
50
|
+
userOBP: UserOBP;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface Responsable {
|
|
54
|
+
id: number;
|
|
55
|
+
nombre: string;
|
|
56
|
+
email: string;
|
|
57
|
+
userOBP?: UserOBP;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
export interface UserOBP {
|
|
64
|
+
id: number;
|
|
65
|
+
nombre: string;
|
|
66
|
+
username: string;
|
|
67
|
+
email: string;
|
|
68
|
+
blocked: boolean;
|
|
69
|
+
siglas: string;
|
|
70
|
+
role: Role;
|
|
71
|
+
imagen: Imagen | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface Imagen {
|
|
75
|
+
id: number;
|
|
76
|
+
name: string;
|
|
77
|
+
formats: Formats;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface Formats {
|
|
81
|
+
large?: Large;
|
|
82
|
+
small: Large;
|
|
83
|
+
medium?: Large;
|
|
84
|
+
thumbnail: Large;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface Large {
|
|
88
|
+
ext: string;
|
|
89
|
+
url: string;
|
|
90
|
+
hash: string;
|
|
91
|
+
mime: string;
|
|
92
|
+
name: string;
|
|
93
|
+
path: null;
|
|
94
|
+
size: number;
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface Role {
|
|
100
|
+
id: number;
|
|
101
|
+
name: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface TareaPadre {
|
|
105
|
+
id: number;
|
|
106
|
+
texto_corto: string;
|
|
107
|
+
estatus: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface NombreMedio {
|
|
111
|
+
nombre: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface Proyecto {
|
|
115
|
+
id: number;
|
|
116
|
+
nombre: string;
|
|
117
|
+
campania: number;
|
|
118
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IUsers } from "./users";
|
|
2
|
+
|
|
3
|
+
export interface ITasksCampaign {
|
|
4
|
+
id: number;
|
|
5
|
+
task: string;
|
|
6
|
+
status: number;
|
|
7
|
+
difficulty: number;
|
|
8
|
+
priority: number ;
|
|
9
|
+
endDate: Date;
|
|
10
|
+
startDate: Date;
|
|
11
|
+
users?: IUsers[];
|
|
12
|
+
repeatsToDo?: number | null;
|
|
13
|
+
repeats?: number | null;
|
|
14
|
+
comments?: number | null;
|
|
15
|
+
willBePaused: boolean;
|
|
16
|
+
statusRequiredTask?: number | null;
|
|
17
|
+
nameRequiredTask?: string | null;
|
|
18
|
+
tasks?: IChildTask[] | null;
|
|
19
|
+
mediumName: string | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IChildTask {
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
status: number;
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IUsers } from "./users";
|
|
2
|
+
|
|
3
|
+
export interface TasksKanbanGeneral {
|
|
4
|
+
id: number;
|
|
5
|
+
task: string;
|
|
6
|
+
status: number;
|
|
7
|
+
priority: number;
|
|
8
|
+
difficulty: number;
|
|
9
|
+
endDate: Date ;
|
|
10
|
+
users: IUsers[];
|
|
11
|
+
statusRequiredTask: number | null;
|
|
12
|
+
nameRequiredTask: string | null;
|
|
13
|
+
willBePaused: boolean;
|
|
14
|
+
nameProject: string | null;
|
|
15
|
+
idProject: number | null;
|
|
16
|
+
comments: number;
|
|
17
|
+
responsible: number | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//* TODO: add comments
|
|
21
|
+
/* interface IComments {
|
|
22
|
+
id:number;
|
|
23
|
+
comment:string;
|
|
24
|
+
user:IUsers;
|
|
25
|
+
} */
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export interface ITasksResponse {
|
|
2
|
+
id: number;
|
|
3
|
+
texto_corto: string;
|
|
4
|
+
orden: number;
|
|
5
|
+
prioridad: null;
|
|
6
|
+
estatus: number;
|
|
7
|
+
nivel_dificultad: number;
|
|
8
|
+
cancelada: boolean;
|
|
9
|
+
aprobada: boolean;
|
|
10
|
+
es_pausable: boolean;
|
|
11
|
+
idmedio: number | null;
|
|
12
|
+
idruta: number | null;
|
|
13
|
+
idindoor: number | null;
|
|
14
|
+
idvalla: null;
|
|
15
|
+
finicio: Date;
|
|
16
|
+
ffin: Date;
|
|
17
|
+
fterminada: null;
|
|
18
|
+
fterminada_sup: null;
|
|
19
|
+
repeticiones: number | null;
|
|
20
|
+
repeticiones_realizadas: null;
|
|
21
|
+
proyecto: Proyecto;
|
|
22
|
+
responsable: Responsable | null;
|
|
23
|
+
equipo: Equipo | null;
|
|
24
|
+
supervisor: null;
|
|
25
|
+
id_t_requerida: IDTRequerida | null;
|
|
26
|
+
ids_t_dependientes: IDTRequerida[];
|
|
27
|
+
created_by: null;
|
|
28
|
+
updated_by: Responsable | null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Equipo {
|
|
32
|
+
id: number;
|
|
33
|
+
nombre: string;
|
|
34
|
+
miembros: Miembro[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Miembro {
|
|
38
|
+
idUser: User;
|
|
39
|
+
userOBP: UserOBP;
|
|
40
|
+
}
|
|
41
|
+
interface User {
|
|
42
|
+
id: number;
|
|
43
|
+
nombre: string;
|
|
44
|
+
email: string;
|
|
45
|
+
}
|
|
46
|
+
interface UserOBP {
|
|
47
|
+
id: number;
|
|
48
|
+
blocked: boolean;
|
|
49
|
+
imagen: Imagen
|
|
50
|
+
nombre: string;
|
|
51
|
+
email: string;
|
|
52
|
+
role: Role;
|
|
53
|
+
siglas: string;
|
|
54
|
+
username: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface Role {
|
|
58
|
+
id: number;
|
|
59
|
+
name: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface Imagen {
|
|
63
|
+
id: number;
|
|
64
|
+
name: string;
|
|
65
|
+
formats:Formats;
|
|
66
|
+
}
|
|
67
|
+
interface Formats {
|
|
68
|
+
large: Format;
|
|
69
|
+
medium: Format;
|
|
70
|
+
small: Format;
|
|
71
|
+
thumbnail: Format;
|
|
72
|
+
}
|
|
73
|
+
interface Format {
|
|
74
|
+
ext: string;
|
|
75
|
+
url: string;
|
|
76
|
+
hash: string;
|
|
77
|
+
mime: string;
|
|
78
|
+
name: string;
|
|
79
|
+
path: null;
|
|
80
|
+
size: number;
|
|
81
|
+
width: number;
|
|
82
|
+
height: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface IDTRequerida {
|
|
86
|
+
id: number;
|
|
87
|
+
texto_corto: string;
|
|
88
|
+
estatus: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface Proyecto {
|
|
92
|
+
id: number;
|
|
93
|
+
nombre: string;
|
|
94
|
+
campania: number;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface Responsable {
|
|
98
|
+
id: number;
|
|
99
|
+
username: string;
|
|
100
|
+
blocked: boolean;
|
|
101
|
+
email: string;
|
|
102
|
+
provider: string;
|
|
103
|
+
password: string;
|
|
104
|
+
resetPasswordToken: null;
|
|
105
|
+
confirmationToken: null;
|
|
106
|
+
confirmed: boolean | null;
|
|
107
|
+
createdAt: Date;
|
|
108
|
+
updatedAt: Date;
|
|
109
|
+
nombre: string;
|
|
110
|
+
userOBP: UserOBP;
|
|
111
|
+
}
|