From aec3cb49dec566bea38f1a82ae13191574044c58 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Thu, 13 Jul 2023 15:48:18 +0700 Subject: [PATCH 1/2] set file build image harbor --- .github/workflows/release.yaml | 136 ++++++++++++++++----------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f4165e139..3ea8a995e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,72 +15,72 @@ env: COMPOSE_PATH: /home/frappet/docker/bma-ehr TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: - # # act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=test-v1 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd - # release-test: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # # skip Set up QEMU because it fail on act and container - # # Gen Version try to get version from tag or inut - # - name: Gen Version - # id: gen_ver - # run: | - # if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - # IMAGE_VER='${GITHUB_REF/refs\/tags\//}' - # else - # IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - # fi - # if [[ $IMAGE_VER == '' ]]; then - # IMAGE_VER='test-vBeta' - # fi - # echo '::set-output name=image_ver::'$IMAGE_VER - # - name: Check Version - # run: | - # echo $GITHUB_REF - # echo ${{ steps.gen_ver.outputs.image_ver }} + # act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=test-v1 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd + release-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # skip Set up QEMU because it fail on act and container + # Gen Version try to get version from tag or inut + - name: Gen Version + id: gen_ver + run: | + if [[ $GITHUB_REF == 'refs/tags/'* ]]; then + IMAGE_VER='${GITHUB_REF/refs\/tags\//}' + else + IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} + fi + if [[ $IMAGE_VER == '' ]]; then + IMAGE_VER='test-vBeta' + fi + echo '::set-output name=image_ver::'$IMAGE_VER + - name: Check Version + run: | + echo $GITHUB_REF + echo ${{ steps.gen_ver.outputs.image_ver }} - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 - # - name: Login in to registry - # uses: docker/login-action@v2 - # with: - # registry: ${{env.REGISTRY}} - # username: ${{secrets.DOCKER_USER}} - # password: ${{secrets.DOCKER_PASS}} - # - name: Build and push docker image - # uses: docker/build-push-action@v3 - # with: - # context: . - # platforms: linux/amd64 - # push: true - # tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest - # - name: Remote Deployment - # uses: appleboy/ssh-action@v0.1.8 - # with: - # host: ${{env.DEPLOY_HOST}} - # username: frappet - # password: ${{ secrets.SSH_PASSWORD }} - # port: 22 - # script: | - # cd "${{env.COMPOSE_PATH}}" - # docker-compose pull - # docker-compose up -d - # echo "${{ steps.gen_ver.outputs.image_ver }}"> success - # - uses: snow-actions/line-notify@v1.1.0 - # if: success() - # with: - # access_token: ${{ env.TOKEN_LINE }} - # message: | - # -Success✅✅✅ - # Image: ${{env.IMAGE_NAME}} - # Version: ${{ github.event.inputs.IMAGE_VER }} - # By: ${{secrets.DOCKER_USER}} - # - uses: snow-actions/line-notify@v1.1.0 - # if: failure() - # with: - # access_token: ${{ env.TOKEN_LINE }} - # message: | - # -Failure❌❌❌ - # Image: ${{env.IMAGE_NAME}} - # Version: ${{ github.event.inputs.IMAGE_VER }} - # By: ${{secrets.DOCKER_USER}} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login in to registry + uses: docker/login-action@v2 + with: + registry: ${{env.REGISTRY}} + username: ${{secrets.DOCKER_USER}} + password: ${{secrets.DOCKER_PASS}} + - name: Build and push docker image + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest + - name: Remote Deployment + uses: appleboy/ssh-action@v0.1.8 + with: + host: ${{env.DEPLOY_HOST}} + username: frappet + password: ${{ secrets.SSH_PASSWORD }} + port: 22 + script: | + cd "${{env.COMPOSE_PATH}}" + docker-compose pull + docker-compose up -d + echo "${{ steps.gen_ver.outputs.image_ver }}"> success + - uses: snow-actions/line-notify@v1.1.0 + if: success() + with: + access_token: ${{ env.TOKEN_LINE }} + message: | + -Success✅✅✅ + Image: ${{env.IMAGE_NAME}} + Version: ${{ github.event.inputs.IMAGE_VER }} + By: ${{secrets.DOCKER_USER}} + - uses: snow-actions/line-notify@v1.1.0 + if: failure() + with: + access_token: ${{ env.TOKEN_LINE }} + message: | + -Failure❌❌❌ + Image: ${{env.IMAGE_NAME}} + Version: ${{ github.event.inputs.IMAGE_VER }} + By: ${{secrets.DOCKER_USER}} From b29c6ca262cb851e8d36263e7e5d44a3d7d4fbcd Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Thu, 13 Jul 2023 16:15:58 +0700 Subject: [PATCH 2/2] =?UTF-8?q?api=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=A5?= =?UTF-8?q?=E0=B8=B0=E0=B9=80=E0=B8=AD=E0=B8=B5=E0=B8=A2=E0=B8=94=E0=B8=9A?= =?UTF-8?q?=E0=B8=A3=E0=B8=A3=E0=B8=88=E0=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 3 +- src/api/index.ts | 2 +- .../components/PersonalDetail/Detail.vue | 48 +- .../PersonalDetail/Information/Address.vue | 437 ++------- .../PersonalDetail/Information/Family.vue | 836 ++---------------- .../05_placement/interface/index/Main.ts | 32 +- 6 files changed, 230 insertions(+), 1128 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 306bdee6b..d655ad806 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -1,5 +1,6 @@ import env from "../index"; -const placement = `${env.API_PLACEMENT_URI}/Placement/placement`; +// const placement = `${env.API_PLACEMENT_URI}/placement`; +const placement = `${env.API_URI}/placement`; const orgTree = `${env.API_URI_ORG_TREE}`; export default { diff --git a/src/api/index.ts b/src/api/index.ts index 9ba34e3bc..e02e135df 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -20,7 +20,7 @@ const config = ref({ API_CANDIDATE_URI: "https://bma-ehr.frappet.synology.me/api/v1", // API_REPORT_URI: "https://localhost:7187/api/v1", API_REPORT_URI: "https://bma-ehr.frappet.synology.me/api/v1", - API_PLACEMENT_URI: "https://localhost:7260/api", + API_PLACEMENT_URI: "https://localhost:7260/api/v1", API_URI_ORG_TREE: "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230712_172702.json", MEET_URI: "meet.frappet.com", diff --git a/src/modules/05_placement/components/PersonalDetail/Detail.vue b/src/modules/05_placement/components/PersonalDetail/Detail.vue index c68167ce6..7f55d64d1 100644 --- a/src/modules/05_placement/components/PersonalDetail/Detail.vue +++ b/src/modules/05_placement/components/PersonalDetail/Detail.vue @@ -17,6 +17,11 @@ import ExamResult from "@/modules/05_placement/components/PersonalDetail/ExamRes import Qualification from "@/modules/05_placement/components/PersonalDetail/Qualification.vue"; import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue"; +import { + AddressDataDefualt, + FamilyDataDefualt, +} from "@/modules/05_placement/interface/index/Main"; + import type { Property, PointExam, @@ -77,43 +82,6 @@ const InformationDataDefualt: Information = { religionId: "", }; -const FamilyDataDefualt: Family = { - couple: false, - marryPrefix: "", - marryPrefixId: "", - marryFirstName: "", - marryLastName: "", - marryOccupation: "", - fatherPrefix: "", - fatherPrefixId: "", - fatherFirstName: "", - fatherLastName: "", - fatherOccupation: "", - motherPrefix: "", - motherPrefixId: "", - motherFirstName: "", - motherLastName: "", - motherOccupation: "", -}; - -const AddressDataDefualt: Address = { - registSubDistrict: "", - registSubDistrictId: "", - registZipCode: "", - registDistrict: "", - registDistrictId: "", - registProvince: "", - registProvinceId: "", - currentSubDistrict: "", - currentSubDistrictId: "", - currentZipCode: "", - currentDistrict: "", - currentDistrictId: "", - currentProvince: "", - currentProvinceId: "", - registSame: false, -}; - const personalData = ref({ id: "", fullName: "", @@ -157,7 +125,9 @@ const fetchData = async () => { InformationData.value.age = data.age; InformationData.value.telephone = data.telephone; - AddressData.value.registSame = data.registSame ?? false; + AddressData.value.registAddress = data.registAddress ?? ""; + AddressData.value.currentAddress = data.currentAddress ?? ""; + AddressData.value.registSame = data.registSame ? "1" : "0"; AddressData.value.registSubDistrict = data.registSubDistrict ?? ""; AddressData.value.registSubDistrictId = data.registSubDistrictId ?? ""; AddressData.value.registZipCode = data.registZipCode ?? ""; @@ -173,7 +143,7 @@ const fetchData = async () => { AddressData.value.currentProvince = data.currentProvince ?? ""; AddressData.value.currentProvinceId = data.currentProvinceId ?? ""; - FamilyData.value.couple = data.couple ?? false; + FamilyData.value.couple = data.couple ? "1" : "0"; FamilyData.value.marryPrefix = data.marryPrefix ?? ""; FamilyData.value.marryPrefixId = data.marryPrefixId ?? ""; FamilyData.value.marryFirstName = data.marryFirstName ?? ""; diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Address.vue b/src/modules/05_placement/components/PersonalDetail/Information/Address.vue index e5afc189b..00c482ab1 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Address.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Address.vue @@ -2,19 +2,13 @@