Merge branch 'develop' of github.com:Frappet/hrms-api-org into develop
This commit is contained in:
commit
8e45d1de01
2 changed files with 49 additions and 40 deletions
72
.github/workflows/release.yaml
vendored
72
.github/workflows/release.yaml
vendored
|
|
@ -67,40 +67,40 @@ jobs:
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||||
- name: Notify Discord Success
|
# - name: Notify Discord Success
|
||||||
if: success()
|
# if: success()
|
||||||
run: |
|
# run: |
|
||||||
curl -H "Content-Type: application/json" \
|
# curl -H "Content-Type: application/json" \
|
||||||
-X POST \
|
# -X POST \
|
||||||
-d '{
|
# -d '{
|
||||||
"embeds": [{
|
# "embeds": [{
|
||||||
"title": "✅ Deployment Success!",
|
# "title": "✅ Deployment Success!",
|
||||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||||
"color": 3066993,
|
# "color": 3066993,
|
||||||
"footer": {
|
# "footer": {
|
||||||
"text": "Release Notification",
|
# "text": "Release Notification",
|
||||||
"icon_url": "https://example.com/success-icon.png"
|
# "icon_url": "https://example.com/success-icon.png"
|
||||||
},
|
# },
|
||||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||||
}]
|
# }]
|
||||||
}' \
|
# }' \
|
||||||
${{ secrets.DISCORD_WEBHOOK }}
|
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
- name: Notify Discord Failure
|
# - name: Notify Discord Failure
|
||||||
if: failure()
|
# if: failure()
|
||||||
run: |
|
# run: |
|
||||||
curl -H "Content-Type: application/json" \
|
# curl -H "Content-Type: application/json" \
|
||||||
-X POST \
|
# -X POST \
|
||||||
-d '{
|
# -d '{
|
||||||
"embeds": [{
|
# "embeds": [{
|
||||||
"title": "❌ Deployment Failed!",
|
# "title": "❌ Deployment Failed!",
|
||||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
# "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||||
"color": 15158332,
|
# "color": 15158332,
|
||||||
"footer": {
|
# "footer": {
|
||||||
"text": "Release Notification",
|
# "text": "Release Notification",
|
||||||
"icon_url": "https://example.com/failure-icon.png"
|
# "icon_url": "https://example.com/failure-icon.png"
|
||||||
},
|
# },
|
||||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
# "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||||
}]
|
# }]
|
||||||
}' \
|
# }' \
|
||||||
${{ secrets.DISCORD_WEBHOOK }}
|
# ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
|
||||||
|
|
@ -3473,6 +3473,9 @@ export class CommandController extends Controller {
|
||||||
const dataDis = new ProfileDiscipline();
|
const dataDis = new ProfileDiscipline();
|
||||||
|
|
||||||
const metaDis = {
|
const metaDis = {
|
||||||
|
date: item.commandDateAffect,
|
||||||
|
refCommandDate: item.commandDateSign,
|
||||||
|
refCommandNo: item.commandNo,
|
||||||
createdUserId: req.user.sub,
|
createdUserId: req.user.sub,
|
||||||
createdFullName: req.user.name,
|
createdFullName: req.user.name,
|
||||||
lastUpdateUserId: req.user.sub,
|
lastUpdateUserId: req.user.sub,
|
||||||
|
|
@ -3481,7 +3484,7 @@ export class CommandController extends Controller {
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.assign(dataDis, { ...body, ...metaDis });
|
Object.assign(dataDis, { ...item, ...metaDis });
|
||||||
const historyDis = new ProfileDisciplineHistory();
|
const historyDis = new ProfileDisciplineHistory();
|
||||||
Object.assign(historyDis, { ...dataDis, id: undefined });
|
Object.assign(historyDis, { ...dataDis, id: undefined });
|
||||||
|
|
||||||
|
|
@ -3670,8 +3673,11 @@ export class CommandController extends Controller {
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.assign(dataDis, {
|
Object.assign(dataDis, {
|
||||||
...body,
|
...item,
|
||||||
...metaDis,
|
...metaDis,
|
||||||
|
date: item.commandDateAffect,
|
||||||
|
refCommandDate: item.commandDateSign,
|
||||||
|
refCommandNo: item.commandNo,
|
||||||
profileEmployeeId: item.profileId,
|
profileEmployeeId: item.profileId,
|
||||||
profileId: undefined,
|
profileId: undefined,
|
||||||
});
|
});
|
||||||
|
|
@ -3899,8 +3905,11 @@ export class CommandController extends Controller {
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.assign(dataDis, {
|
Object.assign(dataDis, {
|
||||||
...body,
|
...item,
|
||||||
...metaDis,
|
...metaDis,
|
||||||
|
date: item.commandDateAffect,
|
||||||
|
refCommandDate: item.commandDateSign,
|
||||||
|
refCommandNo: item.commandNo,
|
||||||
profileEmployeeId: item.profileId,
|
profileEmployeeId: item.profileId,
|
||||||
profileId: undefined,
|
profileId: undefined,
|
||||||
});
|
});
|
||||||
|
|
@ -5059,7 +5068,7 @@ export class CommandController extends Controller {
|
||||||
commandName: body.refIds[0].commandName,
|
commandName: body.refIds[0].commandName,
|
||||||
remark: body.refIds[0].remark,
|
remark: body.refIds[0].remark,
|
||||||
};
|
};
|
||||||
|
|
||||||
const dataAct = new ProfileActposition();
|
const dataAct = new ProfileActposition();
|
||||||
Object.assign(dataAct, metaAct);
|
Object.assign(dataAct, metaAct);
|
||||||
const historyAct = new ProfileActpositionHistory();
|
const historyAct = new ProfileActpositionHistory();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue