Skip to content

Commit

Permalink
[optimize] Model folder structure
Browse files Browse the repository at this point in the history
[optimize] update Upstream packages
  • Loading branch information
TechQuery committed Sep 3, 2023
1 parent d8aa0d7 commit ea23083
Show file tree
Hide file tree
Showing 100 changed files with 232 additions and 223 deletions.
2 changes: 1 addition & 1 deletion components/Activity/ActivityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Link from 'next/link';
import { Card, Col, Row } from 'react-bootstrap';

import { Activity } from '../../models/Activity';
import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';
import { convertDatetime } from '../../utils/time';
import { ActivityControl, ActivityControlProps } from './ActivityControl';
import { ActivityEntry } from './ActivityEntry';
Expand Down
4 changes: 2 additions & 2 deletions components/Activity/ActivityControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { FC } from 'react';
import { Button } from 'react-bootstrap';

import { Activity } from '../../models/Activity';
import platformAdmin from '../../models/PlatformAdmin';
import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';
import platformAdmin from '../../models/User/PlatformAdmin';

const { t } = i18n;

Expand Down
4 changes: 2 additions & 2 deletions components/Activity/ActivityEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { Button, Col, Form, Row } from 'react-bootstrap';
import { formToJSON } from 'web-utility';

import activityStore, { Activity } from '../../models/Activity';
import fileStore from '../../models/File';
import { i18n } from '../../models/Translation';
import fileStore from '../../models/Base/File';
import { i18n } from '../../models/Base/Translation';
import { DateTimeInput } from '../DateTimeInput';

const { t } = i18n,
Expand Down
2 changes: 1 addition & 1 deletion components/Activity/ActivityEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button } from 'react-bootstrap';
import { diffTime } from 'web-utility';

import { Activity } from '../../models/Activity';
import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';
import { TimeUnit } from '../../utils/time';

const { t } = i18n;
Expand Down
6 changes: 3 additions & 3 deletions components/Activity/ActivityList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
ActivityListType,
ActivityModel,
} from '../../models/Activity';
import platformAdmin from '../../models/PlatformAdmin';
import sessionStore from '../../models/Session';
import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';
import platformAdmin from '../../models/User/PlatformAdmin';
import sessionStore from '../../models/User/Session';
import { XScrollListProps } from '../layout/ScrollList';
import { ActivityCard, ActivityCardProps } from './ActivityCard';

Expand Down
2 changes: 1 addition & 1 deletion components/Activity/ActivityLogList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ScrollListProps } from 'mobx-restful-table';
import { Badge, ListGroup } from 'react-bootstrap';

import { Log, LogModel } from '../../models/Log';
import { Log, LogModel } from '../../models/Activity/Log';

export interface ActivityLogListProps extends ScrollListProps<Log> {
store: LogModel;
Expand Down
4 changes: 2 additions & 2 deletions components/Activity/ActivityManageFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { Container, Nav } from 'react-bootstrap';

import { menus } from '../../configuration/menu';
import activityStore from '../../models/Activity';
import sessionStore from '../../models/Session';
import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';
import sessionStore from '../../models/User/Session';
import { findDeep } from '../../utils/data';
import { MainBreadcrumb } from '../layout/MainBreadcrumb';
import PageHead from '../layout/PageHead';
Expand Down
4 changes: 2 additions & 2 deletions components/Activity/AwardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ScrollList, ScrollListProps } from 'mobx-restful-table';
import { FC, PureComponent } from 'react';
import { Button, Image, Table } from 'react-bootstrap';

import { Award } from '../../models/Award';
import { i18n } from '../../models/Translation';
import { Award } from '../../models/Activity/Award';
import { i18n } from '../../models/Base/Translation';
import styles from '../../styles/Table.module.less';
import { XScrollListProps } from '../layout/ScrollList';

Expand Down
6 changes: 3 additions & 3 deletions components/Activity/EnrollmentList.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ScrollList, ScrollListProps } from 'mobx-restful-table';
import { ScrollList } from 'mobx-restful-table';
import { FC, PureComponent } from 'react';
import { Button, Form, Table } from 'react-bootstrap';

import activityStore from '../../models/Activity';
import { Enrollment, statusName } from '../../models/Enrollment';
import { i18n } from '../../models/Translation';
import { Enrollment, statusName } from '../../models/Activity/Enrollment';
import { i18n } from '../../models/Base/Translation';
import styles from '../../styles/participant.module.less';
import { XScrollListProps } from '../layout/ScrollList';

Expand Down
4 changes: 2 additions & 2 deletions components/Activity/EnrollmentStatistic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { PureComponent } from 'react';
import { Col, Container, Row } from 'react-bootstrap';
import { isEmpty } from 'web-utility';

import { EnrollmentModel } from '../../models/Enrollment';
import { i18n } from '../../models/Translation';
import { EnrollmentModel } from '../../models/Activity/Enrollment';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
4 changes: 2 additions & 2 deletions components/Activity/QuestionnaireCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { FC, FormEvent } from 'react';
import { Button, Col, Form, Row } from 'react-bootstrap';
import { formToJSON } from 'web-utility';

import { Question } from '../../models/Question';
import { i18n } from '../../models/Translation';
import { Question } from '../../models/Activity/Question';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
4 changes: 2 additions & 2 deletions components/Activity/QuestionnairePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Link from 'next/link';
import { PureComponent } from 'react';
import { Container, Form, Row } from 'react-bootstrap';

import { Question } from '../../models/Question';
import { i18n } from '../../models/Translation';
import { Question } from '../../models/Activity/Question';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
4 changes: 2 additions & 2 deletions components/Activity/QuestionnaireTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { observer } from 'mobx-react';
import { FC } from 'react';
import { Button, Container, Table } from 'react-bootstrap';

import { Question } from '../../models/Question';
import { i18n } from '../../models/Translation';
import { Question } from '../../models/Activity/Question';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
2 changes: 1 addition & 1 deletion components/DateTimeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ChangeEvent, PureComponent } from 'react';
import { Col, Form, InputGroup, Row } from 'react-bootstrap';
import { formatDate } from 'web-utility';

import { i18n } from '../models/Translation';
import { i18n } from '../models/Base/Translation';

const { t } = i18n;

Expand Down
2 changes: 1 addition & 1 deletion components/Git/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { observer } from 'mobx-react';
import { FC, ReactNode } from 'react';
import { Badge, Button, Card, Col, Form, Row } from 'react-bootstrap';

import { i18n } from '../../models/Base/Translation';
import { GitTemplate } from '../../models/TemplateRepo';
import { i18n } from '../../models/Translation';
import { GitLogo } from './Logo';

const { t } = i18n;
Expand Down
2 changes: 1 addition & 1 deletion components/Git/CardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { text2color } from 'idea-react';
import { FC } from 'react';
import { Badge, Button, Card, Col, Form, Row } from 'react-bootstrap';

import { i18n } from '../../models/Base/Translation';
import { GitTemplate } from '../../models/TemplateRepo';
import { i18n } from '../../models/Translation';
import { XScrollListProps } from '../layout/ScrollList';
import { GitLogo } from './Logo';

Expand Down
2 changes: 1 addition & 1 deletion components/Git/GitTeamCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { observer } from 'mobx-react';
import { FC, ReactNode } from 'react';
import { Badge, Card, Col, Form, Row } from 'react-bootstrap';

import { i18n } from '../../models/Base/Translation';
import { GitRepository } from '../../models/Git';
import { i18n } from '../../models/Translation';
import { GitLogo } from './Logo';

const { t } = i18n;
Expand Down
2 changes: 1 addition & 1 deletion components/Git/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
} from 'react-bootstrap';
import { formToJSON } from 'web-utility';

import { i18n } from '../../models/Base/Translation';
import { GitTemplateModal } from '../../models/TemplateRepo';
import { i18n } from '../../models/Translation';

export interface GitModalProps extends Pick<ModalProps, 'show' | 'onHide'> {
name?: string;
Expand Down
2 changes: 1 addition & 1 deletion components/HTMLEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from 'react-bootstrap-editor';
import { Constructor, uniqueID } from 'web-utility';

import fileStore from '../models/File';
import fileStore from '../models/Base/File';

ImageTool.prototype.save = blob =>
fileStore.upload(new File([blob], uniqueID()));
Expand Down
8 changes: 6 additions & 2 deletions components/Message/MessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ import { ScrollList, ScrollListProps } from 'mobx-restful-table';
import { FC, PureComponent } from 'react';
import { Button, Form, Table } from 'react-bootstrap';

import { Message, MessageType, MessageTypeName } from '../../models/Message';
import { i18n } from '../../models/Translation';
import {
Message,
MessageType,
MessageTypeName,
} from '../../models/Activity/Message';
import { i18n } from '../../models/Base/Translation';
import styles from '../../styles/participant.module.less';
import { XScrollListProps } from '../layout/ScrollList';

Expand Down
8 changes: 6 additions & 2 deletions components/Message/MessageModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import { createRef, FormEvent, PureComponent } from 'react';
import { Button, Form, Modal, ModalProps } from 'react-bootstrap';
import { formToJSON } from 'web-utility';

import { Message, MessageModel, MessageTypeName } from '../../models/Message';
import { i18n } from '../../models/Translation';
import {
Message,
MessageModel,
MessageTypeName,
} from '../../models/Activity/Message';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
4 changes: 2 additions & 2 deletions components/Organization/ActivityOrganizationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
Organization,
OrganizationModel,
OrganizationTypeName,
} from '../../models/Organization';
import { i18n } from '../../models/Translation';
} from '../../models/Activity/Organization';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
5 changes: 4 additions & 1 deletion components/Organization/OrganizationCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Card } from 'react-bootstrap';

import { Organization, OrganizationTypeName } from '../../models/Organization';
import {
Organization,
OrganizationTypeName,
} from '../../models/Activity/Organization';

export const OrganizationCard = ({
name,
Expand Down
6 changes: 3 additions & 3 deletions components/Organization/OrganizationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Form, Image, Table } from 'react-bootstrap';

import {
Organization,
OrganizationTypeName
} from '../../models/Organization';
import { i18n } from '../../models/Translation';
OrganizationTypeName,
} from '../../models/Activity/Organization';
import { i18n } from '../../models/Base/Translation';
import styles from '../../styles/Table.module.less';
import { XScrollListProps } from '../layout/ScrollList';
import { OrganizationCard } from './OrganizationCard';
Expand Down
6 changes: 3 additions & 3 deletions components/PlatformAdmin/PlatformAdminFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import { Fragment, PureComponent } from 'react';
import { Container, Nav } from 'react-bootstrap';

import { adminMenus } from '../../configuration/menu';
import platformAdminStore from '../../models/PlatformAdmin';
import sessionStore from '../../models/Session';
import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';
import platformAdminStore from '../../models/User/PlatformAdmin';
import sessionStore from '../../models/User/Session';
import { findDeep } from '../../utils/data';
import { MainBreadcrumb } from '../layout/MainBreadcrumb';
import PageHead from '../layout/PageHead';
Expand Down
4 changes: 2 additions & 2 deletions components/PlatformAdmin/PlatformAdminModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { observer } from 'mobx-react';
import { FormEvent, PureComponent } from 'react';
import { Button, Form, Modal, ModalProps } from 'react-bootstrap';

import { PlatformAdminModel } from '../../models/PlatformAdmin';
import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';
import userStore from '../../models/User';
import { PlatformAdminModel } from '../../models/User/PlatformAdmin';
import { UserList } from '../User/UserList';

const { t } = i18n;
Expand Down
2 changes: 1 addition & 1 deletion components/Team/JoinTeamModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FormEventHandler } from 'react';
import { Button, Col, Form, Modal, ModalProps } from 'react-bootstrap';

import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
6 changes: 3 additions & 3 deletions components/Team/TeamAdministratorTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { observer } from 'mobx-react';
import { FC } from 'react';
import { Form, Table } from 'react-bootstrap';

import sessionStore from '../../models/Session';
import { TeamMember } from '../../models/Team';
import { i18n } from '../../models/Translation';
import { TeamMember } from '../../models/Activity/Team';
import { i18n } from '../../models/Base/Translation';
import sessionStore from '../../models/User/Session';
import styles from '../../styles/Table.module.less';
import { convertDatetime } from '../../utils/time';
import { XScrollListProps } from '../layout/ScrollList';
Expand Down
2 changes: 1 addition & 1 deletion components/Team/TeamAwardAssignment.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC } from 'react';

import { AwardAssignment } from '../../models/Award';
import { AwardAssignment } from '../../models/Activity/Award';
import { XScrollListProps } from '../layout/ScrollList';

export interface TeamAwardAssignmentLayoutProps
Expand Down
4 changes: 2 additions & 2 deletions components/Team/TeamAwardCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { PureComponent } from 'react';
import { Accordion, Button } from 'react-bootstrap';

import activityStore from '../../models/Activity';
import { Team } from '../../models/Team';
import { i18n } from '../../models/Translation';
import { Team } from '../../models/Activity/Team';
import { i18n } from '../../models/Base/Translation';
import { TeamAwardAssignmentLayout } from './TeamAwardAssignment';
import { TeamMemberListLayout } from './TeamMemberList';
import { SimpleTeamWorkListLayout } from './TeamWork';
Expand Down
4 changes: 2 additions & 2 deletions components/Team/TeamAwardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { ScrollList, ScrollListProps } from 'mobx-restful-table';
import { FC, PureComponent } from 'react';
import { Col, Row } from 'react-bootstrap';

import { Team } from '../../models/Team';
import { i18n } from '../../models/Translation';
import { Team } from '../../models/Activity/Team';
import { i18n } from '../../models/Base/Translation';
import { XScrollListProps } from '../layout/ScrollList';
import { TeamAwardCard } from './TeamAwardCard';

Expand Down
4 changes: 2 additions & 2 deletions components/Team/TeamCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import classNames from 'classnames';
import { Avatar } from 'idea-react';
import { HTMLAttributes } from 'react';

import { Team } from '../../models/Team';
import { i18n } from '../../models/Translation';
import { Team } from '../../models/Activity/Team';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
4 changes: 2 additions & 2 deletions components/Team/TeamCreateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Modal } from 'react-bootstrap';
import { formToJSON } from 'web-utility';

import activityStore from '../../models/Activity';
import { Team } from '../../models/Team';
import { i18n } from '../../models/Translation';
import { Team } from '../../models/Activity/Team';
import { i18n } from '../../models/Base/Translation';
import { TeamEditor } from './TeamEditor';

const { t } = i18n;
Expand Down
4 changes: 2 additions & 2 deletions components/Team/TeamEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FC, FormEvent } from 'react';
import { Button, Col, Form, Row } from 'react-bootstrap';

import { Team } from '../../models/Team';
import { i18n } from '../../models/Translation';
import { Team } from '../../models/Activity/Team';
import { i18n } from '../../models/Base/Translation';

const { t } = i18n;

Expand Down
2 changes: 1 addition & 1 deletion components/Team/TeamList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ScrollListProps } from 'mobx-restful-table';
import { Col, Row } from 'react-bootstrap';

import { Team, TeamModel } from '../../models/Team';
import { Team, TeamModel } from '../../models/Activity/Team';
import { TeamCard } from './TeamCard';

export interface TeamListProps extends ScrollListProps<Team> {
Expand Down
6 changes: 3 additions & 3 deletions components/Team/TeamManageFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import { Col, Nav } from 'react-bootstrap';

import { activityTeamMenus } from '../../configuration/menu';
import activityStore from '../../models/Activity';
import { Staff } from '../../models/Activity/Staff';
import { ErrorBaseData } from '../../models/Base';
import sessionStore from '../../models/Session';
import { Staff } from '../../models/Staff';
import { i18n } from '../../models/Translation';
import { i18n } from '../../models/Base/Translation';
import sessionStore from '../../models/User/Session';
import { findDeep } from '../../utils/data';
import { ActivityManageFrameProps } from '../Activity/ActivityManageFrame';
import { MainBreadcrumb } from '../layout/MainBreadcrumb';
Expand Down
Loading

1 comment on commit ea23083

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for open-hackathon ready!

✅ Preview
https://open-hackathon-61zzjqubw-techquery.vercel.app

Built with commit ea23083.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.