From c5d9f5c6d68ea8f73db00b4c95d3767349618efc Mon Sep 17 00:00:00 2001 From: Olek <149747215+Primis1@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:52:14 -0400 Subject: [PATCH 01/19] add init forms --- .../ui/profile-my-projects-page.tsx | 9 ++- src/utils/constants.ts | 8 ++- .../ui/manage-project-setting.module.scss | 51 ++++++++++++++++ .../ui/manage-project-setting.tsx | 60 +++++++++++++++++++ .../manage-specialist.specialist.module.scss | 19 ++++++ .../ui/manage-specialists.tsx | 8 +++ 6 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 src/widgets/managa-project-settings/ui/manage-project-setting.module.scss create mode 100644 src/widgets/managa-project-settings/ui/manage-project-setting.tsx create mode 100644 src/widgets/manage-specialists/ui/manage-specialist.specialist.module.scss create mode 100644 src/widgets/manage-specialists/ui/manage-specialists.tsx diff --git a/src/pages/profile-my-projects-page/ui/profile-my-projects-page.tsx b/src/pages/profile-my-projects-page/ui/profile-my-projects-page.tsx index e7bd60e7..ca7d7ba4 100644 --- a/src/pages/profile-my-projects-page/ui/profile-my-projects-page.tsx +++ b/src/pages/profile-my-projects-page/ui/profile-my-projects-page.tsx @@ -1,9 +1,12 @@ +import { ManageProjectsSetting } from '@/widgets/managa-project-settings/ui/manage-project-setting'; +import { ManageSpecialists } from '@/widgets/manage-specialists/ui/manage-specialists'; import React from 'react'; export const ProfileMyProjectsPage = () => { return ( -
-
Мои проекты
-
+ <> + + + ); }; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 5592a7d4..c3f5c128 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -17,6 +17,12 @@ export const EMPLOYMENT = [ }, ]; +export const DEVELOPING = [ + { id: 1, field: 'Desktop' }, + { id: 2, field: 'Mobile' }, + { id: 3, field: 'Web' }, +]; + export const LEVEL = [ { label: 'Junior', @@ -49,4 +55,4 @@ export const CONTACTS = [ label: 'phone', value: 'phone', }, -]; \ No newline at end of file +]; diff --git a/src/widgets/managa-project-settings/ui/manage-project-setting.module.scss b/src/widgets/managa-project-settings/ui/manage-project-setting.module.scss new file mode 100644 index 00000000..59fc4aa8 --- /dev/null +++ b/src/widgets/managa-project-settings/ui/manage-project-setting.module.scss @@ -0,0 +1,51 @@ +@import '@/shared/style/variables'; + +.container { + display: flex; + flex-direction: column; + align-items: flex-start; + row-gap: 20px; + width: 816px; + padding: 32px; + background-color: $--bg-primary; + border: 1px solid $--border-default; + border-radius: 12px; + + @media screen and (max-width: 779px) { + gap: 13px; + max-width: 779px; + } +} + +.input_list { + width: 100%; + display: flex; + flex-direction: column; + gap: 8px; + + &_title { + margin: 0; + font-family: $--open-sans-font; + font-weight: 700; + font-size: 16px; + font-style: normal; + line-height: 150%; + } +} +.directions, +.employment { + width: 100%; + + &_list { + width: 100%; + padding: 0; + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 18px; + } + + &_item { + list-style: none; + padding: 0; + } +} diff --git a/src/widgets/managa-project-settings/ui/manage-project-setting.tsx b/src/widgets/managa-project-settings/ui/manage-project-setting.tsx new file mode 100644 index 00000000..4d3fbb0f --- /dev/null +++ b/src/widgets/managa-project-settings/ui/manage-project-setting.tsx @@ -0,0 +1,60 @@ +'use client'; +import React from 'react'; +import styles from './manage-project-setting.module.scss'; +import { CheckboxAndRadio, Form, Input } from '@/shared/ui'; +import { TextEditor } from '@/shared/ui/text-editor/text-editor'; +import { DEVELOPING, EMPLOYMENT} from '@/utils/constants'; + +export const ManageProjectsSetting = () => { + return ( +
+
+ + +
+ +
+

Направление разработки

+
    + {DEVELOPING?.map((profession) => ( +
  • + +
  • + ))} +
+
+ +
+

Занятость

+
    + {EMPLOYMENT.map((busyness) => ( +
  • + +
  • + ))} +
+
+
+ ); +}; diff --git a/src/widgets/manage-specialists/ui/manage-specialist.specialist.module.scss b/src/widgets/manage-specialists/ui/manage-specialist.specialist.module.scss new file mode 100644 index 00000000..45d76872 --- /dev/null +++ b/src/widgets/manage-specialists/ui/manage-specialist.specialist.module.scss @@ -0,0 +1,19 @@ +@import '@/shared/style/variables'; + +.container { + display: flex; + flex-direction: column; + align-items: flex-start; + row-gap: 20px; + width: 816px; + padding: 32px; + background-color: $--bg-primary; + border: 1px solid $--border-default; + border-radius: 12px; + + @media screen and (max-width: 779px) { + gap: 13px; + max-width: 779px; + } +} + diff --git a/src/widgets/manage-specialists/ui/manage-specialists.tsx b/src/widgets/manage-specialists/ui/manage-specialists.tsx new file mode 100644 index 00000000..81d4ccfa --- /dev/null +++ b/src/widgets/manage-specialists/ui/manage-specialists.tsx @@ -0,0 +1,8 @@ +'use client'; +import React from 'react'; +import styles from './manage-specialist.specialist.module.scss'; +import { Form } from '@/shared/ui'; + +export const ManageSpecialists = () => { + return
<>
; +}; From af6c95992a13daca00a6268a039bbad8eeeb4771 Mon Sep 17 00:00:00 2001 From: Olek <149747215+Primis1@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:54:17 -0400 Subject: [PATCH 02/19] add: managa project settings form layout, fix: specialist detailed card --- .../ui/manage-project-setting.module.scss | 81 ++++++++++ .../ui/manage-project-setting.tsx | 153 +++++++++++++----- .../specialist-card/ui/specialist-card.tsx | 34 ++-- .../ui/detailed-specialist-card.tsx | 4 +- 4 files changed, 211 insertions(+), 61 deletions(-) diff --git a/src/widgets/managa-project-settings/ui/manage-project-setting.module.scss b/src/widgets/managa-project-settings/ui/manage-project-setting.module.scss index 59fc4aa8..7460035a 100644 --- a/src/widgets/managa-project-settings/ui/manage-project-setting.module.scss +++ b/src/widgets/managa-project-settings/ui/manage-project-setting.module.scss @@ -1,3 +1,4 @@ +@import '@/shared/assets/fonts/fonts.css'; @import '@/shared/style/variables'; .container { @@ -32,6 +33,17 @@ line-height: 150%; } } + +.input_extra { + width: 100%; + display: flex; + flex-direction: column; + gap: 8px; + font-family: $--open-sans-font; + font-weight: 700; + margin-top: 8px; +} + .directions, .employment { width: 100%; @@ -49,3 +61,72 @@ padding: 0; } } + +.specialists { + width: 100%; + font-family: $--open-sans-font; + font-weight: 400; + display: flex; + flex-direction: column; + gap: 24px; + + &_toggle { + display: flex; + gap: 16px; + align-items: center; + } + + &_buttons { + display: flex; + justify-content: space-between; + align-items: center; + + margin-bottom: 32px; + } +} + +.dates { + width: 100%; + display: flex; + flex-direction: column; + gap: 8px; + + &_inputs { + // margin: 0 0 16px 0; + display: flex; + gap: 8px; + } + + &_input { + width: 100%; + } + + &_text { + margin: 0 0 8px 0; + font-family: $--open-sans-font; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; /* 150% */ + letter-spacing: 0.25px; + } +} + +.contacts { + width: 100%; + display: flex; + flex-direction: column; + gap: 8px; + + &_selects { + display: grid; + gap: 8px; + grid-template-columns: 228px auto; + height: 70px; + } +} + +.buttons { + display: flex; + gap: 16px; +} diff --git a/src/widgets/managa-project-settings/ui/manage-project-setting.tsx b/src/widgets/managa-project-settings/ui/manage-project-setting.tsx index 4d3fbb0f..c36910d8 100644 --- a/src/widgets/managa-project-settings/ui/manage-project-setting.tsx +++ b/src/widgets/managa-project-settings/ui/manage-project-setting.tsx @@ -1,59 +1,128 @@ 'use client'; import React from 'react'; import styles from './manage-project-setting.module.scss'; -import { CheckboxAndRadio, Form, Input } from '@/shared/ui'; +import { CheckboxAndRadio, Form, Input, MainButton } from '@/shared/ui'; import { TextEditor } from '@/shared/ui/text-editor/text-editor'; -import { DEVELOPING, EMPLOYMENT} from '@/utils/constants'; +import { CONTACTS, DEVELOPING, EMPLOYMENT } from '@/utils/constants'; +import { DatePickerRHF } from '@/shared/ui/date-picker-rhf/date-picker-rhf'; +import { useForm } from 'react-hook-form'; +import { SingleSelectInput } from '@/shared/ui/single-select-input/single-select-input'; +import { Plus } from 'lucide-react'; export const ManageProjectsSetting = () => { + const { control } = useForm(); return (
-
+
+
+ + +
+ +
+

Направление разработки

+
    + {DEVELOPING?.map((profession) => ( +
  • + +
  • + ))} +
+
+ +
+

Занятость

+
    + {EMPLOYMENT.map((busyness) => ( +
  • + +
  • + ))} +
+
+
+

Сроки проекты

+
+
+

Начало

+ +
+
+

Окончание

+ +
+
+
+ +
+

Контакты для связи

+
+ {}} + options={CONTACTS} + description={'Выберите ресурс'} + /> + +
+
+ +
+ ({})}> + Добавить + + ({})}> + Сбросить + +
+ - -
-
-

Направление разработки

-
    - {DEVELOPING?.map((profession) => ( -
  • - -
  • - ))} -
-
+ + {'Очистить'} + -
-

Занятость

-
    - {EMPLOYMENT.map((busyness) => ( -
  • - -
  • - ))} -
+
+ + {'Опубликовать'} + + + {'Сохранить как черновик'} + +
); diff --git a/src/widgets/specialist-card/ui/specialist-card.tsx b/src/widgets/specialist-card/ui/specialist-card.tsx index aedade26..2cebc8a6 100644 --- a/src/widgets/specialist-card/ui/specialist-card.tsx +++ b/src/widgets/specialist-card/ui/specialist-card.tsx @@ -64,15 +64,15 @@ export const SpecialistCard: FC = ({ )}
- +
{specialists[1] && @@ -87,14 +87,14 @@ export const SpecialistCard: FC = ({
+ {specialists[1]?.skills?.map((skill) => { + return ( +
  • + {skill.name} +
  • + ); + })} + diff --git a/src/widgets/specialist-detailed-card/ui/detailed-specialist-card.tsx b/src/widgets/specialist-detailed-card/ui/detailed-specialist-card.tsx index 8acc8702..c2fd4795 100644 --- a/src/widgets/specialist-detailed-card/ui/detailed-specialist-card.tsx +++ b/src/widgets/specialist-detailed-card/ui/detailed-specialist-card.tsx @@ -121,7 +121,7 @@ export const DetailedSpecialistCard: FC = ({ )} -