Przeglądaj źródła

update

tags/Baseline_30082024_FRONTEND_UAT
MSI\derek 1 rok temu
rodzic
commit
71815797fc
5 zmienionych plików z 16 dodań i 10 usunięć
  1. +0
    -0
      src/app/(main)/changepassword/page.tsx
  2. +1
    -1
      src/app/api/reports/index.ts
  3. +5
    -5
      src/app/api/staff/actions.ts
  4. +1
    -1
      src/components/AppBar/Profile.tsx
  5. +9
    -3
      src/components/GenerateMonthlyWorkHoursReport/GenerateMonthlyWorkHoursReport.tsx

src/app/(main)/settings/changepassword/page.tsx → src/app/(main)/changepassword/page.tsx Wyświetl plik


+ 1
- 1
src/app/api/reports/index.ts Wyświetl plik

@@ -46,7 +46,7 @@ export interface ProjectPotentialDelayReportRequest {
// - Monthly Work Hours Report
export interface MonthlyWorkHoursReportFilter {
staff: string[];
date: any;
date: string;
}

export interface MonthlyWorkHoursReportRequest {


+ 5
- 5
src/app/api/staff/actions.ts Wyświetl plik

@@ -20,17 +20,17 @@ export interface CreateStaffInputs {
companyId: number;
salaryId: number;
skillSetId?: number[];
joinDate: string;
joinDate?: string;
currentPositionId: number;
joinPositionId: number;
joinPositionId?: number;
gradeId?: number;
teamId?: number
departmentId: number;
departmentId?: number;
phone1: string;
phone2?: string;
email: string;
emergContactName: string;
emergContactPhone: string;
emergContactName?: string;
emergContactPhone?: string;
employType: string;
departDate?: string;
departReason?: string;


+ 1
- 1
src/components/AppBar/Profile.tsx Wyświetl plik

@@ -63,7 +63,7 @@ const Profile: React.FC<Props> = ({ avatarImageSrc, profileName }) => {
{profileName}
</Typography>
<Divider />
<MenuItem onClick={() => { router.replace("/settings/changepassword") }}>{t("Change Password")}</MenuItem>
<MenuItem onClick={() => { router.replace("/changepassword") }}>{t("Change Password")}</MenuItem>
{language === "zh" && <MenuItem onClick={() => { onLangClick("en") }}>{t("Change To English Version")}</MenuItem>}
{language === "en" && <MenuItem onClick={() => { onLangClick("zh") }}>{t("Change To Chinese Version")}</MenuItem>}
<MenuItem onClick={() => signOut()}>{t("Sign out")}</MenuItem>


+ 9
- 3
src/components/GenerateMonthlyWorkHoursReport/GenerateMonthlyWorkHoursReport.tsx Wyświetl plik

@@ -49,11 +49,17 @@ const GenerateMonthlyWorkHoursReport: React.FC<Props> = ({ staffs }) => {
formType={"download"}
criteria={searchCriteria}
onSearch={async (query: any) => {
console.log(query);
const index = staffCombo.findIndex((staff) => staff === query.staff);
const response = await fetchMonthlyWorkHoursReport({
let postData = {
id: staffs[index].id,
yearMonth: query.date,
});
yearMonth: dayjs().format("YYYY-MM").toString(),
};
console.log(query.date.length > 0)
if (query.date.length > 0) {
postData.yearMonth = query.date
}
const response = await fetchMonthlyWorkHoursReport(postData);
if (response) {
downloadFile(
new Uint8Array(response.blobValue),


Ładowanie…
Anuluj
Zapisz