This commit is contained in:
parent
22639e72c6
commit
55085ab8d8
10 changed files with 16 additions and 15 deletions
|
|
@ -7502,6 +7502,7 @@ export class CommandController extends Controller {
|
||||||
where: {
|
where: {
|
||||||
profileId: item.posMasterChild.current_holderId,
|
profileId: item.posMasterChild.current_holderId,
|
||||||
status: true,
|
status: true,
|
||||||
|
isDeleted: false
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -599,7 +599,7 @@ export class PosMasterActController extends Controller {
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
"dateEnd",
|
"dateEnd",
|
||||||
],
|
],
|
||||||
where: { profileId, status: true },
|
where: { profileId, status: true, isDeleted: false },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (existingActivePositions.length > 0) {
|
if (existingActivePositions.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export class ProfileActpositionEmployeeController extends Controller {
|
||||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||||
}
|
}
|
||||||
const getProfileActpositionId = await this.profileActpositionRepo.find({
|
const getProfileActpositionId = await this.profileActpositionRepo.find({
|
||||||
where: { profileEmployeeId: profile.id },
|
where: { profileEmployeeId: profile.id, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
if (!getProfileActpositionId) {
|
if (!getProfileActpositionId) {
|
||||||
|
|
@ -58,7 +58,7 @@ export class ProfileActpositionEmployeeController extends Controller {
|
||||||
if (_workflow == false)
|
if (_workflow == false)
|
||||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId);
|
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId);
|
||||||
const getProfileActpositionId = await this.profileActpositionRepo.find({
|
const getProfileActpositionId = await this.profileActpositionRepo.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
if (!getProfileActpositionId) {
|
if (!getProfileActpositionId) {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export class ProfileActpositionEmployeeTempController extends Controller {
|
||||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||||
}
|
}
|
||||||
const getProfileActpositionId = await this.profileActpositionRepo.find({
|
const getProfileActpositionId = await this.profileActpositionRepo.find({
|
||||||
where: { profileEmployeeId: profile.id },
|
where: { profileEmployeeId: profile.id, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
if (!getProfileActpositionId) {
|
if (!getProfileActpositionId) {
|
||||||
|
|
@ -57,7 +57,7 @@ export class ProfileActpositionEmployeeTempController extends Controller {
|
||||||
let _workflow = await new permission().Workflow(req, profileEmployeeId, "SYS_REGISTRY_TEMP");
|
let _workflow = await new permission().Workflow(req, profileEmployeeId, "SYS_REGISTRY_TEMP");
|
||||||
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const getProfileActpositionId = await this.profileActpositionRepo.find({
|
const getProfileActpositionId = await this.profileActpositionRepo.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
if (!getProfileActpositionId) {
|
if (!getProfileActpositionId) {
|
||||||
|
|
|
||||||
|
|
@ -1505,7 +1505,7 @@ export class ProfileController extends Controller {
|
||||||
|
|
||||||
const actposition_raw = await this.profileActpositionRepo.find({
|
const actposition_raw = await this.profileActpositionRepo.find({
|
||||||
select: ["dateStart", "dateEnd", "position"],
|
select: ["dateStart", "dateEnd", "position"],
|
||||||
where: { profileId: id },
|
where: { profileId: id, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
const assistance_raw = await this.profileAssistanceRepository.find({
|
const assistance_raw = await this.profileAssistanceRepository.find({
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export class ProfileDevelopmentEmployeeController extends Controller {
|
||||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||||
}
|
}
|
||||||
const lists = await this.developmentRepository.find({
|
const lists = await this.developmentRepository.find({
|
||||||
where: { profileEmployeeId: profile.id },
|
where: { profileEmployeeId: profile.id, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(lists);
|
return new HttpSuccess(lists);
|
||||||
|
|
@ -65,7 +65,7 @@ export class ProfileDevelopmentEmployeeController extends Controller {
|
||||||
|
|
||||||
let query = await AppDataSource.getRepository(ProfileDevelopment)
|
let query = await AppDataSource.getRepository(ProfileDevelopment)
|
||||||
.createQueryBuilder("profileDevelopment")
|
.createQueryBuilder("profileDevelopment")
|
||||||
.where({ profileEmployeeId: profileId })
|
.where({ profileEmployeeId: profileId, isDeleted: false })
|
||||||
.andWhere(
|
.andWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
qb.where(
|
qb.where(
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export class ProfileDevelopmentEmployeeTempController extends Controller {
|
||||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||||
}
|
}
|
||||||
const lists = await this.developmentRepository.find({
|
const lists = await this.developmentRepository.find({
|
||||||
where: { profileEmployeeId: profile.id },
|
where: { profileEmployeeId: profile.id, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(lists);
|
return new HttpSuccess(lists);
|
||||||
|
|
@ -52,7 +52,7 @@ export class ProfileDevelopmentEmployeeTempController extends Controller {
|
||||||
let _workflow = await new permission().Workflow(req, profileId, "SYS_REGISTRY_TEMP");
|
let _workflow = await new permission().Workflow(req, profileId, "SYS_REGISTRY_TEMP");
|
||||||
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const lists = await this.developmentRepository.find({
|
const lists = await this.developmentRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(lists);
|
return new HttpSuccess(lists);
|
||||||
|
|
|
||||||
|
|
@ -1501,7 +1501,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
|
|
||||||
const actposition_raw = await this.profileActpositionRepo.find({
|
const actposition_raw = await this.profileActpositionRepo.find({
|
||||||
select: ["dateStart", "dateEnd", "position"],
|
select: ["dateStart", "dateEnd", "position"],
|
||||||
where: { profileEmployeeId: id },
|
where: { profileEmployeeId: id, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
const assistance_raw = await this.profileAssistanceRepository.find({
|
const assistance_raw = await this.profileAssistanceRepository.find({
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export class ProfileTrainingEmployeeController extends Controller {
|
||||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||||
}
|
}
|
||||||
const record = await this.trainingRepo.find({
|
const record = await this.trainingRepo.find({
|
||||||
where: { profileEmployeeId: profile.id },
|
where: { profileEmployeeId: profile.id, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
|
|
@ -52,7 +52,7 @@ export class ProfileTrainingEmployeeController extends Controller {
|
||||||
if (_workflow == false)
|
if (_workflow == false)
|
||||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId);
|
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId);
|
||||||
const record = await this.trainingRepo.find({
|
const record = await this.trainingRepo.find({
|
||||||
where: { profileEmployeeId },
|
where: { profileEmployeeId, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export class ProfileTrainingEmployeeTempController extends Controller {
|
||||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||||
}
|
}
|
||||||
const record = await this.trainingRepo.find({
|
const record = await this.trainingRepo.find({
|
||||||
where: { profileEmployeeId: profile.id },
|
where: { profileEmployeeId: profile.id, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
|
|
@ -51,7 +51,7 @@ export class ProfileTrainingEmployeeTempController extends Controller {
|
||||||
let _workflow = await new permission().Workflow(req, profileEmployeeId, "SYS_REGISTRY_TEMP");
|
let _workflow = await new permission().Workflow(req, profileEmployeeId, "SYS_REGISTRY_TEMP");
|
||||||
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
if (_workflow == false) await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.trainingRepo.find({
|
const record = await this.trainingRepo.find({
|
||||||
where: { profileEmployeeId },
|
where: { profileEmployeeId, isDeleted: false },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue