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