浏览代码

update

tags/Baseline_30082024_FRONTEND_UAT
MSI\User 1年前
父节点
当前提交
a225a9ee1f
共有 4 个文件被更改,包括 24 次插入6 次删除
  1. +4
    -0
      src/app/api/clientprojects/actions.ts
  2. +11
    -5
      src/components/NavigationContent/NavigationContent.tsx
  3. +8
    -0
      src/components/ProgressByClient/ProgressByClient.tsx
  4. +1
    -1
      src/components/ProjectFinancialSummary/ProjectFinancialSummary.tsx

+ 4
- 0
src/app/api/clientprojects/actions.ts 查看文件

@@ -23,6 +23,10 @@ export interface ClientSubsidiaryProjectResult {

export const fetchAllClientSubsidiaryProjects = cache(async (customerId: number, tableSorting:string, subsidiaryId?: number) => {
if (subsidiaryId === 0){
return serverFetchJson<ClientSubsidiaryProjectResult[]>(
`${BASE_API_URL}/dashboard/searchCustomerSubsidiaryProject?customerId=${customerId}&subsidiaryId=${subsidiaryId}&tableSorting=${tableSorting}`
);
} else if (subsidiaryId === undefined) {
return serverFetchJson<ClientSubsidiaryProjectResult[]>(
`${BASE_API_URL}/dashboard/searchCustomerSubsidiaryProject?customerId=${customerId}&tableSorting=${tableSorting}`
);


+ 11
- 5
src/components/NavigationContent/NavigationContent.tsx 查看文件

@@ -117,11 +117,11 @@ const NavigationContent: React.FC<Props> = ({ abilities, username }) => {
abilities!.includes(ability),
),
children: [
{
icon: <SummarizeIcon />,
label: "Financial Summary",
path: "/dashboard/ProjectFinancialSummary",
},
// {
// icon: <SummarizeIcon />,
// label: "Financial Summary",
// path: "/dashboard/ProjectFinancialSummary",
// },
{
icon: <PaymentsIcon />,
label: "Company / Team Cash Flow",
@@ -162,6 +162,12 @@ const NavigationContent: React.FC<Props> = ({ abilities, username }) => {
},
],
},
{
icon: <SummarizeIcon />,
label: "Financial Summary",
path: "/dashboard/ProjectFinancialSummary",
showOnMobile: true,
},
// No Claim function in Breaur, will be implement later
// {
// icon: <RequestQuote />,


+ 8
- 0
src/components/ProgressByClient/ProgressByClient.tsx 查看文件

@@ -110,6 +110,14 @@ const ProgressByClient: React.FC<Props> = () => {
}
} catch (error) {
console.error('Error fetching client subsidiary projects:', error);
}
} else if (customerId) {
try {
const clickResult = await fetchAllClientSubsidiaryProjects(
Number(customerId),tableSorting)
setClientSubsidiaryProjectResult(clickResult);
} catch (error) {
console.error('Error fetching client subsidiary projects:', error);
}


+ 1
- 1
src/components/ProjectFinancialSummary/ProjectFinancialSummary.tsx 查看文件

@@ -118,7 +118,7 @@ const ProjectFinancialSummary: React.FC = () => {
<div
className="text-blue-600 hover:underline cursor-pointer"
onClick={() => {
router.push(`/dashboard/ProjectStatusByClient?customerId=${params.row.id}&subsidiaryId=-`);
router.push(`/dashboard/ProjectStatusByClient?customerId=${params.row.id}`);
}}
>
{params.value}


正在加载...
取消
保存