| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
08ed7dd55c | Jpese | 1 year ago |
|
|
f19dde2b2a | translate | 1 year ago |
|
|
2f9d0f385c | Update I18N provider | 1 year ago |
|
|
3d791a24e8 | Merge branch 'main' of https://git.2fi-solutions.com/wayne.lee/tsms into bssp | 1 year ago |
|
|
29b9a36e8b | Add component for bssp | 1 year ago |
| @@ -1,2 +1,2 @@ | |||||
| API_URL=http://localhost:8090/api | |||||
| API_URL=http://192.168.244.204:8091/api | |||||
| NEXTAUTH_SECRET=secret | NEXTAUTH_SECRET=secret | ||||
| @@ -0,0 +1,43 @@ | |||||
| import { Metadata } from "next"; | |||||
| import { getServerI18n } from "@/i18n"; | |||||
| import Add from "@mui/icons-material/Add"; | |||||
| import Button from "@mui/material/Button"; | |||||
| import Stack from "@mui/material/Stack"; | |||||
| import Typography from "@mui/material/Typography"; | |||||
| import Link from "next/link"; | |||||
| import { Suspense } from "react"; | |||||
| const Bssp: React.FC = async () => { | |||||
| const { t } = await getServerI18n("bssp") | |||||
| return ( | |||||
| <> | |||||
| <Stack | |||||
| direction="row" | |||||
| justifyContent="space-between" | |||||
| flexWrap="wrap" | |||||
| rowGap={2} | |||||
| > | |||||
| <Typography variant="h1" marginInlineEnd={2}> | |||||
| {t("Bssp")} | |||||
| </Typography> | |||||
| </Stack> | |||||
| <Suspense> | |||||
| {t("SSSSS")} | |||||
| <a href= "http://localhost:3000/bssp">{t("link")}</a> | |||||
| <form> | |||||
| <label>{t("First name:")}</label><br/> | |||||
| <input type="text" id="fname" name="fname"/><br/> | |||||
| <label>{t("Last name:")}</label><br/> | |||||
| <input type="text" id="lname" name="lname"/><br/><br/> | |||||
| <input type="submit" value="Submit"/> | |||||
| </form> | |||||
| </Suspense> | |||||
| </> | |||||
| ) | |||||
| }; | |||||
| export default Bssp; | |||||
| @@ -1,5 +1,5 @@ | |||||
| import { Metadata } from "next"; | import { Metadata } from "next"; | ||||
| import { getServerI18n } from "@/i18n"; | |||||
| import { getServerI18n, I18nProvider } from "@/i18n"; | |||||
| import Add from "@mui/icons-material/Add"; | import Add from "@mui/icons-material/Add"; | ||||
| import Button from "@mui/material/Button"; | import Button from "@mui/material/Button"; | ||||
| import Stack from "@mui/material/Stack"; | import Stack from "@mui/material/Stack"; | ||||
| @@ -36,7 +36,9 @@ const Invoice: React.FC = async () => { | |||||
| </Button> */} | </Button> */} | ||||
| </Stack> | </Stack> | ||||
| <Suspense fallback={<InvoiceSearch.Loading />}> | <Suspense fallback={<InvoiceSearch.Loading />}> | ||||
| <InvoiceSearch /> | |||||
| <I18nProvider namespaces={['Invoice','common']}> | |||||
| <InvoiceSearch /> | |||||
| </I18nProvider> | |||||
| </Suspense> | </Suspense> | ||||
| </> | </> | ||||
| ) | ) | ||||
| @@ -44,7 +44,7 @@ type SearchParamNames2 = keyof SearchQuery2; | |||||
| const InvoiceSearch: React.FC<Props> = ({ issuedInvoice, receivedInvoice, invoices }) => { | const InvoiceSearch: React.FC<Props> = ({ issuedInvoice, receivedInvoice, invoices }) => { | ||||
| // console.log(invoices) | // console.log(invoices) | ||||
| const { t } = useTranslation("invoices"); | |||||
| const { t } = useTranslation("Invoice"); | |||||
| const [tabIndex, setTabIndex] = useState(0); | const [tabIndex, setTabIndex] = useState(0); | ||||
| const [filteredIssuedInvoices, setFilteredIssuedInvoices] = useState(issuedInvoice); | const [filteredIssuedInvoices, setFilteredIssuedInvoices] = useState(issuedInvoice); | ||||
| @@ -36,6 +36,7 @@ import ManageAccountsIcon from "@mui/icons-material/ManageAccounts"; | |||||
| import EmojiEventsIcon from "@mui/icons-material/EmojiEvents"; | import EmojiEventsIcon from "@mui/icons-material/EmojiEvents"; | ||||
| import FileUploadIcon from '@mui/icons-material/FileUpload'; | import FileUploadIcon from '@mui/icons-material/FileUpload'; | ||||
| import EmailIcon from "@mui/icons-material/Email"; | import EmailIcon from "@mui/icons-material/Email"; | ||||
| import TerminalIcon from '@mui/icons-material/Terminal'; | |||||
| import { | import { | ||||
| IMPORT_INVOICE, | IMPORT_INVOICE, | ||||
| @@ -109,6 +110,12 @@ const NavigationContent: React.FC<Props> = ({ abilities, username }) => { | |||||
| path: "/home", | path: "/home", | ||||
| showOnMobile: true, | showOnMobile: true, | ||||
| }, | }, | ||||
| { | |||||
| icon: <TerminalIcon />, | |||||
| label: "BSSP", | |||||
| path: "/bssp", | |||||
| showOnMobile: true, | |||||
| }, | |||||
| { | { | ||||
| icon: <Dashboard />, | icon: <Dashboard />, | ||||
| label: t("Dashboard"), | label: t("Dashboard"), | ||||
| @@ -0,0 +1,4 @@ | |||||
| { | |||||
| "SSSSS" : "hello world", | |||||
| "aaa" : "bbb" | |||||
| } | |||||
| @@ -0,0 +1,18 @@ | |||||
| { | |||||
| "Invoice No" : "請求書番号", | |||||
| "Project Code" : "プロジェクトコード", | |||||
| "Team" : "チーム", | |||||
| "Invoice" : "請求書", | |||||
| "Total Issued Amount (HKD):" : "発行総額 (HKD):", | |||||
| "Total Received Amount (HKD):" : "受取総額 (HKD):", | |||||
| "Issue Date" : "発行日", | |||||
| "Issue Date To" : "発行日:", | |||||
| "Settle Date" : "決済日", | |||||
| "Settle Date To" : "確定日まで", | |||||
| "Edit" : "編集", | |||||
| "Project Name" : "プロジェクト名", | |||||
| "Amount (HKD)" : "金額 (HKD)", | |||||
| "Actual Received Amount (HKD)" : "実際の受取額 (HKD)", | |||||
| "Import Invoice Issue Summary" : "インポート請求書問題概要", | |||||
| "Import Invoice Amount Receive Summary" : "インポート請求書金額受信概要" | |||||
| } | |||||
| @@ -0,0 +1,3 @@ | |||||
| { | |||||
| } | |||||