add troubleshooting controller and field otherNationality
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s

This commit is contained in:
Kanjana 2025-04-25 11:59:46 +07:00
parent 5c75c27470
commit 7fe0512a2f
8 changed files with 55 additions and 15 deletions

View file

@ -74,6 +74,7 @@ type EmployeeCreate = {
dateOfBirth?: Date | null;
gender: string;
nationality: string;
otherNationality?: string;
namePrefix?: string | null;
firstName?: string;
@ -110,6 +111,7 @@ type EmployeeUpdate = {
dateOfBirth?: Date;
gender?: string;
nationality?: string;
otherNationality?: string;
namePrefix?: string | null;
firstName?: string;

View file

@ -43,6 +43,7 @@ type EmployeePassportPayload = {
workerStatus: string;
nationality: string;
otherNationality: string;
namePrefix?: string | null;
firstName: string;
firstNameEN: string;

View file

@ -55,6 +55,7 @@ type QuotationCreate = {
dateOfBirth: Date;
gender: string;
nationality: string;
otherNationality?: string;
namePrefix?: string;
firstName: string;
firstNameEN: string;
@ -112,6 +113,7 @@ type QuotationUpdate = {
dateOfBirth: Date;
gender: string;
nationality: string;
otherNationality?: string;
namePrefix?: string;
firstName?: string;
@ -1008,6 +1010,7 @@ export class QuotationActionController extends Controller {
dateOfBirth: Date;
gender: string;
nationality: string;
otherNationality?: string;
namePrefix?: string;
firstName: string;
firstNameEN: string;
@ -1030,6 +1033,7 @@ export class QuotationActionController extends Controller {
dateOfBirth: Date;
gender: string;
nationality: string;
otherNationality?: string;
namePrefix?: string;
firstName: string;
firstNameEN: string;

View file

@ -76,6 +76,7 @@ type DebitNoteCreate = {
dateOfBirth: Date;
gender: string;
nationality: string;
otherNationality: string;
namePrefix?: string;
firstName: string;
firstNameEN: string;
@ -111,6 +112,7 @@ type DebitNoteUpdate = {
dateOfBirth: Date;
gender: string;
nationality: string;
otherNationality: string;
namePrefix?: string;
firstName?: string;
firstNameEN: string;

View file

@ -0,0 +1,25 @@
import express from "express";
import { Controller, Get, Path, Request, Route } from "tsoa";
import { getFile } from "../utils/minio";
@Route("api/v1/troubleshooting")
export class TroubleshootingController extends Controller {
@Get()
async get(@Request() req: express.Request) {
return req.res?.redirect(await getFile(".troubleshooting/toc.json"));
}
@Get("{category}/assets/{name}")
async getAsset(@Request() req: express.Request, @Path() category: string, @Path() name: string) {
return req.res?.redirect(await getFile(`.troubleshooting/${category}/assets/${name}`));
}
@Get("{category}/page/{page}")
async getContent(
@Request() req: express.Request,
@Path() category: string,
@Path() page: string,
) {
return req.res?.redirect(await getFile(`.troubleshooting/${category}/${page}.md`));
}
}