diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index f953cb223..000000000 --- a/.drone.yml +++ /dev/null @@ -1,296 +0,0 @@ -kind: pipeline -type: docker -name: auto-deploy - -trigger: - branch: - - dev - event: - - push - -steps: - # ============================================================ - # DOCKER BUILD & PUSH - # - # Angular build (npm ci + ng build) Dockerfile ke andar - # multi-stage me hota hai, isliye alag build step nahi chahiye. - # ============================================================ - - name: docker-build-push - image: docker - - volumes: - - name: dockersock - path: /var/run/docker.sock - - commands: - - | - set -e - - # -------------------------------------------------------- - # Repository name comes from Drone - # -------------------------------------------------------- - REPO="$${DRONE_REPO_NAME}" - REPO="$$(echo "$$REPO" | tr '[:upper:]' '[:lower:]')" - - IMAGE="harbor.lincpay:8082/lincpay/$$REPO:$${DRONE_BUILD_NUMBER}" - - echo "==========================================" - echo "DOCKER BUILD & PUSH" - echo "==========================================" - echo "Repository : $$REPO" - echo "Build : $${DRONE_BUILD_NUMBER}" - echo "Image : $$IMAGE" - echo "==========================================" - - # -------------------------------------------------------- - # Harbor login - # -------------------------------------------------------- - echo 'QVgW5QbqlKKtBU2dYApTY28Dd6J36GK3' | \ - docker login harbor.lincpay:8082 \ - -u 'robot$lincpay+drone' \ - --password-stdin - - # -------------------------------------------------------- - # Build - # -------------------------------------------------------- - echo "Building Docker image..." - - docker build \ - -t "$$IMAGE" \ - . - - # -------------------------------------------------------- - # Push - # -------------------------------------------------------- - echo "Pushing Docker image..." - - docker push "$$IMAGE" - - echo "Docker image pushed successfully." - - # ============================================================ - # DEPLOY - # ============================================================ - - name: deploy - image: docker - - volumes: - - name: dockersock - path: /var/run/docker.sock - - - name: envfiles - path: /platform-env - - commands: - - | - set -e - - # ======================================================== - # REPOSITORY / SERVICE / IMAGE - # ======================================================== - - REPO="$${DRONE_REPO_NAME}" - REPO="$$(echo "$$REPO" | tr '[:upper:]' '[:lower:]')" - - SERVICE_NAME="$${REPO}_app" - - IMAGE="harbor.lincpay:8082/lincpay/$$REPO:$${DRONE_BUILD_NUMBER}" - - echo "==========================================" - echo "DEPLOYMENT" - echo "==========================================" - echo "Repository : $$REPO" - echo "Service : $$SERVICE_NAME" - echo "Image : $$IMAGE" - echo "Placement : node.labels.environment == dev2" - echo "==========================================" - - - # ======================================================== - # VALIDATION - # ======================================================== - - if [ -z "$$REPO" ]; then - echo "ERROR: DRONE_REPO_NAME is empty." - exit 1 - fi - - if [ -z "$$SERVICE_NAME" ]; then - echo "ERROR: Service name is empty." - exit 1 - fi - - if [ -z "$$IMAGE" ]; then - echo "ERROR: Docker image is empty." - exit 1 - fi - - echo "Repository verified : $$REPO" - echo "Service verified : $$SERVICE_NAME" - echo "Image verified : $$IMAGE" - - - # ======================================================== - # HARBOR LOGIN - # - # Zaroori hai taaki --with-registry-auth worker node (dev2) ko - # valid Harbor credentials propagate kare — warna cross-node pull - # "No such image" / "no basic auth credentials" se fail hota hai. - # ======================================================== - - echo 'QVgW5QbqlKKtBU2dYApTY28Dd6J36GK3' | \ - docker login harbor.lincpay:8082 \ - -u 'robot$lincpay+drone' \ - --password-stdin - - - # ======================================================== - # EXISTING SERVICE - # ======================================================== - - if docker service ls --format '{{.Name}}' | grep -Fxq "$$SERVICE_NAME"; then - - echo "" - echo "==========================================" - echo "EXISTING SERVICE" - echo "==========================================" - echo "Service: $$SERVICE_NAME" - - - # ------------------------------------------------------ - # Check whether dev constraint already exists - # ------------------------------------------------------ - - CONSTRAINT_EXISTS=$$(docker service inspect "$$SERVICE_NAME" \ - --format '{{range .Spec.TaskTemplate.Placement.Constraints}}{{println .}}{{end}}' \ - | grep -Fx 'node.labels.environment == dev2' || true) - - - # ------------------------------------------------------ - # Add constraint if missing - # ------------------------------------------------------ - - if [ -z "$$CONSTRAINT_EXISTS" ]; then - - echo "Constraint missing." - echo "Adding: node.labels.environment == dev2" - - docker service update \ - --constraint-add 'node.labels.environment == dev2' \ - "$$SERVICE_NAME" - - else - - echo "Constraint already exists." - - fi - - - # ------------------------------------------------------ - # Update image - # ------------------------------------------------------ - - echo "Updating service image..." - - docker service update \ - --image "$$IMAGE" \ - --replicas 1 \ - --with-registry-auth \ - "$$SERVICE_NAME" - - - # ======================================================== - # NEW SERVICE - # ======================================================== - - else - - echo "" - echo "==========================================" - echo "NEW SERVICE" - echo "==========================================" - echo "Creating: $$SERVICE_NAME" - - - # ------------------------------------------------------ - # Traefik rule - # - # Construct it without allowing Drone to consume - # the shell backticks. - # ------------------------------------------------------ - - TRAEFIK_RULE='Host(`'$$REPO'.lincpay`)' - - echo "Traefik rule: $$TRAEFIK_RULE" - - - # ------------------------------------------------------ - # Create service - # ------------------------------------------------------ - - docker service create \ - --name "$$SERVICE_NAME" \ - --network edge-network \ - --replicas 1 \ - --constraint 'node.labels.environment == dev2' \ - --with-registry-auth \ - --env-file /platform-env/global.env \ - --env-file /platform-env/dev.env \ - --label traefik.enable=true \ - --label "traefik.docker.network=edge-network" \ - --label "traefik.http.routers.$$REPO.rule=$$TRAEFIK_RULE" \ - --label "traefik.http.services.$$REPO.loadbalancer.server.port=80" \ - "$$IMAGE" - - fi - - - # ======================================================== - # FINAL STATUS - # ======================================================== - - echo "" - echo "==========================================" - echo "FINAL SERVICE STATUS" - echo "==========================================" - - docker service ls \ - --filter "name=$$SERVICE_NAME" - - - echo "" - echo "==========================================" - echo "PLACEMENT CONSTRAINT" - echo "==========================================" - - docker service inspect "$$SERVICE_NAME" \ - --format '{{json .Spec.TaskTemplate.Placement}}' - - - echo "" - echo "==========================================" - echo "SERVICE TASKS" - echo "==========================================" - - docker service ps "$$SERVICE_NAME" --no-trunc - - - echo "" - echo "==========================================" - echo "DEPLOYMENT COMPLETE" - echo "==========================================" - -volumes: - # ============================================================ - # DOCKER SOCKET - # ============================================================ - - name: dockersock - host: - path: /var/run/docker.sock - - # ============================================================ - # ENVIRONMENT FILES - # ============================================================ - - name: envfiles - host: - path: /opt/platform/env diff --git a/src/app/accounts/accounts.service.ts b/src/app/accounts/accounts.service.ts index ad7e49688..ddc9efadc 100644 --- a/src/app/accounts/accounts.service.ts +++ b/src/app/accounts/accounts.service.ts @@ -74,6 +74,17 @@ export class AccountsService { return this.http.get('/fixeddepositaccounts', { params: httpParams }); } + /** + * FD Dashboard's data source: every ACTIVE FD, id/account/client/product identity, maturity date + * and deposit/maturity amounts only. Deliberately a separate, narrow endpoint rather than + * getFixedDepositAccounts() above -- that one's backend query joins in six more tables (audit + * who-did-what-when, currency, tax group) an unbounded dashboard fetch does not need, over columns + * that had no index until this feature added one (see backend migration 0571). + */ + getFixedDepositMaturityDashboard(): Observable { + return this.http.get('/fixeddepositaccounts/maturity-dashboard'); + } + getRecurringDepositAccounts(params: AccountListParams = {}): Observable { let httpParams = new HttpParams() .set('paged', 'true') diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 4136ae258..b95fd0ad1 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -63,6 +63,7 @@ import { CfcfrmsModule } from './cfcfrms/cfcfrms.module'; import { BankCalendarModule } from './bank-calendar/bank-calendar.module'; import { DeafModule } from './deaf/deaf.module'; import { SavingsDailyInterestModule } from './savings-daily-interest/savings-daily-interest.module'; +import { FdDashboardModule } from './fd-dashboard/fd-dashboard.module'; import { DicgcModule } from './dicgc/dicgc.module'; import { FiuModule } from './fiu/fiu.module'; import { GlReportsModule } from './gl-reports/gl-reports.module'; @@ -176,6 +177,7 @@ export function HttpLoaderFactory(http: HttpClient) { BankCalendarModule, DeafModule, SavingsDailyInterestModule, + FdDashboardModule, DicgcModule, FiuModule, GlReportsModule, diff --git a/src/app/core/shell/shell.component.html b/src/app/core/shell/shell.component.html index 3351e3022..7a55eb0dc 100644 --- a/src/app/core/shell/shell.component.html +++ b/src/app/core/shell/shell.component.html @@ -65,6 +65,14 @@ ESC Show Header } + + @else if (currentUrl.includes('/fd-dashboard')) { + + } @else if (currentUrl.includes('/clerk/')) {