แก้ไข manual เเละแก้ layout
This commit is contained in:
parent
16ab4806a5
commit
f893e834ba
2 changed files with 103 additions and 67 deletions
|
|
@ -138,68 +138,99 @@ const API = {
|
|||
};
|
||||
|
||||
const path = "http://localhost:3008";
|
||||
const name = "";
|
||||
|
||||
const generatePopupPath = (routeName: any) => {
|
||||
if (routeName.includes("metadata")) {
|
||||
return `${path}/manual/chapter-2-admin-metadata`;
|
||||
}
|
||||
if (routeName.includes("KPI")) {
|
||||
return `${path}/manual/chapter-3-admin-evaluate`;
|
||||
}
|
||||
if (routeName.includes("compete")) {
|
||||
return `${path}/manual/chapter-10-admin-recruit`;
|
||||
}
|
||||
if (routeName.includes("registryNew")) {
|
||||
return `${path}/manual/chapter-7-admin-registry`;
|
||||
}
|
||||
if (routeName.includes("registry")) {
|
||||
return `${path}/manual/chapter-7-admin-registry`;
|
||||
}
|
||||
if (routeName.includes("registry-employee")) {
|
||||
return `${path}/manual/chapter-8-admin-registry-employee`;
|
||||
}
|
||||
if (routeName.includes("qualify")) {
|
||||
return `${path}/manual/chapter-10-admin-recruit`;
|
||||
}
|
||||
if (routeName.includes("insignia")) {
|
||||
return `${path}/manual/chapter-14-admin-insignia`;
|
||||
}
|
||||
if (routeName.includes("resign")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("retirement")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("deceased")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("exit-Interview")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("expulsion")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("discharged")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("discipline")) {
|
||||
return `${path}/manual/chapter-16-admin-discipline`;
|
||||
}
|
||||
if (routeName.includes("appeal")) {
|
||||
return `${path}/manual/chapter-16-admin-discipline`;
|
||||
}
|
||||
if (routeName.includes("evaluate")) {
|
||||
return `${path}/manual/chapter-17-admin-KPI`;
|
||||
}
|
||||
if (routeName.includes("salary")) {
|
||||
return `${path}/manual/chapter-18-admin-salary`;
|
||||
}
|
||||
if (routeName.includes("development")) {
|
||||
return `${path}/manual/chapter-20-admin-development`;
|
||||
} else {
|
||||
return manualConfig[routeName as keyof typeof manualConfig];
|
||||
}
|
||||
};
|
||||
|
||||
const manualConfig = {
|
||||
"/": `${path}/`,
|
||||
"/KPI-indicator-plan": `${path}/manual/chapter-3-admin-evaluate`,
|
||||
"/KPI-indicator-role": `${path}/manual/chapter-3-admin-evaluate`,
|
||||
"/assignment": `${path}/manual/chapter-3-admin-evaluate`,
|
||||
"/KPI-competency": `${path}/manual/chapter-3-admin-evaluate`,
|
||||
"/strategic": `${path}/manual/chapter-3-admin-evaluate`,
|
||||
"/organization-new": `${path}/manual/chapter-4-admin-organization`,
|
||||
"/registry-new": `${path}/manual/chapter-7-admin-registry`,
|
||||
"/registry-employee": `${path}/manual/chapter-8-admin-registry-employee`,
|
||||
"/order": `${path}/manual/chapter-9-admin-order`,
|
||||
"/compete/period": `${path}/manual/chapter-10-admin-recruit`,
|
||||
"/compete/period/stat": `${path}/manual/chapter-10-admin-recruit`,
|
||||
"/qualify/period": `${path}/manual/chapter-10-admin-recruit`,
|
||||
"/disable/period": `${path}/manual/chapter-10-admin-recruit`,
|
||||
"/qualify/manage": `${path}/manual/chapter-10-admin-recruit`,
|
||||
"/qualify/period/stat": `${path}/manual/chapter-10-admin-recruit`,
|
||||
"/qualify/disable/stat": `${path}/manual/chapter-10-admin-recruit`,
|
||||
"/placement": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"/transfer": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"/receive": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"/help-government": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"/repatriate": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"/appoint-promote": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"/appoint-employee": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"/other": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"/probation": `${path}/manual/chapter-12-admin-probation`,
|
||||
"/retirement": `${path}/manual/chapter-13-admin-retirement`,
|
||||
"/retirement/resign": `${path}/manual/chapter-13-admin-retirement`,
|
||||
"/exit-Interview": `${path}/manual/chapter-13-admin-retirement`,
|
||||
"/deceased": `${path}/manual/chapter-13-admin-retirement`,
|
||||
"/dismiss-order": `${path}/manual/chapter-13-admin-retirement`,
|
||||
"/insignia/round-proposals": `${path}/manual/chapter-14-admin-insignia`,
|
||||
"/insignia/manage/list-manage": `${path}/manual/chapter-14-admin-insignia`,
|
||||
"/insignia/record": `${path}/manual/chapter-14-admin-insignia`,
|
||||
"/insignia/allocate": `${path}/manual/chapter-14-admin-insignia`,
|
||||
"/insignia/borrow": `${path}/manual/chapter-14-admin-insignia`,
|
||||
"/insignia/report": `${path}/manual/chapter-14-admin-insignia`,
|
||||
"/discipline/complaints": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/discipline/investigatefacts": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/discipline/disciplinary": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/discipline-result": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/discipline-suspend": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/discipline-appealcomplain": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/discipline-order": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/discipline/director": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/discipline/channel": `${path}/manual/chapter-16-admin-discipline`,
|
||||
"/evaluate": `${path}/manual/chapter-17-admin-KPI`,
|
||||
"/evaluate/director": `${path}/manual/chapter-17-admin-KPI`,
|
||||
"/evaluate/meeting": `${path}/manual/chapter-17-admin-KPI`,
|
||||
"/salary": `${path}/manual/chapter-18-admin-salary`,
|
||||
"/salary-employee": `${path}/manual/chapter-18-admin-salary`,
|
||||
"/salary/round": `${path}/manual/chapter-18-admin-salary`,
|
||||
"/salary/lists": `${path}/manual/chapter-18-admin-salary`,
|
||||
"/salary-employee/lists": `${path}/manual/chapter-18-admin-salary`,
|
||||
"/salary/command": `${path}/manual/chapter-18-admin-salary`,
|
||||
"/development": `${path}/manual/chapter-20-admin-development`,
|
||||
"/development/history": `${path}/manual/chapter-20-admin-development`,
|
||||
"/development/employee-history": `${path}/manual/chapter-20-admin-development`,
|
||||
"/development/scholarship": `${path}/manual/chapter-20-admin-development`,
|
||||
dashboard: `${path}/`,
|
||||
strategic: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
organizationNew: `${path}/manual/chapter-4-admin-organization`,
|
||||
organization: `${path}/manual/chapter-7-admin-registry`,
|
||||
order: `${path}/manual/chapter-9-admin-order`,
|
||||
OrderDetail: `${path}/manual/chapter-9-admin-order`,
|
||||
OrderAdd: `${path}/manual/chapter-9-admin-order`,
|
||||
disableperiod: `${path}/manual/chapter-10-admin-recruit`,
|
||||
manage: `${path}/manual/chapter-10-admin-recruit`,
|
||||
editorweb: `${path}/manual/chapter-10-admin-recruit`,
|
||||
manageDetaill: `${path}/manual/chapter-10-admin-recruit`,
|
||||
ExamForm: `${path}/manual/chapter-10-admin-recruit`,
|
||||
Payment: `${path}/manual/chapter-10-admin-recruit`,
|
||||
placement: `${path}/manual/chapter-11-admin-appointment`,
|
||||
transfer: `${path}/manual/chapter-11-admin-appointment`,
|
||||
receive: `${path}/manual/chapter-11-admin-appointment`,
|
||||
"help-government": `${path}/manual/chapter-11-admin-appointment`,
|
||||
repatriate: `${path}/manual/chapter-11-admin-appointment`,
|
||||
"appoint-promote": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"appoint-employee": `${path}/manual/chapter-11-admin-appointment`,
|
||||
other: `${path}/manual/chapter-11-admin-appointment`,
|
||||
probation: `${path}/manual/chapter-12-admin-probation`,
|
||||
retirement: `${path}/manual/chapter-13-admin-retirement`,
|
||||
resign: `${path}/manual/chapter-13-admin-retirement`,
|
||||
ExitInterviewEditQuestion: `${path}/manual/chapter-13-admin-retirement`,
|
||||
"dismiss-order": `${path}/manual/chapter-13-admin-retirement`,
|
||||
"report-report": `${path}/manual/chapter-14-admin-insignia`,
|
||||
"report-report-01": `${path}/manual/chapter-14-admin-insignia`,
|
||||
appealComplain: `${path}/manual/chapter-16-admin-discipline`,
|
||||
};
|
||||
|
||||
export default {
|
||||
|
|
@ -209,4 +240,5 @@ export default {
|
|||
qualifyExamPanel,
|
||||
s3ClusterUrl,
|
||||
manualConfig,
|
||||
generatePopupPath,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -476,13 +476,15 @@ watch(
|
|||
);
|
||||
|
||||
const handleButtonClick = () => {
|
||||
const currentPath = route.path;
|
||||
const popupPath =
|
||||
config.manualConfig[currentPath as keyof typeof config.manualConfig];
|
||||
const currentPath = route.name;
|
||||
// const popupPath =
|
||||
// config.manualConfig[currentPath as keyof typeof config.manualConfig];
|
||||
const popupPath = config.generatePopupPath(currentPath);
|
||||
if (popupPath) {
|
||||
// console.log(currentPath);
|
||||
window.open(popupPath);
|
||||
} else {
|
||||
alert("No mapping found for this route");
|
||||
console.log("no manual in this page ", currentPath);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -529,11 +531,13 @@ const handleButtonClick = () => {
|
|||
dense
|
||||
flat
|
||||
size="13px"
|
||||
class="q-mx-md bg-grey-3"
|
||||
class="bg-grey-3"
|
||||
:color="totalNoti === 0 ? 'grey-6' : 'grey-8'"
|
||||
@click="handleButtonClick()"
|
||||
style="margin-right: 10px"
|
||||
>
|
||||
<q-icon name="mdi-book" size="18px" color="grey-7" />
|
||||
<q-icon name="mdi-book-open-variant" size="18px" color="grey-7" />
|
||||
<q-tooltip>คู่มือ</q-tooltip>
|
||||
</q-btn>
|
||||
<!-- Notification -->
|
||||
<q-btn
|
||||
|
|
@ -541,7 +545,7 @@ const handleButtonClick = () => {
|
|||
dense
|
||||
flat
|
||||
size="13px"
|
||||
class="q-mx-md bg-grey-3"
|
||||
class="bg-grey-3"
|
||||
:color="totalNoti === 0 ? 'grey-6' : 'grey-8'"
|
||||
>
|
||||
<q-icon name="mdi-bell" size="18px" color="grey-7" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue