แก้ชื่อฟิวผังเงินเดือนลูกจ้าง
This commit is contained in:
parent
3128103f3a
commit
5fc5b1bb06
7 changed files with 48 additions and 17 deletions
|
|
@ -127,7 +127,7 @@ export class SalaryRankEmployeesController extends Controller {
|
||||||
where: {
|
where: {
|
||||||
salaryEmployeeId: id,
|
salaryEmployeeId: id,
|
||||||
},
|
},
|
||||||
select: ["id", "step", "salaryMounth", "salaryDay"],
|
select: ["id", "step", "salaryMonth", "salaryDay"],
|
||||||
order: {
|
order: {
|
||||||
step: "ASC",
|
step: "ASC",
|
||||||
},
|
},
|
||||||
|
|
@ -137,7 +137,7 @@ export class SalaryRankEmployeesController extends Controller {
|
||||||
const filteredSalaryRankEmployee = salaryRankEmployee.filter(
|
const filteredSalaryRankEmployee = salaryRankEmployee.filter(
|
||||||
(x) =>
|
(x) =>
|
||||||
x.step?.toString().includes(keyword) ||
|
x.step?.toString().includes(keyword) ||
|
||||||
x.salaryMounth?.toString().includes(keyword) ||
|
x.salaryMonth?.toString().includes(keyword) ||
|
||||||
x.salaryDay?.toString().includes(keyword),
|
x.salaryDay?.toString().includes(keyword),
|
||||||
);
|
);
|
||||||
const slicedData = filteredSalaryRankEmployee.slice((page - 1) * pageSize, page * pageSize);
|
const slicedData = filteredSalaryRankEmployee.slice((page - 1) * pageSize, page * pageSize);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
import { Entity, Column, OneToMany } from "typeorm";
|
||||||
import { EntityBase } from "./base/Base";
|
import { EntityBase } from "./base/Base";
|
||||||
import { SalaryRanks } from "./SalaryRanks";
|
|
||||||
import { PosType } from "./PosType";
|
|
||||||
import { PosLevel } from "./PosLevel";
|
|
||||||
import { SalaryRankEmployees } from "./SalaryRankEmployees";
|
import { SalaryRankEmployees } from "./SalaryRankEmployees";
|
||||||
|
|
||||||
@Entity("salaryEmployees")
|
@Entity("salaryEmployees")
|
||||||
|
|
@ -14,10 +11,11 @@ export class SalaryEmployees extends EntityBase {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
length: 40,
|
nullable: true,
|
||||||
comment: "กลุ่มบัญชีการจ้าง",
|
comment: "กลุ่มบัญชีการจ้าง",
|
||||||
|
default: null,
|
||||||
})
|
})
|
||||||
group: string;
|
group: number;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
|
|
@ -68,7 +66,7 @@ export class CreateSalaryEmployee {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
group: string;
|
group: number;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
@ -91,7 +89,7 @@ export class UpdateSalaryEmployee {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
group: string;
|
group: number;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||||
import { EntityBase } from "./base/Base";
|
import { EntityBase } from "./base/Base";
|
||||||
import { Salarys } from "./Salarys";
|
|
||||||
import { SalaryEmployees } from "./SalaryEmployees";
|
import { SalaryEmployees } from "./SalaryEmployees";
|
||||||
|
|
||||||
@Entity("salaryRankEmployees")
|
@Entity("salaryRankEmployees")
|
||||||
|
|
@ -23,7 +22,7 @@ export class SalaryRankEmployees extends EntityBase {
|
||||||
comment: "ค่าจ้างรายเดือน",
|
comment: "ค่าจ้างรายเดือน",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
salaryMounth: number | null;
|
salaryMonth: number | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
@ -46,7 +45,7 @@ export class CreateSalaryRankEmployee {
|
||||||
step: number;
|
step: number;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
salaryMounth?: number | null;
|
salaryMonth?: number | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
salaryDay?: number | null;
|
salaryDay?: number | null;
|
||||||
|
|
@ -57,7 +56,7 @@ export class UpdateSalaryRankEmployee {
|
||||||
step: number;
|
step: number;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
salaryMounth?: number | null;
|
salaryMonth?: number | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
salaryDay?: number | null;
|
salaryDay?: number | null;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||||
import { EntityBase } from "./base/Base";
|
import { EntityBase } from "./base/Base";
|
||||||
import { Salarys } from "./Salarys";
|
import { Salarys } from "./Salarys";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||||
import { EntityBase } from "./base/Base";
|
import { EntityBase } from "./base/Base";
|
||||||
import { SalaryRanks } from "./SalaryRanks";
|
import { SalaryRanks } from "./SalaryRanks";
|
||||||
import { PosType } from "./PosType";
|
import { PosType } from "./PosType";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTypeStepTableSalaryEmployees1710302516943 implements MigrationInterface {
|
||||||
|
name = 'UpdateTypeStepTableSalaryEmployees1710302516943'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` CHANGE \`group\` \`step\` varchar(40) NOT NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryRankEmployees\` CHANGE \`salaryMounth\` \`salaryMonth\` double NULL COMMENT 'ค่าจ้างรายเดือน'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` DROP COLUMN \`step\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` ADD \`step\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` DROP COLUMN \`step\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` ADD \`step\` varchar(40) NOT NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryRankEmployees\` CHANGE \`salaryMonth\` \`salaryMounth\` double NULL COMMENT 'ค่าจ้างรายเดือน'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` CHANGE \`step\` \`group\` varchar(40) NOT NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTypeStepTableSalaryEmployees11710302798280 implements MigrationInterface {
|
||||||
|
name = 'UpdateTypeStepTableSalaryEmployees11710302798280'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` CHANGE \`step\` \`group\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryEmployees\` CHANGE \`group\` \`step\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue