Skip to content

Commit

Permalink
refactor: change PascalCase file name to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleNa1000 committed Nov 22, 2024
1 parent 0305424 commit 151bdc3
Show file tree
Hide file tree
Showing 27 changed files with 93 additions and 74 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/app/(authenticated)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ArrowRight, Folders, Home, Radio } from 'lucide-react';
import Header from '../../../components/header/header';
import Title from '@/src/components/header/title';
import MyProjectData from '@/src/components/project/myProjectData';
import { StatusTable } from '@/src/components/status/StatusTable';
import { StatusTable } from '@/src/components/status/statusTable';
import { FilingType } from '@/src/interface/filing';
import Link from 'next/link';
import { Button } from '@/src/components/ui/button';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import Header from '@/src/components/header/header';
import DocumentStatusStepper from '@/src/components/status/StatusStepper';
import DocumentStatusStepper from '@/src/components/status/statusStepper';
import { FilingStatus } from '@/src/constant/enum';
import { FilingType } from '@/src/interface/filing';
import FilingTimeline from '@/src/components/filling-detail/filingTimeline';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(authenticated)/status/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Radio } from 'lucide-react';
import Header from '@/src/components/header/header';
import Title from '@/src/components/header/title';
import { getUserId } from '@/src/service/auth';
import StatusPage from '@/src/components/status/StatusPage';
import StatusPage from '@/src/components/status/statusPage';

export default async function Page() {
const userId = await getUserId();
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/admin/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Link from 'next/link';
import { useEffect, useState } from 'react';
import Header from '@/src/components/header/header';
import Title from '@/src/components/header/title';
import { StatusTable } from '@/src/components/status/StatusTable';
import { StatusTable } from '@/src/components/status/statusTable';
import { FilingStatus } from '@/src/constant/enum';
import type { FilingType } from '@/src/interface/filing';
import { Button } from '@/src/components/ui/button';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import Header from '@/src/components/header/header';
import DocumentStatusStepper from '@/src/components/status/StatusStepper';
import DocumentStatusStepper from '@/src/components/status/statusStepper';
import { FilingStatus } from '@/src/constant/enum';
import { FilingType } from '@/src/interface/filing';
import FilingTimeline from '@/src/components/filling-detail/filingTimeline';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import OnboardingPageHeader from '@/src/components/header/OnboardingPageHeader';
import OnboardingPageHeader from '@/src/components/header/onboardingPageHeader';
import { Button } from '@/src/components/ui/button';
import Image from 'next/image';
import Link from 'next/link';
Expand Down
45 changes: 26 additions & 19 deletions apps/web/src/app/pdpa/page.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
import AcceptPDPA from "@/src/components/AcceptPDPA"
import OnboardingPageHeader from "@/src/components/header/OnboardingPageHeader"
import AcceptPDPA from '@/src/components/acceptPDPA';
import OnboardingPageHeader from '@/src/components/header/onboardingPageHeader';

export default function Page() {
return (
<>
<main className="flex flex-col items-center">
<OnboardingPageHeader />
<h1 className="text-3xl font-bold mb-5 pt-5">นโยบายการจัดเก็บข้อมูลส่วนบุคคล</h1>
<h1 className="text-3xl font-bold mb-5 pt-5">
นโยบายการจัดเก็บข้อมูลส่วนบุคคล
</h1>
<div className="max-w-md border-2 px-2 shadow-md overflow-y-scroll max-h-[40vh]">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum error eligendi amet fuga
blanditiis sunt soluta ab id. Quod nisi similique omnis molestias excepturi, nesciunt unde
sequi natus dolorem inventore! Lorem ipsum dolor sit, amet consectetur adipisicing elit.
Voluptas, sapiente? Tenetur asperiores velit quae fugit iste, veritatis aperiam ullam nisi
voluptatum natus excepturi ea non illo ratione cupiditate, assumenda adipisci.Lorem ipsum
dolor sit amet consectetur adipisicing elit. Eum error eligendi amet fuga blanditiis sunt
soluta ab id. Quod nisi similique omnis molestias excepturi, nesciunt unde sequi natus
dolorem inventore! Lorem ipsum dolor sit, amet consectetur adipisicing elit. Voluptas,
sapiente? Tenetur asperiores velit quae fugit iste, veritatis aperiam ullam nisi
voluptatum natus excepturi ea non illo ratione cupiditate, assumenda adipisci.Lorem ipsum
dolor sit amet consectetur adipisicing elit. Eum error eligendi amet fuga blanditiis sunt
soluta ab id. Quod nisi similique omnis molestias excepturi, nesciunt unde sequi natus
dolorem inventore! Lorem ipsum dolor sit, amet consectetur adipisicing elit. Voluptas,
sapiente? Tenetur asperiores velit quae fugit iste, veritatis aperiam ullam nisi
voluptatum natus excepturi ea non illo ratione cupiditate, assumenda adipisci.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum error
eligendi amet fuga blanditiis sunt soluta ab id. Quod nisi similique
omnis molestias excepturi, nesciunt unde sequi natus dolorem
inventore! Lorem ipsum dolor sit, amet consectetur adipisicing elit.
Voluptas, sapiente? Tenetur asperiores velit quae fugit iste,
veritatis aperiam ullam nisi voluptatum natus excepturi ea non illo
ratione cupiditate, assumenda adipisci.Lorem ipsum dolor sit amet
consectetur adipisicing elit. Eum error eligendi amet fuga blanditiis
sunt soluta ab id. Quod nisi similique omnis molestias excepturi,
nesciunt unde sequi natus dolorem inventore! Lorem ipsum dolor sit,
amet consectetur adipisicing elit. Voluptas, sapiente? Tenetur
asperiores velit quae fugit iste, veritatis aperiam ullam nisi
voluptatum natus excepturi ea non illo ratione cupiditate, assumenda
adipisci.Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum
error eligendi amet fuga blanditiis sunt soluta ab id. Quod nisi
similique omnis molestias excepturi, nesciunt unde sequi natus dolorem
inventore! Lorem ipsum dolor sit, amet consectetur adipisicing elit.
Voluptas, sapiente? Tenetur asperiores velit quae fugit iste,
veritatis aperiam ullam nisi voluptatum natus excepturi ea non illo
ratione cupiditate, assumenda adipisci.
</div>
<AcceptPDPA />
</main>
</>
)
);
}
13 changes: 7 additions & 6 deletions apps/web/src/app/welcome/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import OnboardingPageHeader from "@/src/components/header/OnboardingPageHeader"
import { Button } from "@/src/components/ui/button"
import Image from "next/image"
import Link from "next/link"
import OnboardingPageHeader from '@/src/components/header/onboardingPageHeader';
import { Button } from '@/src/components/ui/button';
import Image from 'next/image';
import Link from 'next/link';

export default function Page() {
return (
Expand All @@ -19,10 +19,11 @@ export default function Page() {
<h2 className="text-xl mb-8">เริ่มต้นใช้งานระบบเอกสารกันเลย!</h2>
<Button
className="rounded-[80px] bg-gradient-red text-2xl font-bold px-12 py-[10px] h-16"
asChild>
asChild
>
<Link href="/home">เริ่มต้น</Link>
</Button>
</main>
</>
)
);
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
DocumentActivityMapForAdmin,
DocumentActivityMapForUser,
} from '@/src/constant/Map';
} from '@/src/constant/map';
import { FormControl } from '../../ui/form';
import {
SelectContent,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/filling-detail/filingTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Clock } from 'lucide-react';
import type { DocumentType } from '@/src/interface/document';
import type { FilingStatus } from '@/src/constant/enum';
import type { User } from '@/src/interface/user';
import DocumentCard from './DocumentCard';
import DocumentCard from './documentCard';

export default function FilingTimeline({
documents,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/new-project/projectForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
SelectTrigger,
SelectValue,
} from '@/src/components/ui/select';
import { projectTypeMap } from '@/src/constant/Map';
import { projectTypeMap } from '@/src/constant/map';
import createProject from '@/src/service/project/createProject';
import { getUserId } from '@/src/service/auth';
import { findUserByUserId } from '@/src/service/user/findUserByUserId';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/project/allProjectPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AllProjectCard from './allProjectCard';
import { Project } from '@/src/interface/project';
import { filterProjectStatus } from '@/src/styles/enumMap';
import { useState, useEffect, Dispatch, SetStateAction } from 'react';
import { projectTypeMap } from '@/src/constant/Map';
import { projectTypeMap } from '@/src/constant/map';
import SelectType from '../filter/selectType';

export default function AllProjectPanel({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/project/popoverAddFiling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
DialogTrigger,
} from '../ui/dialog';
import { HiDocumentAdd } from 'react-icons/hi';
import { filingTypeMap } from '@/src/constant/Map';
import { filingTypeMap } from '@/src/constant/map';
import { useEffect, useState } from 'react';
import createFiling from '@/src/service/filing/createFiling';
import { FilingType } from '@/src/interface/filing';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import { useEffect, useState } from 'react';
import type { FilingType } from '@/src/interface/filing';
import getFilingsByUserId from '@/src/service/filing/getFilingsByUserId';
import DocumentStatusStepper from './StatusStepper';
import { StatusTable } from './StatusTable';
import DocumentStatusStepper from './statusStepper';
import { StatusTable } from './statusTable';

export default function StatusPage({ userId }: { userId: string }) {
const [statuses, setStatuses] = useState<FilingType[]>([]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
"use client"
'use client';

import { Step1, Step2, Step3, Step4, Step5 } from "@/src/components/status/StatusSvg"
import Stepper from "@mui/joy/Stepper"
import Step, { stepClasses } from "@mui/joy/Step"
import StepIndicator from "@mui/joy/StepIndicator"
import { FilingStatus } from "../../constant/enum"
import { FilingStatusToStepper } from "@/src/styles/enumMap"
import {
Step1,
Step2,
Step3,
Step4,
Step5,
} from '@/src/components/status/statusSvg';
import Stepper from '@mui/joy/Stepper';
import Step, { stepClasses } from '@mui/joy/Step';
import StepIndicator from '@mui/joy/StepIndicator';
import { FilingStatus } from '../../constant/enum';
import { FilingStatusToStepper } from '@/src/styles/enumMap';

const steps = [
{ no: "1", children: <>ขอเลขรัน</> },
{ no: "2", children: <>ทำเอกสาร</> },
{ no: '1', children: <>ขอเลขรัน</> },
{ no: '2', children: <>ทำเอกสาร</> },
{
no: "3",
no: '3',
children: (
<>
ส่งให้ฝ่ายเลขานุการ
Expand All @@ -21,7 +27,7 @@ const steps = [
),
},
{
no: "4",
no: '4',
children: (
<>
หัวหน้านิสิต &
Expand All @@ -33,7 +39,7 @@ const steps = [
),
},
{
no: "5",
no: '5',
children: (
<>
ส่งเอกสาร
Expand All @@ -42,14 +48,14 @@ const steps = [
</>
),
},
]
];

export default function DocumentStatusStepper({
status,
}: {
status: FilingStatus | "DEFAULT" | "LOADING"
status: FilingStatus | 'DEFAULT' | 'LOADING';
}) {
const stepStatuses = FilingStatusToStepper[status]
const stepStatuses = FilingStatusToStepper[status];

return (
<>
Expand All @@ -63,38 +69,43 @@ export default function DocumentStatusStepper({
<Stepper
orientation="horizontal"
sx={{
width: "100%",
paddingX: "1.25rem",
"--StepIndicator-size": "2.5rem",
"--Step-gap": "1rem",
"--Step-connectorInset": "0px",
"--Step-connectorThickness": "3px",
fontFamily: "var(--sukhumvit-set-font)",
width: '100%',
paddingX: '1.25rem',
'--StepIndicator-size': '2.5rem',
'--Step-gap': '1rem',
'--Step-connectorInset': '0px',
'--Step-connectorThickness': '3px',
fontFamily: 'var(--sukhumvit-set-font)',
[`& .${stepClasses.disabled} *`]: {
color: "neutral.softDisabledColor",
color: 'neutral.softDisabledColor',
},
}}>
}}
>
{stepStatuses.map((stepStatus, index) => {
return (
<Step
key={index}
orientation="vertical"
disabled={stepStatus[0] === "disabled"}
disabled={stepStatus[0] === 'disabled'}
sx={{
"&::after": {
'&::after': {
background: `var(--${stepStatus[1]})`,
},
}}
indicator={
<StepIndicator variant="solid" sx={{ background: `var(--${stepStatus[0]})` }}>
<StepIndicator
variant="solid"
sx={{ background: `var(--${stepStatus[0]})` }}
>
<span className="text-2xl">{steps[index].no}</span>
</StepIndicator>
}>
}
>
<h5 className="text-center">{steps[index].children}</h5>
</Step>
)
);
})}
</Stepper>
</>
)
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {
TableHeader,
TableRow,
} from '@/src/components/ui/table';
import { columns } from './StatusTableColumns';
import StatusTableToolBar from './StatusTableToolBar';
import { columns } from './statusTableColumns';
import StatusTableToolBar from './statusTableToolBar';
import { FilingType } from '@/src/interface/filing';

export function StatusTable({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ColumnDef } from '@tanstack/react-table';
import { DataTableColumnHeader } from './DataTableColumnHeader';
import { DataTableColumnHeader } from './dataTableColumnHeader';
import { TextMyProject, buttonColors } from '@/src/styles/enumMap';
import Link from 'next/link';
import { Button } from '../ui/button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Search } from 'lucide-react';
import { Table } from '@tanstack/react-table';
import { FilingType } from '@/src/interface/filing';
import { filterStatus } from '@/src/styles/enumMap';
import { DataTableFacetedFilter } from './StatusTableFacetedFilter';
import { DataTableFacetedFilter } from './statusTableFacetedFilter';

export default function StatusTableToolBar({
table,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/constant/filterProject.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ProjectStatus } from './enum';
import { projectTypeMap } from './Map';
import { projectTypeMap } from './map';

export const statusProjectItems = [
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/web/src/constant/schema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from 'zod';
import { getFileType } from '../lib/utils';
import { projectTypeMap } from './Map';
import { projectTypeMap } from './map';
import { DocumentActivity } from './enum';

const projectTypes = projectTypeMap.map((item) => item.value.toString());
Expand Down

0 comments on commit 151bdc3

Please sign in to comment.