Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/organizations page #25

Merged
merged 82 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
d0ac23e
fix(app): clean fragments from deps
kirill-ivanovvv Jun 10, 2024
8d67e6a
feat(organizations-page): create page and provide it to layout
kirill-ivanovvv Jun 10, 2024
fe35b58
feat(organizations-page): pseudo
kirill-ivanovvv Jun 10, 2024
5e2a334
fix(org-card-grid): change row height to auto
kirill-ivanovvv Jun 10, 2024
ae63d46
feat(org-page): base layout done; provide components; render some car…
kirill-ivanovvv Jun 10, 2024
661cda2
feat(ui.flex): add gridColumn property
kirill-ivanovvv Jun 10, 2024
e341a0b
feat(global-styles): reset styles (copy from drum-in)
kirill-ivanovvv Jun 10, 2024
f6f736c
fix(theme-selector-fragment): add absolute styles; moved theme switch…
kirill-ivanovvv Jun 11, 2024
192c9b5
feat(theme-switch.component): change theme onClick
kirill-ivanovvv Jun 11, 2024
683cc51
feat(theme): duplicate dark theme; make reducer and context
kirill-ivanovvv Jun 11, 2024
a5cd694
fix(organization-card.fragment): change props and rendering condition…
kirill-ivanovvv Jun 11, 2024
8e3e805
feat(organizations-page): render cards with testData; cards onl, them…
kirill-ivanovvv Jun 11, 2024
57fc324
feat(org-card.fragment): show modals on button; handlers to backdrop
kirill-ivanovvv Jun 11, 2024
79eb482
fix(modal): provide an backdropClick handler on props
kirill-ivanovvv Jun 11, 2024
7d2dfea
fix(add-member-to-organization-modal): provide backdrop handler; orgI…
kirill-ivanovvv Jun 11, 2024
35218aa
fix(users-modal): provide backdrop handler; orgId on props
kirill-ivanovvv Jun 11, 2024
c1aab58
fix(organization-card.fragment): test data props changed
kirill-ivanovvv Jun 11, 2024
a83d779
fix(organizations.page): rename test data obj
kirill-ivanovvv Jun 11, 2024
b893e74
refactor(users-modal.fragment): create member component; remove membe…
kirill-ivanovvv Jun 12, 2024
6cafa99
fix(users-title): prettier just
kirill-ivanovvv Jun 12, 2024
4266fe8
fix(dropdown): zIndex up; layer props fix
kirill-ivanovvv Jun 12, 2024
87e9762
fix(theme): merge dubles; split the color file
kirill-ivanovvv Jun 12, 2024
676e4f2
feat(users-title.fragment): add modal to plus button
kirill-ivanovvv Jun 12, 2024
161b9bd
fix(org-card.fragment): delete console
kirill-ivanovvv Jun 12, 2024
7b7fc26
fix(image): image component backup prev version; current didnt work(
kirill-ivanovvv Jun 12, 2024
b3c1525
feat(baseLayout): create base layout
kirill-ivanovvv Jun 12, 2024
8012fa3
fix(organizations.page): move baseLayout components out
kirill-ivanovvv Jun 12, 2024
e2e2ee9
feat(sidebar): merge alexander component updates
kirill-ivanovvv Jun 12, 2024
c832617
feat(entrypoint): wrap content into layout
kirill-ivanovvv Jun 12, 2024
3cab306
fix(base-layot): remove unused file
kirill-ivanovvv Jun 12, 2024
7b92275
feat(theme) dark/light colors
kirill-ivanovvv Jun 13, 2024
cfa261b
feat(text) add primary and secondary colors; depends on current theme
kirill-ivanovvv Jun 13, 2024
0da7c2c
feat: add dark theme
kirill-ivanovvv Jun 13, 2024
73a212c
feat(icons): add color to props
kirill-ivanovvv Jun 13, 2024
127d001
feat(org-page): add page horizontal paddings;
kirill-ivanovvv Jun 13, 2024
0b27ea9
yarn
kirill-ivanovvv Jun 13, 2024
cf02bed
fix(modals-fragments): button text color to white
kirill-ivanovvv Jun 13, 2024
06b5129
feat(theme): add background color to baseLayout
kirill-ivanovvv Jun 13, 2024
5354dc2
fix(base-layout): move title from org-page to baseLayout
kirill-ivanovvv Jun 13, 2024
022c157
yarn
kirill-ivanovvv Jun 13, 2024
bba67b8
emtpy stages???
kirill-ivanovvv Jun 13, 2024
06fe385
fix: prettier
kirill-ivanovvv Jun 13, 2024
ba4dd14
fix(app-users-modal.fragments): change interface
kirill-ivanovvv Jun 13, 2024
edcee92
fix(org.page): change interfaces; props on component
kirill-ivanovvv Jun 13, 2024
666684c
fix: linter fixes
kirill-ivanovvv Jun 13, 2024
76e50ef
fix(colors.theme): separate colors constant to file
kirill-ivanovvv Jun 13, 2024
ecd3fe4
fix(input): remove unused import
kirill-ivanovvv Jun 13, 2024
064445e
refactor: yarn check
kirill-ivanovvv Jun 13, 2024
2c8f402
fix(entrypoint): change export to default
kirill-ivanovvv Jun 13, 2024
f487031
fix(add-member-to-org-modal): change cyrillyc to locales
kirill-ivanovvv Jun 13, 2024
c21581d
fix(org-card): change && to condition
kirill-ivanovvv Jun 13, 2024
c5ae6fe
fix(select-input): change selected item colors
kirill-ivanovvv Jun 13, 2024
1b4037a
yarn
kirill-ivanovvv Jun 13, 2024
545f665
feat(yarn): add faker
kirill-ivanovvv Jun 14, 2024
498821f
chore(entrypoint): draft rendre organizations page on personal route
kirill-ivanovvv Jun 14, 2024
b8c4490
fix(namespaces): rename @fragments to @app
kirill-ivanovvv Jun 14, 2024
8af007b
feat(theme): add props
kirill-ivanovvv Jun 14, 2024
d1e9432
fix(layout): use theme
kirill-ivanovvv Jun 14, 2024
afce6a2
fix(users-modal): write iterfaces
kirill-ivanovvv Jun 14, 2024
52d5a7e
yarn
kirill-ivanovvv Jun 14, 2024
060aa75
draft(entrypoint): export page, render on route
kirill-ivanovvv Jun 14, 2024
4452449
master merge
kirill-ivanovvv Jun 14, 2024
a47b47f
feat(pages): render registration and organizations page with layout
kirill-ivanovvv Jun 14, 2024
c39dd82
fix: move test data to constants dir; use faker
kirill-ivanovvv Jun 14, 2024
9bf11f4
fix(reg-page): font color
kirill-ivanovvv Jun 14, 2024
f5775c0
fix(app-users-modal.fragments): fix on delete member click interface
kirill-ivanovvv Jun 14, 2024
7686636
fix(org-page): export default
kirill-ivanovvv Jun 14, 2024
7276f43
fix(dropdown): use theme
kirill-ivanovvv Jun 14, 2024
da168c0
yarn
kirill-ivanovvv Jun 14, 2024
647a3e5
fix: delete index from entrypoint
kirill-ivanovvv Jun 14, 2024
42ff8ae
fix(org-card): fix height
kirill-ivanovvv Jun 14, 2024
0a639dc
fix(select-input): add maxWidth prop
kirill-ivanovvv Jun 14, 2024
32840c7
prettier
kirill-ivanovvv Jun 14, 2024
0dd8de1
Merge pull request #28 from atls/fix/select-input-width
kirill-ivanovvv Jun 14, 2024
3dc7ceb
fix(entrypoint): rename management to dashboard
kirill-ivanovvv Jun 17, 2024
19c153b
feat(dashboard-redirect-page): create page
kirill-ivanovvv Jun 17, 2024
8a9dbe7
fix(pages, fragments): move use client to pages and fragments level
kirill-ivanovvv Jun 17, 2024
7d3dd06
yarn
kirill-ivanovvv Jun 17, 2024
2b91979
fix(dashboard): merge pages into group
kirill-ivanovvv Jun 17, 2024
507e944
fix(use client): move directive deep in tree
kirill-ivanovvv Jun 18, 2024
edb7a7d
yarn
kirill-ivanovvv Jun 18, 2024
3128f8a
fix(org-card): image width fix
kirill-ivanovvv Jun 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11,614 changes: 7,566 additions & 4,048 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
6 changes: 4 additions & 2 deletions app/entrypoints/renderer/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
"add-member-modal.invite": "Пригласить",
"add-member-modal_input.invalid-email": "Введите правильный E-mail",
"add-member-to-organization-modal.header": "Добавить сотрудника в организацию",
"add-member-to-organization-modal.teams": "Команды организации",
"add-member-to-organization-modal.button": "Пригласить",
"add-member-to-organization-modal_input.placeholder": "Team member",
"organization-card_member.one": "member",
"organization-card_member.many": "members",
"confirm-deleting-organization.warning": "Вы уверены, что хотите исключить пользователя из данной организации?",
"confirm-deleting-organization.yes": "Да",
"confirm-deleting-organization.no":"Нет",
"confirm-deleting-organization.no": "Нет",
"logo-title": "Team management system",
"notifications-modal.title": "Уведомления",
"notifications-modal.mark-all-read": "Отметить все, как прочитанное",
Expand All @@ -19,4 +21,4 @@
"users-modal.button-remove": "Удалить",
"users-title.title": "Команда",
"registration-page.login-button": "Войти с помощью GitHub"
}
}
9 changes: 6 additions & 3 deletions app/entrypoints/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
"prepack": "run build",
"start": "node dist/src/index.cjs"
},
"dependencies": {
"react-intl": "6.6.8"
},
"devDependencies": {
"@app/base-layout-fragment": "workspace:*",
"@app/dashboard-redirect-page": "workspace:*",
"@app/organizations-page": "workspace:*",
"@app/registration-page": "workspace:*",
"@emotion/react": "11.11.4",
"@types/node": "20.12.12",
Expand All @@ -21,8 +27,5 @@
"react-dom": "18.3.1",
"react-intl": "6.6.8",
"typescript": "5.2.2"
},
"dependencies": {
"react-intl": "6.6.8"
}
}
7 changes: 7 additions & 0 deletions app/entrypoints/renderer/src/app/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'

import { BaseLayout } from '@app/base-layout-fragment'

const Layout = ({ children }) => <BaseLayout>{children}</BaseLayout>

export default Layout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '@app/organizations-page'
7 changes: 1 addition & 6 deletions app/entrypoints/renderer/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
'use client'

import React from 'react'

const Page = () => <>page</>
export default Page
export { default } from '@app/dashboard-redirect-page'
31 changes: 31 additions & 0 deletions app/entrypoints/renderer/src/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { join } from 'path'
import { dirname } from 'path'

import { fileURLToPath } from 'url'

const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

/** @type {import('next').NextConfig} */
export default {
experimental: {
externalDir: true,
outputFileTracingRoot: join(__dirname, './'),
esmExternals: 'loose',
},
compiler: {
styledComponents: true,
},
webpack: (webpackConfig, { webpack }) => {
webpackConfig.plugins.push(
new webpack.NormalModuleReplacementPlugin(new RegExp(/\.js$/), function (
/** @type {{ request: string }} */
resource
) {
resource.request = resource.request.replace('.js', '')
})
)
return webpackConfig
},
output: 'standalone',
}
3 changes: 2 additions & 1 deletion app/entrypoints/renderer/src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
{
"name": "next"
}
]
],
"strictNullChecks": true
},
"include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down
2 changes: 1 addition & 1 deletion app/fragments/add-member-modal/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@fragments/add-member-modal",
"name": "@app/add-member-modal-fragment",
"version": "0.0.1",
"private": true,
"license": "BSD-3-Clause",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import { ThemeType } from '@ui/theme'
import { HandleAddInputClickType } from './add-member-modal.interfaces.js'
import { InputValuesType } from './add-member-modal.interfaces.js'
import { HandlerSwitchType } from './add-member-modal.interfaces.js'
import { TeamMemberModalProps } from './add-member-modal.interfaces.js'
import { AddMemberModalProps } from './add-member-modal.interfaces.js'
import { CheckedSwitchesType } from './add-member-modal.interfaces.js'
import { AddMemberModalInput } from './input/index.js'
import { useButtonActiveHook } from './use-button-active.hook.js'

export const AddMemberModal: FC<TeamMemberModalProps> = memo(({ open }) => {
export const AddMemberModal: FC<AddMemberModalProps> = memo(({ open, onBackdropClick }) => {
const theme = useTheme() as ThemeType

const { formatMessage } = useIntl()
Expand Down Expand Up @@ -57,7 +57,7 @@ export const AddMemberModal: FC<TeamMemberModalProps> = memo(({ open }) => {
}

return (
<Modal open={open} padding={theme.spaces.increased}>
<Modal open={open} padding={theme.spaces.increased} onBackdropClick={onBackdropClick}>
<Column gap={theme.spaces.moderate}>
<Text fontSize='normal.increased'>{formatMessage({ id: 'add-member-modal.header' })}</Text>
{inputValues.map((_inputValue: string, index: number) => (
Expand All @@ -75,7 +75,7 @@ export const AddMemberModal: FC<TeamMemberModalProps> = memo(({ open }) => {
style={{ boxShadow: theme.shadows.black }}
variant='whiteBackgroundButton'
>
<AddIcon />
<AddIcon color={theme.colors.addMemberModal.addIcon} />
</Button>
</Row>
<Row justifyContent='space-between'>
Expand All @@ -98,7 +98,7 @@ export const AddMemberModal: FC<TeamMemberModalProps> = memo(({ open }) => {
variant='blueBackgroundButton'
size='middlingRoundedPadding'
>
<Text fontSize='normal.semiDefault' fontWeight='normal'>
<Text fontSize='normal.semiDefault' fontWeight='normal' color={theme.colors.white}>
{formatMessage({ id: 'add-member-modal.invite' })}
</Text>
</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export interface AddMemberModalProps {
open: boolean
}
export interface TeamMemberModalProps {
open: boolean
onBackdropClick: VoidFunction
}

export type InputValuesType = Array<string>
Expand Down
4 changes: 3 additions & 1 deletion app/fragments/add-member-to-organization-modal/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@fragments/add-member-to-organization-modal",
"name": "@app/add-member-to-organization-modal-fragment",
"version": "0.0.1",
"private": true,
"license": "BSD-3-Clause",
Expand All @@ -16,13 +16,15 @@
},
"devDependencies": {
"@emotion/react": "11.11.4",
"@faker-js/faker": "8.4.1",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-intl": "6.6.8"
},
"peerDependencies": {
"@faker-js/faker": "*",
"react": "*",
"react-dom": "*",
"react-intl": "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Modal } from '@ui/modal'
import { Text } from '@ui/text'
import { ThemeType } from '@ui/theme'

import { USERS_TEST_DATA } from './add-member-to-organization-modal.constants.js'
import { AddMemberToOrganizationModalProps } from './add-member-to-organization-modal.interfaces.js'
import { SelectedUsersType } from './add-member-to-organization-modal.interfaces.js'
import { CheckedSwitchesType } from './add-member-to-organization-modal.interfaces.js'
Expand All @@ -23,6 +24,8 @@ import { useButtonActiveHook } from './use-button-active.hook.js'

export const AddMemberToOrganizationModal: FC<AddMemberToOrganizationModalProps> = memo(({
open,
onBackdropClick,
organizationId,
}) => {
const theme = useTheme() as ThemeType
const { formatMessage } = useIntl()
Expand All @@ -41,34 +44,17 @@ export const AddMemberToOrganizationModal: FC<AddMemberToOrganizationModalProps>

useButtonActiveHook(selectedUsers, checkedSwitches, setButtonActive)

const testUsersData = [
{
id: 1,
primaryInfo: 'test user1',
secondaryInfo: 'testmail1@mail.ru',
imageSrc: 'https://placehold.co/400',
},
{
id: 2,
primaryInfo: 'test user2',
secondaryInfo: 'testmail2@mail.ru',
imageSrc: 'https://placehold.co/400',
},
{
id: 3,
primaryInfo: 'test user3',
},
]
const usersData = USERS_TEST_DATA

return (
<Modal open={open} width={theme.spaces.superPuperExtra}>
<Modal open={open} width={theme.spaces.superPuperExtra} onBackdropClick={onBackdropClick}>
<Column flexDirection='column' gap={theme.spaces.large}>
<Text fontSize='medium.semiReduced' fontWeight='normal' padding={theme.spaces.micro}>
{formatMessage({ id: 'add-member-to-organization-modal.header' })}
</Text>
<SelectInput
placeholder={formatMessage({ id: 'add-member-to-organization-modal_input.placeholder' })}
searchItems={testUsersData}
searchItems={usersData}
parentHook={setSelectedUsers}
/>
<Row
Expand All @@ -79,7 +65,7 @@ export const AddMemberToOrganizationModal: FC<AddMemberToOrganizationModalProps>
rowGap={theme.spaces.large}
>
<Text fontSize='normal.semiIncreased' width='100%'>
Команды организации
{formatMessage({ id: 'add-member-to-organization-modal.teams' })}
</Text>
<TeamSwitch teamName='Design' onChange={(e) => handlerSwitch(e, 'design')} />
<TeamSwitch teamName='Frontend' onChange={(e) => handlerSwitch(e, 'frontend')} />
Expand All @@ -93,8 +79,8 @@ export const AddMemberToOrganizationModal: FC<AddMemberToOrganizationModalProps>
variant='blueBackgroundButton'
size='middlingRoundedPadding'
>
<Text fontSize='normal.semiDefault' fontWeight='normal'>
Пригласить
<Text fontSize='normal.semiDefault' fontWeight='normal' color={theme.colors.white}>
{formatMessage({ id: 'add-member-to-organization-modal.button' })}
</Text>
</Button>
</Row>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { faker } from '@faker-js/faker'

const getUserTestData = () => ({
id: faker.string.uuid(),
primaryInfo: faker.person.fullName(),
secondaryInfo: faker.internet.email(),
imageSrc: faker.image.avatar(),
})

export const USERS_TEST_DATA = Array(5).fill(getUserTestData())
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export interface AddMemberToOrganizationModalProps {
open: boolean
onBackdropClick: VoidFunction
organizationId: number
}

export type SelectedUsersType = Array<number>
Expand Down
26 changes: 13 additions & 13 deletions app/fragments/app-animated-card/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
{
"name": "@app/animated-card",
"version": "0.0.1",
"type": "module",
"private": true,
"main": "src/index.ts",
"type": "module",
"exports": {
".": "./src/index.ts"
},
"peerDependencies": {
"@emotion/react": "*",
"react": "*",
"react-intl": "*"
},
"devDependencies": {
"@emotion/react": "11.11.4",
"@types/react": "^18.3.3",
"@types/react-dom": "18.3.0",
"react-intl": "6.6.8"
},
"main": "src/index.ts",
"dependencies": {
"@ui/button": "workspace:*",
"@ui/card": "workspace:*",
Expand All @@ -27,5 +16,16 @@
"@ui/text": "workspace:0.0.1",
"@ui/theme": "workspace:*",
"framer-motion": "10.16.1"
},
"devDependencies": {
"@emotion/react": "11.11.4",
"@types/react": "^18.3.3",
"@types/react-dom": "18.3.0",
"react-intl": "6.6.8"
},
"peerDependencies": {
"@emotion/react": "*",
"react": "*",
"react-intl": "*"
}
}
14 changes: 7 additions & 7 deletions app/fragments/app-main-logo/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "@app/main-logo",
"version": "0.0.1",
"type": "module",
"private": true,
"main": "src/index.ts",
"type": "module",
"exports": {
".": "./src/index.ts"
},
"main": "src/index.ts",
"dependencies": {
"@ui/icons": "workspace:*",
"@ui/layout": "workspace:*",
"@ui/text": "workspace:0.0.1",
"@ui/theme": "workspace:*"
},
"peerDependencies": {
"@emotion/react": "*",
"react": "*",
"react-intl": "*"
},
"devDependencies": {
"@emotion/react": "11.11.4",
"@types/react": "^18.3.2",
"@types/react-dom": "18.3.0",
"react-intl": "6.6.8"
},
"peerDependencies": {
"@emotion/react": "*",
"react": "*",
"react-intl": "*"
}
}
Loading