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}} 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 @@