From 5b837d8cc20dd5a776687e6c1ecf2790fe7a55bb Mon Sep 17 00:00:00 2001 From: bagusajisaputroo Date: Thu, 15 May 2025 23:20:11 +0700 Subject: [PATCH 1/7] Remove is bank on wallet history --- .../hooks/ManageWalletHistoryContext.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pages/wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx b/src/pages/wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx index b1ad5b5..1431e45 100644 --- a/src/pages/wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx +++ b/src/pages/wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx @@ -182,16 +182,16 @@ const ManageWalletContextProvider = ({ children }: { children: React.ReactNode } headerClassName: 'w-[200px]' } }, - { - accessorFn: (row) => row.group?.is_bank, - id: 'is_bank', - header: ({ column }) => , - enableSorting: false, - enableHiding: false, - meta: { - headerClassName: 'w-[200px]' - } - } + // { + // accessorFn: (row) => row.group?.is_bank, + // id: 'is_bank', + // header: ({ column }) => , + // enableSorting: false, + // enableHiding: false, + // meta: { + // headerClassName: 'w-[200px]' + // } + // } ], [] ); From d9ddbd596e10400a2c692a7562e7f67e06a53ed9 Mon Sep 17 00:00:00 2001 From: wayanrivan Date: Fri, 16 May 2025 09:37:10 +0700 Subject: [PATCH 2/7] add environment for production --- .dockerignore | 0 .woodpecker.yml | 46 +++++++++++++++++++ Dockerfile | 40 ++++++++++++++++ .../blocks/DetailTransaction.tsx | 8 ++++ ⁠docker-compose.yml | 11 +++++ 5 files changed, 105 insertions(+) create mode 100644 .dockerignore create mode 100644 .woodpecker.yml create mode 100644 Dockerfile create mode 100644 ⁠docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e69de29 diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..be0280b --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,46 @@ +steps: + - name: setup + image: node:22-alpine + commands: + - apk update && apk add git + - npm i typescript -g + - npm install + - echo '✅ success setup project' + when: + branch: + - main + + - name: build-swagger + image: node:22-alpine + environment: + NODE_ENV: prod + commands: + - npm run swagger + when: + branch: + - main + + - name: build-src + image: node:22-alpine + environment: + NODE_ENV: prod + commands: + - npm i typescript -g + - npm run build:production + - echo '✅ success compile typescript and ready to deploy' + when: + branch: + - main + + - name: deploy + image: docker + commands: + - docker builder prune -f + - docker container prune -f + - docker-compose build + - docker-compose up -d --no-deps --build --remove-orphans + volumes: + - /var/run/docker.sock:/var/run/docker.sock + when: + branch: + - main diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..471bcaf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +FROM node:22-alpine AS base + +RUN apk update && apk add git + +COPY package.json ./ + +RUN npm install +#RUN npm install typescript -g + +# add folder if needs more +COPY src ./src +# COPY config ./config +# COPY assets ./assets +COPY public ./public + +COPY tsconfig.json ./tsconfig.json + +ENV NODE_ENV=prod +# RUN npm run swagger + +RUN npm run build:production + +FROM node:22-alpine + +# Copy node modules and build directory from base image to new image +COPY --from=base ./node_modules ./node_modules +COPY --from=base ./package.json ./package.json +COPY --from=base /dist /dist +# COPY --from=base /config /config +# COPY --from=base /config /dist/config +# COPY --from=base /assets /assets +COPY --from=base /src /src +COPY --from=base /public /public + +# Expose required port +# CMD ["npm", "run", "start"] +FROM nginx:alpine +COPY --from=builder /app/dist /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx b/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx index 6a9dd4f..b16f0fd 100644 --- a/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx +++ b/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx @@ -496,11 +496,19 @@ const DetailTransaction = () => {

Full Name

+<<<<<<< Updated upstream

{transactionDetails?.origin_customer?.origin_name}

Phone Number

{transactionDetails?.origin_msisdn}

+======= +

{transactionDetails?.origin_customer?.fullname ?? transactionDetails?.origin_customer?.origin_name}

+
+
+

Phone Number

+

{transactionDetails?.origin_customer?.msisdn ?? transactionDetails?.origin_msisdn}

+>>>>>>> Stashed changes

Email

diff --git a/⁠docker-compose.yml b/⁠docker-compose.yml new file mode 100644 index 0000000..ec677ef --- /dev/null +++ b/⁠docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' + +services: + api: + image: app-dashboard:1.0.0 + container_name: app-dashboard + build: . + command: npm run start + ports: + - '4040:4040' # Specify the exposed port, we will need this to access the app from local machine + From e43f06cf2658f1cf85f7e2e005fca7a1931879d4 Mon Sep 17 00:00:00 2001 From: wayanrivan Date: Fri, 16 May 2025 09:37:52 +0700 Subject: [PATCH 3/7] add environment for production --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 471bcaf..ab64eef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,6 @@ COPY --from=base /public /public # Expose required port # CMD ["npm", "run", "start"] FROM nginx:alpine -COPY --from=builder /app/dist /usr/share/nginx/html +COPY --from=base /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file From 0b1ef14abe7748308b9472751ad6a30ee58d0ddc Mon Sep 17 00:00:00 2001 From: wayanrivan Date: Fri, 16 May 2025 10:01:50 +0700 Subject: [PATCH 4/7] update --- .../history-transaction/blocks/DetailTransaction.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx b/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx index b16f0fd..34e6b81 100644 --- a/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx +++ b/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx @@ -496,19 +496,16 @@ const DetailTransaction = () => {

Full Name

-<<<<<<< Updated upstream

{transactionDetails?.origin_customer?.origin_name}

Phone Number

{transactionDetails?.origin_msisdn}

-=======

{transactionDetails?.origin_customer?.fullname ?? transactionDetails?.origin_customer?.origin_name}

Phone Number

{transactionDetails?.origin_customer?.msisdn ?? transactionDetails?.origin_msisdn}

->>>>>>> Stashed changes

Email

From 092e91150c9a041c730042d13696debe56c9e018 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Fri, 16 May 2025 14:15:12 +0900 Subject: [PATCH 5/7] update compose --- docker-compose.yml | 10 ++++++++++ ⁠docker-compose.yml | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 docker-compose.yml delete mode 100644 ⁠docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..18dc0b1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3.9' + +services: + api: + image: app-dashboard:1.0.0 + container_name: app-dashboard + build: . + ports: + - '4040:4040' # Specify the exposed port, we will need this to access the app from local machine + diff --git a/⁠docker-compose.yml b/⁠docker-compose.yml deleted file mode 100644 index ec677ef..0000000 --- a/⁠docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: '3.9' - -services: - api: - image: app-dashboard:1.0.0 - container_name: app-dashboard - build: . - command: npm run start - ports: - - '4040:4040' # Specify the exposed port, we will need this to access the app from local machine - From c6b964f8b3edfe5ec941c108539c70a03f100fb9 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Fri, 16 May 2025 14:31:01 +0900 Subject: [PATCH 6/7] add package --- .gitignore | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a93a63a..87df3b4 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ package-lock.json package.json yarn.lock package-lock.json +package-lock.json diff --git a/package.json b/package.json index 09bf451..43c45d3 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "styled-components": "^6.1.13", "stylis": "^4.3.4", "stylis-plugin-rtl": "^2.1.1", - "sweetalert2": "^11.19.1", + "sweetalert2": "^11.21.0", "tabs": "^0.2.0", "tailwind-merge": "^2.5.4", "tailwindcss-animate": "^1.0.7", From 2575255f5bf9415e1ed55a942bcba1ac29848564 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Fri, 16 May 2025 15:04:13 +0900 Subject: [PATCH 7/7] update docker config --- Dockerfile | 23 +++++++++++------------ docker-compose.yml | 5 +++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab64eef..8fbc672 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,18 +5,21 @@ RUN apk update && apk add git COPY package.json ./ RUN npm install -#RUN npm install typescript -g +RUN npm install typescript -g # add folder if needs more COPY src ./src -# COPY config ./config -# COPY assets ./assets COPY public ./public COPY tsconfig.json ./tsconfig.json - -ENV NODE_ENV=prod -# RUN npm run swagger +COPY tsconfig.node.json ./tsconfig.node.json +COPY vite.config.ts ./vite.config.ts +COPY tailwind.config.js ./tailwind.config.js +COPY postcss.config.js ./postcss.config.js +COPY eslint.config.mjs ./eslint.config.mjs +COPY .env.production ./.env.production +COPY .prettierrc ./.prettierrc +COPY index.html ./index.html RUN npm run build:production @@ -26,15 +29,11 @@ FROM node:22-alpine COPY --from=base ./node_modules ./node_modules COPY --from=base ./package.json ./package.json COPY --from=base /dist /dist -# COPY --from=base /config /config -# COPY --from=base /config /dist/config -# COPY --from=base /assets /assets COPY --from=base /src /src COPY --from=base /public /public # Expose required port -# CMD ["npm", "run", "start"] FROM nginx:alpine -COPY --from=base /app/dist /usr/share/nginx/html -EXPOSE 80 +COPY --from=base /dist /usr/share/nginx/html + CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 18dc0b1..4d02655 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,10 @@ version: '3.9' services: api: - image: app-dashboard:1.0.0 + image: app-dashboard:1.0.1 + restart: always container_name: app-dashboard build: . ports: - - '4040:4040' # Specify the exposed port, we will need this to access the app from local machine + - '4040:80' # Specify the exposed port, we will need this to access the app from local machine