เลขที่ตำแหน่ง ลูกจ้าง
This commit is contained in:
parent
a29a3386d7
commit
6a4f032b01
2 changed files with 93 additions and 66 deletions
72
.github/workflows/release.yaml
vendored
72
.github/workflows/release.yaml
vendored
|
|
@ -67,40 +67,40 @@ jobs:
|
|||
docker compose pull
|
||||
docker compose up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
- name: Notify Discord Success
|
||||
if: success()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "✅ Deployment Success!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
"color": 3066993,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/success-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
# - name: Notify Discord Success
|
||||
# if: success()
|
||||
# run: |
|
||||
# curl -H "Content-Type: application/json" \
|
||||
# -X POST \
|
||||
# -d '{
|
||||
# "embeds": [{
|
||||
# "title": "✅ Deployment Success!",
|
||||
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
# "color": 3066993,
|
||||
# "footer": {
|
||||
# "text": "Release Notification",
|
||||
# "icon_url": "https://example.com/success-icon.png"
|
||||
# },
|
||||
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
# }]
|
||||
# }' \
|
||||
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
- name: Notify Discord Failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "❌ Deployment Failed!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
"color": 15158332,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/failure-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
# - name: Notify Discord Failure
|
||||
# if: failure()
|
||||
# run: |
|
||||
# curl -H "Content-Type: application/json" \
|
||||
# -X POST \
|
||||
# -d '{
|
||||
# "embeds": [{
|
||||
# "title": "❌ Deployment Failed!",
|
||||
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
# "color": 15158332,
|
||||
# "footer": {
|
||||
# "text": "Release Notification",
|
||||
# "icon_url": "https://example.com/failure-icon.png"
|
||||
# },
|
||||
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
# }]
|
||||
# }' \
|
||||
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
|
|
@ -263,17 +263,18 @@ export class ProfileEmployeeController extends Controller {
|
|||
: null,
|
||||
position: Extension.ToThaiNumber(
|
||||
Extension.ToThaiNumber(
|
||||
`${item.positionName != null ? item.positionName : "-"} ${item.positionType == null ? (item.positionCee??"") : (item.positionType == "อำนวยการ" || item.positionType == "บริหาร" ? item.positionType : "") + item.positionLevel}`,
|
||||
`${item.positionName != null ? item.positionName : "-"} ${item.positionType == null ? item.positionCee ?? "" : (item.positionType == "อำนวยการ" || item.positionType == "บริหาร" ? item.positionType : "") + item.positionLevel}`,
|
||||
),
|
||||
),
|
||||
posNo: item.posNo != null ? Extension.ToThaiNumber(item.posNo) : "",
|
||||
orgRoot: item.orgRoot != null ? Extension.ToThaiNumber( item.orgRoot) : "",
|
||||
orgChild1: item.orgChild1 != null ? Extension.ToThaiNumber( item.orgChild1) : "",
|
||||
orgChild2: item.orgChild2 != null ? Extension.ToThaiNumber( item.orgChild2) : "",
|
||||
orgChild3: item.orgChild3 != null ? Extension.ToThaiNumber( item.orgChild3) : "",
|
||||
orgChild4: item.orgChild4 != null ? Extension.ToThaiNumber( item.orgChild4) : "",
|
||||
positionCee: item.positionCee != null ? Extension.ToThaiNumber( item.positionCee) : "",
|
||||
positionExecutive: item.positionExecutive != null ? Extension.ToThaiNumber( item.positionExecutive) : "",
|
||||
orgRoot: item.orgRoot != null ? Extension.ToThaiNumber(item.orgRoot) : "",
|
||||
orgChild1: item.orgChild1 != null ? Extension.ToThaiNumber(item.orgChild1) : "",
|
||||
orgChild2: item.orgChild2 != null ? Extension.ToThaiNumber(item.orgChild2) : "",
|
||||
orgChild3: item.orgChild3 != null ? Extension.ToThaiNumber(item.orgChild3) : "",
|
||||
orgChild4: item.orgChild4 != null ? Extension.ToThaiNumber(item.orgChild4) : "",
|
||||
positionCee: item.positionCee != null ? Extension.ToThaiNumber(item.positionCee) : "",
|
||||
positionExecutive:
|
||||
item.positionExecutive != null ? Extension.ToThaiNumber(item.positionExecutive) : "",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
|
|
@ -350,7 +351,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
salary_raw.length > 0 && salary_raw[0].positionName != null
|
||||
? Extension.ToThaiNumber(
|
||||
Extension.ToThaiNumber(
|
||||
`${salary_raw[0].positionName != null ? salary_raw[0].positionName : "-"} ${salary_raw[0].positionType == null ? (salary_raw[0].positionCee??"") : (salary_raw[0].positionType == "อำนวยการ" || salary_raw[0].positionType == "บริหาร" ? salary_raw[0].positionType : "") + salary_raw[0].positionLevel}`,
|
||||
`${salary_raw[0].positionName != null ? salary_raw[0].positionName : "-"} ${salary_raw[0].positionType == null ? salary_raw[0].positionCee ?? "" : (salary_raw[0].positionType == "อำนวยการ" || salary_raw[0].positionType == "บริหาร" ? salary_raw[0].positionType : "") + salary_raw[0].positionLevel}`,
|
||||
),
|
||||
)
|
||||
: "",
|
||||
|
|
@ -2105,20 +2106,20 @@ export class ProfileEmployeeController extends Controller {
|
|||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.where(
|
||||
requestBody.keyword != null && requestBody.keyword != ""
|
||||
requestBody.keyword != null && requestBody.keyword != ""
|
||||
? `CONCAT(profileEmployee.prefix, profileEmployee.firstName," ",profileEmployee.lastName) LIKE :keyword`
|
||||
: "1=1",
|
||||
{
|
||||
keyword: `%${requestBody.keyword}%`,
|
||||
})
|
||||
.orWhere(
|
||||
requestBody.keyword != null && requestBody.keyword != ""
|
||||
? "profileEmployee.citizenId LIKE :keyword"
|
||||
: "1=1",
|
||||
{
|
||||
keyword: `%${requestBody.keyword}%`,
|
||||
},
|
||||
);
|
||||
},
|
||||
).orWhere(
|
||||
requestBody.keyword != null && requestBody.keyword != ""
|
||||
? "profileEmployee.citizenId LIKE :keyword"
|
||||
: "1=1",
|
||||
{
|
||||
keyword: `%${requestBody.keyword}%`,
|
||||
},
|
||||
);
|
||||
}),
|
||||
)
|
||||
.andWhere(
|
||||
|
|
@ -2423,7 +2424,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
},
|
||||
});
|
||||
|
||||
const _profile = {
|
||||
const _profile: any = {
|
||||
profileId: profile.id,
|
||||
prefix: profile.prefix,
|
||||
rank: profile.rank,
|
||||
|
|
@ -2482,6 +2483,32 @@ export class ProfileEmployeeController extends Controller {
|
|||
? `${root?.orgRootShortName}${posMaster?.posMasterNo}`
|
||||
: "",
|
||||
};
|
||||
if (_profile.child4Id != null) {
|
||||
_profile.node = 4;
|
||||
_profile.nodeId = _profile.child4Id;
|
||||
_profile.nodeDnaId = _profile.child4DnaId;
|
||||
_profile.nodeShortName = _profile.child4ShortName;
|
||||
} else if (_profile.child3Id != null) {
|
||||
_profile.node = 3;
|
||||
_profile.nodeId = _profile.child3Id;
|
||||
_profile.nodeDnaId = _profile.child3DnaId;
|
||||
_profile.nodeShortName = _profile.child3ShortName;
|
||||
} else if (_profile.child2Id != null) {
|
||||
_profile.node = 2;
|
||||
_profile.nodeId = _profile.child2Id;
|
||||
_profile.nodeDnaId = _profile.child2DnaId;
|
||||
_profile.nodeShortName = _profile.child2ShortName;
|
||||
} else if (_profile.child1Id != null) {
|
||||
_profile.node = 1;
|
||||
_profile.nodeId = _profile.child1Id;
|
||||
_profile.nodeDnaId = _profile.child1DnaId;
|
||||
_profile.nodeShortName = _profile.child1ShortName;
|
||||
} else if (_profile.rootId != null) {
|
||||
_profile.node = 0;
|
||||
_profile.nodeId = _profile.rootId;
|
||||
_profile.nodeDnaId = _profile.rootDnaId;
|
||||
_profile.nodeShortName = _profile.rootShortName;
|
||||
}
|
||||
return new HttpSuccess(_profile);
|
||||
}
|
||||
|
||||
|
|
@ -4099,7 +4126,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
where: { id: id },
|
||||
});
|
||||
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
let _null:any = null;
|
||||
let _null: any = null;
|
||||
profile.isLeave = requestBody.isLeave;
|
||||
profile.leaveReason = requestBody.leaveReason;
|
||||
profile.dateLeave = requestBody.dateLeave;
|
||||
|
|
@ -4706,14 +4733,14 @@ export class ProfileEmployeeController extends Controller {
|
|||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบแบบร่างโครงสร้าง");
|
||||
}
|
||||
|
||||
const permissionProflile = await this.permissionProflileRepository.findOne({
|
||||
relations : ["orgRootTree"],
|
||||
where:{
|
||||
const permissionProflile = await this.permissionProflileRepository.findOne({
|
||||
relations: ["orgRootTree"],
|
||||
where: {
|
||||
profileId: id,
|
||||
orgRootTree:{
|
||||
orgRevisionId: orgRevisionPublish.id
|
||||
}
|
||||
}
|
||||
orgRootTree: {
|
||||
orgRevisionId: orgRevisionPublish.id,
|
||||
},
|
||||
},
|
||||
});
|
||||
const posMaster =
|
||||
profile.current_holders == null ||
|
||||
|
|
@ -4825,8 +4852,8 @@ export class ProfileEmployeeController extends Controller {
|
|||
? `${profile.profileEducations[0].degree ?? ""} ${profile.profileEducations[0].field ?? ""}`
|
||||
: "-",
|
||||
statusCheckEdit: profile.statusCheckEdit,
|
||||
isEdit: permissionProflile?.isEdit??false,
|
||||
isCheck: permissionProflile?.isCheck??false,
|
||||
isEdit: permissionProflile?.isEdit ?? false,
|
||||
isCheck: permissionProflile?.isCheck ?? false,
|
||||
};
|
||||
|
||||
if (_profile.child4Id != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue