diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..f69f7c8 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,15 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries + +# For the full list of supported browsers by the Angular framework, please see: +# https://angular.io/guide/browser-support + +# You can see what browsers were selected by your queries by running: +# npx browserslist + +last 1 Chrome version +last 1 Firefox version +last 2 Edge major versions +last 2 iOS major versions +Firefox ESR diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..59d9a3a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..105c00f --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp +/out-tsc +# Only exists if Bazel was run +/bazel-out + +# dependencies +/node_modules + +# profiling files +chrome-profiler-events*.json + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# misc +/.angular/cache +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# System Files +.DS_Store +Thumbs.db diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..c7363e3 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,8 @@ +{ + "ExpandedNodes": [ + "", + "\\src", + "\\src\\environments" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/extranet_ui_ng/FileContentIndex/e6c2de4a-47b3-4d86-9723-4f2f8b582011.vsidx b/.vs/extranet_ui_ng/FileContentIndex/e6c2de4a-47b3-4d86-9723-4f2f8b582011.vsidx new file mode 100644 index 0000000..a93cc97 Binary files /dev/null and b/.vs/extranet_ui_ng/FileContentIndex/e6c2de4a-47b3-4d86-9723-4f2f8b582011.vsidx differ diff --git a/.vs/extranet_ui_ng/FileContentIndex/read.lock b/.vs/extranet_ui_ng/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/extranet_ui_ng/v17/.suo b/.vs/extranet_ui_ng/v17/.suo new file mode 100644 index 0000000..714cb74 Binary files /dev/null and b/.vs/extranet_ui_ng/v17/.suo differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..a182969 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7a13649 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:20.11.1 as builder + +WORKDIR /usr/src/app +COPY . /usr/src/app + +RUN npm install && npm run build-dev + +FROM nginx:1.14.2-alpine + +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=builder /usr/src/app/dist/ExtraNet /usr/share/nginx/html + +EXPOSE 80 +EXPOSE 443 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/angular.json b/angular.json new file mode 100644 index 0000000..76a4d81 --- /dev/null +++ b/angular.json @@ -0,0 +1,266 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "cli": { + "analytics": "f4854f29-3f5d-460e-b705-561313912e45" + }, + "version": 1, + "newProjectRoot": "projects", + "projects": { + "ExtraNet": { + "root": "", + "sourceRoot": "src", + "projectType": "application", + "prefix": "app", + "schematics": {}, + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "progress": false, + "outputPath": "dist/ExtraNet", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": [ + "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", + "./node_modules/primeng/resources/themes/saga-blue/theme.css", + "./node_modules/primeicons/primeicons.css", + "./node_modules/primeng/resources/primeng.min.css", + "./node_modules/quill/dist/quill.core.css", + "./node_modules/quill/dist/quill.snow.css", + "./src/scss/default.scss", + "./src/styles.scss" + ], + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true + }, + "configurations": { + "dev": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.dev.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "deployUrl": "", + "budgets": [ + { + "type": "initial", + "maximumWarning": "512kb", + "maximumError": "3mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "1mb", + "maximumError": "3mb" + } + ] + }, + "uat": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.uat.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "deployUrl": "", + "budgets": [ + { + "type": "initial", + "maximumWarning": "512kb", + "maximumError": "3mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "1mb", + "maximumError": "3mb" + } + ] + }, + "preprod": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.preprod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "deployUrl": "", + "budgets": [ + { + "type": "initial", + "maximumWarning": "512kb", + "maximumError": "3mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "1mb", + "maximumError": "3mb" + } + ] + }, + "prod": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "deployUrl": "", + "budgets": [ + { + "type": "initial", + "maximumWarning": "512kb", + "maximumError": "3mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "1mb", + "maximumError": "3mb" + } + ] + } + }, + "defaultConfiguration": "" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "port": 52725, + "buildTarget": "ExtraNet:build" + }, + "configurations": { + "production": { + "buildTarget": "ExtraNet:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "ExtraNet:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "karmaConfig": "karma.conf.js", + "styles": [ + "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", + "src/styles.scss", + "src/scss/default.scss", + "node_modules/quill/dist/quill.core.css", + "node_modules/quill/dist/quill.snow.css" + ], + "scripts": [ + "node_modules/quill/dist/quill.min.js" + ], + "assets": [ + "src/assets" + ] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "tsconfig.app.json", + "tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + }, + "server": { + "builder": "@angular-devkit/build-angular:server", + "options": { + "outputPath": "dist-server", + "main": "src/main.ts", + "tsConfig": "src/tsconfig.server.json", + "sourceMap": true, + "optimization": false + }, + "configurations": { + "dev": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true + }, + "production": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true + } + }, + "defaultConfiguration": "" + } + } + }, + "ExtraNet-e2e": { + "root": "e2e/", + "projectType": "application", + "architect": { + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "ExtraNet:serve" + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": "e2e/tsconfig.e2e.json", + "exclude": [ + "**/node_modules/**" + ] + } + } + } + } + }, + "defaultProject": "ExtraNet" +} diff --git a/azure-pipelines-dev.yaml b/azure-pipelines-dev.yaml new file mode 100644 index 0000000..4ad1a54 --- /dev/null +++ b/azure-pipelines-dev.yaml @@ -0,0 +1,114 @@ +# Deploy to Azure Kubernetes Service +# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: + batch: true + branches: + include: + - dev + +resources: +- repo: self + +variables: + + # Container registry service connection established during pipeline creation + dockerRegistryServiceConnection: 'aosdevacr' + imageRepository: 'extranetui' + containerRegistry: 'aosdevacr.azurecr.io' + dockerfilePath: './Dockerfile' + tag: 'dev-$(Build.BuildId)' + imagePullSecret: 'acr-pull' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + + # SonarQube service connection + sonarQubeServiceConnection: 'SonarQube-Server' + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: Build + displayName: Build and Analyze + pool: + vmImage: $(vmImageName) + steps: + + - task: SonarQubePrepare@6 + displayName: Prepare analysis on SonarQube + inputs: + SonarQube: 'SonarQube-Server' + scannerMode: 'CLI' + configMode: 'manual' + cliProjectKey: 'AOS_TravelApplication.ExtranetUI_AZGeG15Wr_tZQyWvXGx3' + cliProjectName: 'AOS-ExtranetUI' + cliSources: '.' + extraProperties: | + # Additional properties that will be passed to the scanner, + # Put one key=value per line, example: + # sonar.exclusions=**/*.bin + sonar.java.binaries=. + + - task: SonarQubeAnalyze@6 + displayName: Run SonarQube analysis + + - task: SonarQubePublish@6 + displayName: Publish quality gate result + inputs: + pollingTimeoutSec: '300' + + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + + - upload: kustomize/manifests + artifact: kustomize/manifests + +#- stage: Deploy +# displayName: Deploy stage +# dependsOn: Build +# +# jobs: +# - deployment: Deploy +# displayName: Deploy +# pool: +# vmImage: $(vmImageName) +# #name: 'Az-agent-pool' +# environment: 'aos-dev-aks' +# strategy: +# runOnce: +# deploy: +# steps: +# - task: KubernetesManifest@0 +# displayName: Create imagePullSecret +# inputs: +# connectionType: 'Kubernetes Service Connection' +# kubernetesServiceConnection: 'aos-dev-aks' +# namespace: 'dev' +# action: createSecret +# secretName: $(imagePullSecret) +# dockerRegistryEndpoint: $(dockerRegistryServiceConnection) +# +# - task: KubernetesManifest@0 +# displayName: Deploy to Kubernetes cluster +# inputs: +# connectionType: 'Kubernetes Service Connection' +# kubernetesServiceConnection: 'aos-dev-aks' +# namespace: 'dev' +# action: deploy +# manifests: | +# $(Pipeline.Workspace)/kustomize/manifests/dev.yaml +# imagePullSecrets: | +# $(imagePullSecret) +# containers: | +# $(containerRegistry)/$(imageRepository):$(tag) +# diff --git a/azure-pipelines-preprod.yaml b/azure-pipelines-preprod.yaml new file mode 100644 index 0000000..bd19c62 --- /dev/null +++ b/azure-pipelines-preprod.yaml @@ -0,0 +1,89 @@ +# Deploy to Azure Kubernetes Service +# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: + tags: + include: + - 'v-*' + branches: + exclude: + - '*' + +resources: +- repo: self + +variables: + + # Container registry service connection established during pipeline creation + dockerRegistryServiceConnection: 'aosprodacr' + imageRepository: 'extranetui' + containerRegistry: 'aosprodacr.azurecr.io' + dockerfilePath: './preprod.Dockerfile' + tag: 'preprod-$(Build.BuildId)' + imagePullSecret: 'acr-pull' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + steps: + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + + - upload: kustomize/manifests/preprod + artifact: kustomize/manifests/preprod + +- stage: Deploy + displayName: Deploy stage + dependsOn: Build + + jobs: + - deployment: Deploy + displayName: Deploy + pool: + vmImage: $(vmImageName) + environment: 'aos-preprod-aks' + strategy: + runOnce: + deploy: + steps: + - task: KubernetesManifest@0 + displayName: Create imagePullSecret + inputs: + connectionType: 'Kubernetes Service Connection' + kubernetesServiceConnection: 'aos-preprod-aks' + namespace: 'preprod' + action: createSecret + secretName: $(imagePullSecret) + dockerRegistryEndpoint: $(dockerRegistryServiceConnection) + + - task: KubernetesManifest@0 + displayName: Deploy to Kubernetes cluster + inputs: + connectionType: 'Kubernetes Service Connection' + kubernetesServiceConnection: 'aos-preprod-aks' + namespace: 'preprod' + action: deploy + manifests: | + $(Pipeline.Workspace)/kustomize/manifests/preprod/preprod.yaml + imagePullSecrets: | + $(imagePullSecret) + containers: | + $(containerRegistry)/$(imageRepository):$(tag) + diff --git a/azure-pipelines-prod.yaml b/azure-pipelines-prod.yaml new file mode 100644 index 0000000..5381dd5 --- /dev/null +++ b/azure-pipelines-prod.yaml @@ -0,0 +1,89 @@ +# Deploy to Azure Kubernetes Service +# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: + tags: + include: + - 'p-*' + branches: + exclude: + - '*' + +resources: +- repo: self + +variables: + + # Container registry service connection established during pipeline creation + dockerRegistryServiceConnection: 'aosprodacr' + imageRepository: 'extranetui' + containerRegistry: 'aosprodacr.azurecr.io' + dockerfilePath: './prod.Dockerfile' + tag: 'prod-$(Build.BuildId)' + imagePullSecret: 'acr-pull' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + steps: + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + + - upload: kustomize/manifests/prod + artifact: kustomize/manifests/prod + +- stage: Deploy + displayName: Deploy stage + dependsOn: Build + + jobs: + - deployment: Deploy + displayName: Deploy + pool: + vmImage: $(vmImageName) + environment: 'aos-prod-aks' + strategy: + runOnce: + deploy: + steps: + - task: KubernetesManifest@0 + displayName: Create imagePullSecret + inputs: + connectionType: 'Kubernetes Service Connection' + kubernetesServiceConnection: 'aos-prod-aks' + namespace: 'prod' + action: createSecret + secretName: $(imagePullSecret) + dockerRegistryEndpoint: $(dockerRegistryServiceConnection) + + - task: KubernetesManifest@0 + displayName: Deploy to Kubernetes cluster + inputs: + connectionType: 'Kubernetes Service Connection' + kubernetesServiceConnection: 'aos-prod-aks' + namespace: 'prod' + action: deploy + manifests: | + $(Pipeline.Workspace)/kustomize/manifests/prod/prod.yaml + imagePullSecrets: | + $(imagePullSecret) + containers: | + $(containerRegistry)/$(imageRepository):$(tag) + diff --git a/azure-pipelines-uat.yaml b/azure-pipelines-uat.yaml new file mode 100644 index 0000000..8cbc993 --- /dev/null +++ b/azure-pipelines-uat.yaml @@ -0,0 +1,85 @@ +# Deploy to Azure Kubernetes Service +# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: none + +resources: +- repo: self + +variables: + + # Container registry service connection established during pipeline creation + dockerRegistryServiceConnection: 'aosdevacr' + imageRepository: 'extranetui' + containerRegistry: 'aosdevacr.azurecr.io' + dockerfilePath: './uat.Dockerfile' + tag: 'uat-$(Build.BuildId)' + imagePullSecret: 'acr-pull' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + #name: 'Az-agent-pool' + steps: + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) + + - upload: kustomize/manifests/uat + artifact: kustomize/manifests/uat + +- stage: Deploy + displayName: Deploy stage + dependsOn: Build + + jobs: + - deployment: Deploy + displayName: Deploy + pool: + vmImage: $(vmImageName) + #name: 'Az-agent-pool' + environment: 'aos-uat-aks' + strategy: + runOnce: + deploy: + steps: + - task: KubernetesManifest@0 + displayName: Create imagePullSecret + inputs: + connectionType: 'Kubernetes Service Connection' + kubernetesServiceConnection: 'aos-uat-aks' + namespace: 'uat' + action: createSecret + secretName: $(imagePullSecret) + dockerRegistryEndpoint: $(dockerRegistryServiceConnection) + + - task: KubernetesManifest@0 + displayName: Deploy to Kubernetes cluster + inputs: + connectionType: 'Kubernetes Service Connection' + kubernetesServiceConnection: 'aos-uat-aks' + namespace: 'uat' + action: deploy + manifests: | + $(Pipeline.Workspace)/kustomize/manifests/uat/uat.yaml + imagePullSecrets: | + $(imagePullSecret) + containers: | + $(containerRegistry)/$(imageRepository):$(tag) + diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000..d310567 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,44 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + jasmine: { + // you can add configuration options for Jasmine here + // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html + // for example, you can disable the random execution with `random: false` + // or set a specific seed with `seed: 4321` + }, + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + jasmineHtmlReporter: { + suppressAll: true // removes the duplicated traces + }, + coverageReporter: { + dir: require('path').join(__dirname, './coverage/ExtraNet'), + subdir: '.', + reporters: [ + { type: 'html' }, + { type: 'text-summary' } + ] + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false, + restartOnFileChange: true + }); +}; diff --git a/kustomize/base/deployment.yaml b/kustomize/base/deployment.yaml new file mode 100644 index 0000000..add7dc9 --- /dev/null +++ b/kustomize/base/deployment.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: extranetui +spec: + replicas: 2 + selector: + matchLabels: + app: extranetui + template: + metadata: + annotations: + linkerd.io/inject: enabled + labels: + app: extranetui + spec: + containers: + - name: extranetui + image: aosdevacr.azurecr.io/extranetui + imagePullPolicy: Always + readinessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + livenessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + resources: + limits: + memory: "768M" + cpu: "500m" + requests: + memory: "512M" + cpu: "300m" + ports: + - name: http + containerPort: 80 + volumeMounts: + - name: config-volume + mountPath: "/app/appsettings.json" + subPath: "appsettings.json" + volumes: + - name: config-volume + configMap: + name: app-config + restartPolicy: Always + imagePullSecrets: + - name: acr-pull diff --git a/kustomize/base/hpa.yaml b/kustomize/base/hpa.yaml new file mode 100644 index 0000000..4e82fb3 --- /dev/null +++ b/kustomize/base/hpa.yaml @@ -0,0 +1,12 @@ +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: extranetui-hpa +spec: + maxReplicas: 10 + minReplicas: 2 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: extranetui + targetCPUUtilizationPercentage: 50 \ No newline at end of file diff --git a/kustomize/base/kustomization.yaml b/kustomize/base/kustomization.yaml new file mode 100644 index 0000000..af0835d --- /dev/null +++ b/kustomize/base/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +generatorOptions: + annotations: + generated: "true" + disableNameSuffixHash: true +resources: + - service.yaml + - deployment.yaml + - hpa.yaml diff --git a/kustomize/base/service.yaml b/kustomize/base/service.yaml new file mode 100644 index 0000000..bb9c0c0 --- /dev/null +++ b/kustomize/base/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: extranetui-service + labels: + app: extranetui-service +spec: + type: NodePort + selector: + app: extranetui + ports: + - name: extranetui-service-port + port: 80 + targetPort: http + sessionAffinity: ClientIP diff --git a/kustomize/manifests/dev.yaml b/kustomize/manifests/dev.yaml new file mode 100644 index 0000000..7aa5bf8 --- /dev/null +++ b/kustomize/manifests/dev.yaml @@ -0,0 +1,82 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: extranetui-service + name: extranetui-service +spec: + ports: + - name: extranetui-service-port + port: 80 + targetPort: http + selector: + app: extranetui + sessionAffinity: ClientIP + type: NodePort +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: extranetui +spec: + replicas: 2 + selector: + matchLabels: + app: extranetui + template: + metadata: + annotations: + linkerd.io/inject: enabled + labels: + app: extranetui + spec: + containers: + - image: aosdevacr.azurecr.io/extranetui + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + name: extranetui + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + resources: + limits: + cpu: 500m + memory: 768M + requests: + cpu: 300m + memory: 512M + volumeMounts: + - mountPath: /app/appsettings.json + name: config-volume + subPath: appsettings.json + imagePullSecrets: + - name: acr-pull + restartPolicy: Always + volumes: + - configMap: + name: app-config + name: config-volume +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: extranetui-hpa +spec: + maxReplicas: 5 + minReplicas: 1 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: extranetui + targetCPUUtilizationPercentage: 50 diff --git a/kustomize/manifests/preprod/preprod.yaml b/kustomize/manifests/preprod/preprod.yaml new file mode 100644 index 0000000..915246b --- /dev/null +++ b/kustomize/manifests/preprod/preprod.yaml @@ -0,0 +1,82 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: extranetui-service + name: extranetui-service +spec: + ports: + - name: extranetui-service-port + port: 80 + targetPort: http + selector: + app: extranetui + sessionAffinity: ClientIP + type: NodePort +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: extranetui +spec: + replicas: 2 + selector: + matchLabels: + app: extranetui + template: + metadata: + annotations: + linkerd.io/inject: enabled + labels: + app: extranetui + spec: + containers: + - image: aosprodacr.azurecr.io/extranetui + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + name: extranetui + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + resources: + limits: + cpu: 500m + memory: 768M + requests: + cpu: 300m + memory: 512M + volumeMounts: + - mountPath: /app/appsettings.json + name: config-volume + subPath: appsettings.json + imagePullSecrets: + - name: acr-pull + restartPolicy: Always + volumes: + - configMap: + name: app-config + name: config-volume +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: extranetui-hpa +spec: + maxReplicas: 5 + minReplicas: 1 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: extranetui + targetCPUUtilizationPercentage: 50 diff --git a/kustomize/manifests/prod/prod.yaml b/kustomize/manifests/prod/prod.yaml new file mode 100644 index 0000000..5d6da45 --- /dev/null +++ b/kustomize/manifests/prod/prod.yaml @@ -0,0 +1,82 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: extranetui-service + name: extranetui-service +spec: + ports: + - name: extranetui-service-port + port: 80 + targetPort: http + selector: + app: extranetui + sessionAffinity: ClientIP + type: NodePort +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: extranetui +spec: + replicas: 2 + selector: + matchLabels: + app: extranetui + template: + metadata: + annotations: + linkerd.io/inject: enabled + labels: + app: extranetui + spec: + containers: + - image: aosprodacr.azurecr.io/extranetui + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + name: extranetui + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + resources: + limits: + cpu: 500m + memory: 768M + requests: + cpu: 300m + memory: 512M + volumeMounts: + - mountPath: /app/appsettings.json + name: config-volume + subPath: appsettings.json + imagePullSecrets: + - name: acr-pull + restartPolicy: Always + volumes: + - configMap: + name: app-config + name: config-volume +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: extranetui-hpa +spec: + maxReplicas: 5 + minReplicas: 2 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: extranetui + targetCPUUtilizationPercentage: 50 diff --git a/kustomize/manifests/uat/uat.yaml b/kustomize/manifests/uat/uat.yaml new file mode 100644 index 0000000..7aa5bf8 --- /dev/null +++ b/kustomize/manifests/uat/uat.yaml @@ -0,0 +1,82 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: extranetui-service + name: extranetui-service +spec: + ports: + - name: extranetui-service-port + port: 80 + targetPort: http + selector: + app: extranetui + sessionAffinity: ClientIP + type: NodePort +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: extranetui +spec: + replicas: 2 + selector: + matchLabels: + app: extranetui + template: + metadata: + annotations: + linkerd.io/inject: enabled + labels: + app: extranetui + spec: + containers: + - image: aosdevacr.azurecr.io/extranetui + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + name: extranetui + ports: + - containerPort: 80 + name: http + readinessProbe: + httpGet: + path: /healthcheck + port: 80 + initialDelaySeconds: 30 + periodSeconds: 1 + resources: + limits: + cpu: 500m + memory: 768M + requests: + cpu: 300m + memory: 512M + volumeMounts: + - mountPath: /app/appsettings.json + name: config-volume + subPath: appsettings.json + imagePullSecrets: + - name: acr-pull + restartPolicy: Always + volumes: + - configMap: + name: app-config + name: config-volume +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: extranetui-hpa +spec: + maxReplicas: 5 + minReplicas: 1 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: extranetui + targetCPUUtilizationPercentage: 50 diff --git a/kustomize/overlays/dev/hpa.yaml b/kustomize/overlays/dev/hpa.yaml new file mode 100644 index 0000000..3e001a6 --- /dev/null +++ b/kustomize/overlays/dev/hpa.yaml @@ -0,0 +1,12 @@ +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: extranetui-hpa +spec: + maxReplicas: 5 + minReplicas: 1 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: extranetui + targetCPUUtilizationPercentage: 50 diff --git a/kustomize/overlays/dev/kustomization.yaml b/kustomize/overlays/dev/kustomization.yaml new file mode 100644 index 0000000..1c1a096 --- /dev/null +++ b/kustomize/overlays/dev/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +generatorOptions: + annotations: + generated: "true" + disableNameSuffixHash: true +resources: +- ../../base +patches: +- path: hpa.yaml + diff --git a/kustomize/overlays/pre-prod/kustomization.yaml b/kustomize/overlays/pre-prod/kustomization.yaml new file mode 100644 index 0000000..e69de29 diff --git a/kustomize/overlays/prod/kustomization.yaml b/kustomize/overlays/prod/kustomization.yaml new file mode 100644 index 0000000..e69de29 diff --git a/kustomize/overlays/uat/kustomization.yaml b/kustomize/overlays/uat/kustomization.yaml new file mode 100644 index 0000000..e69de29 diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..e6034d6 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +events{} + +http { + include /etc/nginx/mime.types; + server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + location / { + try_files $uri $uri/ /index.html; + } + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..d492c1f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13987 @@ +{ + "name": "extra-net", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "extra-net", + "version": "0.0.0", + "dependencies": { + "@angular/animations": "^18.1.4", + "@angular/cdk": "^18.1.4", + "@angular/common": "^18.1.4", + "@angular/compiler": "^18.1.4", + "@angular/core": "^18.1.4", + "@angular/forms": "^18.1.4", + "@angular/material": "^18.1.4", + "@angular/platform-browser": "^18.1.4", + "@angular/platform-browser-dynamic": "^18.1.4", + "@angular/router": "^18.1.4", + "@fullcalendar/angular": "^6.1.15", + "@fullcalendar/daygrid": "^6.1.15", + "@ng-select/ng-option-highlight": "^13.7.0", + "@ng-select/ng-select": "^13.7.0", + "@ngx-translate/core": "^15.0.0", + "ag-grid-angular": "^32.0.2", + "ag-grid-community": "^32.0.2", + "angular-calendar": "^0.31.1", + "crypto-js": "^4.2.0", + "date-fns": "^3.6.0", + "file-saver": "^2.0.5", + "jsencrypt": "^3.3.2", + "jspdf": "^2.5.1", + "jspdf-autotable": "^3.8.2", + "moment": "^2.30.1", + "ng-otp-input": "^1.9.3", + "ngx-cookie-service": "^18.0.0", + "primeicons": "^7.0.0", + "primeng": "^17.18.7", + "quill": "^2.0.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.3", + "xlsx": "^0.18.5", + "zone.js": "^0.14.10" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^18.1.4", + "@angular/cli": "^18.1.4", + "@angular/compiler-cli": "^18.1.4", + "@types/file-saver": "^2.0.7", + "@types/jasmine": "^5.1.4", + "@types/node": "^22.1.0", + "jasmine-core": "^5.2.0", + "karma": "^6.4.4", + "karma-chrome-launcher": "^3.2.0", + "karma-coverage": "^2.2.1", + "karma-jasmine": "^5.1.0", + "karma-jasmine-html-reporter": "^2.1.0", + "typescript": "^5.5.4", + "webpack": "^5.93.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@angular-devkit/architect": { + "version": "0.1801.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1801.4.tgz", + "integrity": "sha512-Ch1ZwRh1N/vcCKHm4ErLcgZly3tlwdLUDGBaAIlhE3YFGq543Swv6a5IcDw0veD6iGFceJAmbrp+z5hmzI8p5A==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "18.1.4", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/build-angular": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-18.1.4.tgz", + "integrity": "sha512-CCoPT2fFw1DD3j9eSP3GKbp9KfvxQQfY6kV2aec0pqL/c6byz4/ku+rsV4lwE0N/dcaglwhttq4Xf+u+pkEpiw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "2.3.0", + "@angular-devkit/architect": "0.1801.4", + "@angular-devkit/build-webpack": "0.1801.4", + "@angular-devkit/core": "18.1.4", + "@angular/build": "18.1.4", + "@babel/core": "7.24.7", + "@babel/generator": "7.24.7", + "@babel/helper-annotate-as-pure": "7.24.7", + "@babel/helper-split-export-declaration": "7.24.7", + "@babel/plugin-transform-async-generator-functions": "7.24.7", + "@babel/plugin-transform-async-to-generator": "7.24.7", + "@babel/plugin-transform-runtime": "7.24.7", + "@babel/preset-env": "7.24.7", + "@babel/runtime": "7.24.7", + "@discoveryjs/json-ext": "0.5.7", + "@ngtools/webpack": "18.1.4", + "@vitejs/plugin-basic-ssl": "1.1.0", + "ansi-colors": "4.1.3", + "autoprefixer": "10.4.19", + "babel-loader": "9.1.3", + "browserslist": "^4.21.5", + "copy-webpack-plugin": "12.0.2", + "critters": "0.0.24", + "css-loader": "7.1.2", + "esbuild-wasm": "0.21.5", + "fast-glob": "3.3.2", + "http-proxy-middleware": "3.0.0", + "https-proxy-agent": "7.0.5", + "istanbul-lib-instrument": "6.0.2", + "jsonc-parser": "3.3.1", + "karma-source-map-support": "1.4.0", + "less": "4.2.0", + "less-loader": "12.2.0", + "license-webpack-plugin": "4.0.2", + "loader-utils": "3.3.1", + "magic-string": "0.30.10", + "mini-css-extract-plugin": "2.9.0", + "mrmime": "2.0.0", + "open": "10.1.0", + "ora": "5.4.1", + "parse5-html-rewriting-stream": "7.0.0", + "picomatch": "4.0.2", + "piscina": "4.6.1", + "postcss": "8.4.38", + "postcss-loader": "8.1.1", + "resolve-url-loader": "5.0.0", + "rxjs": "7.8.1", + "sass": "1.77.6", + "sass-loader": "14.2.1", + "semver": "7.6.2", + "source-map-loader": "5.0.0", + "source-map-support": "0.5.21", + "terser": "5.29.2", + "tree-kill": "1.2.2", + "tslib": "2.6.3", + "undici": "6.19.2", + "vite": "5.3.2", + "watchpack": "2.4.1", + "webpack": "5.92.1", + "webpack-dev-middleware": "7.2.1", + "webpack-dev-server": "5.0.4", + "webpack-merge": "5.10.0", + "webpack-subresource-integrity": "5.1.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "optionalDependencies": { + "esbuild": "0.21.5" + }, + "peerDependencies": { + "@angular/compiler-cli": "^18.0.0", + "@angular/localize": "^18.0.0", + "@angular/platform-server": "^18.0.0", + "@angular/service-worker": "^18.0.0", + "@web/test-runner": "^0.18.0", + "browser-sync": "^3.0.2", + "jest": "^29.5.0", + "jest-environment-jsdom": "^29.5.0", + "karma": "^6.3.0", + "ng-packagr": "^18.0.0", + "protractor": "^7.0.0", + "tailwindcss": "^2.0.0 || ^3.0.0", + "typescript": ">=5.4 <5.6" + }, + "peerDependenciesMeta": { + "@angular/localize": { + "optional": true + }, + "@angular/platform-server": { + "optional": true + }, + "@angular/service-worker": { + "optional": true + }, + "@web/test-runner": { + "optional": true + }, + "browser-sync": { + "optional": true + }, + "jest": { + "optional": true + }, + "jest-environment-jsdom": { + "optional": true + }, + "karma": { + "optional": true + }, + "ng-packagr": { + "optional": true + }, + "protractor": { + "optional": true + }, + "tailwindcss": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/@angular-devkit/build-angular/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/@angular-devkit/build-angular/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/webpack": { + "version": "5.92.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.1.tgz", + "integrity": "sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/build-webpack": { + "version": "0.1801.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1801.4.tgz", + "integrity": "sha512-Srhs/PcnuUaMiO9FLQLi1QiGZqtnG5NTpkufjJuWxolSLGNRmb/h/ZeCYgRnxeH/4jd8GCD31RD78qy+pviiLQ==", + "dev": true, + "dependencies": { + "@angular-devkit/architect": "0.1801.4", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "webpack": "^5.30.0", + "webpack-dev-server": "^5.0.2" + } + }, + "node_modules/@angular-devkit/core": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-18.1.4.tgz", + "integrity": "sha512-lKBsvbqW2QFL8terzNuSDSmKBo8//QNRO4qU5mVJ1fFf4xBJanXKoiAMuADhx+/owVIptnYT59IZ8jUAna+Srg==", + "dev": true, + "dependencies": { + "ajv": "8.16.0", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.2", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/schematics": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-18.1.4.tgz", + "integrity": "sha512-0ekArCeYqJngCKWZ9I+RtNObP/33zGkzWdJOmCB6nj9/ZevALZ6F4RDkHp0TqDYhOt+A2muI29ZK/cILmKA+sA==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "18.1.4", + "jsonc-parser": "3.3.1", + "magic-string": "0.30.10", + "ora": "5.4.1", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular/animations": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-18.1.4.tgz", + "integrity": "sha512-m0yusB7BI3wrotx9F9rf7YUD5bvhF+lT2fLNF1QCzCU819rtLnDoj0b4/z+D0i5qe7gQjtAJ42e/Hv7eGuq0VQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "@angular/core": "18.1.4" + } + }, + "node_modules/@angular/build": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/build/-/build-18.1.4.tgz", + "integrity": "sha512-jkqccHpGhxUOe0zIHpA1nPdeuPUxnBK7Wvazc2rA+ccI30BPrROkEDbrHP8yD8JeviUCFwwLE+hM+rRg+NneVw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "2.3.0", + "@angular-devkit/architect": "0.1801.4", + "@babel/core": "7.24.7", + "@babel/helper-annotate-as-pure": "7.24.7", + "@babel/helper-split-export-declaration": "7.24.7", + "@babel/plugin-syntax-import-attributes": "7.24.7", + "@inquirer/confirm": "3.1.11", + "@vitejs/plugin-basic-ssl": "1.1.0", + "ansi-colors": "4.1.3", + "browserslist": "^4.23.0", + "critters": "0.0.24", + "esbuild": "0.21.5", + "fast-glob": "3.3.2", + "https-proxy-agent": "7.0.5", + "lmdb": "3.0.12", + "magic-string": "0.30.10", + "mrmime": "2.0.0", + "ora": "5.4.1", + "parse5-html-rewriting-stream": "7.0.0", + "picomatch": "4.0.2", + "piscina": "4.6.1", + "rollup": "4.18.0", + "sass": "1.77.6", + "semver": "7.6.2", + "undici": "6.19.2", + "vite": "5.3.2", + "watchpack": "2.4.1" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^18.0.0", + "@angular/localize": "^18.0.0", + "@angular/platform-server": "^18.0.0", + "@angular/service-worker": "^18.0.0", + "less": "^4.2.0", + "postcss": "^8.4.0", + "tailwindcss": "^2.0.0 || ^3.0.0", + "typescript": ">=5.4 <5.6" + }, + "peerDependenciesMeta": { + "@angular/localize": { + "optional": true + }, + "@angular/platform-server": { + "optional": true + }, + "@angular/service-worker": { + "optional": true + }, + "less": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tailwindcss": { + "optional": true + } + } + }, + "node_modules/@angular/cdk": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-18.1.4.tgz", + "integrity": "sha512-xFOg2wT2iLyJXqgeNRK1uF4Lxn0B1wzBjaEQoOwFm1EHOdu5D4mNOTwfuB3DkH4KWM+mI3Qtxd7vOhOXNwB3Dg==", + "dependencies": { + "tslib": "^2.3.0" + }, + "optionalDependencies": { + "parse5": "^7.1.2" + }, + "peerDependencies": { + "@angular/common": "^18.0.0 || ^19.0.0", + "@angular/core": "^18.0.0 || ^19.0.0", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/cli": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-18.1.4.tgz", + "integrity": "sha512-ppX4iilA6k+sKD6iRMRYnt2bH9Jpik+hJlndRBCjWo2EmEUQ04CBRKYONh8BLbnmwBxPG+/osUpcFrbkPCjQUw==", + "dev": true, + "dependencies": { + "@angular-devkit/architect": "0.1801.4", + "@angular-devkit/core": "18.1.4", + "@angular-devkit/schematics": "18.1.4", + "@inquirer/prompts": "5.0.7", + "@listr2/prompt-adapter-inquirer": "2.0.13", + "@schematics/angular": "18.1.4", + "@yarnpkg/lockfile": "1.1.0", + "ini": "4.1.3", + "jsonc-parser": "3.3.1", + "listr2": "8.2.3", + "npm-package-arg": "11.0.2", + "npm-pick-manifest": "9.0.1", + "pacote": "18.0.6", + "resolve": "1.22.8", + "semver": "7.6.2", + "symbol-observable": "4.0.0", + "yargs": "17.7.2" + }, + "bin": { + "ng": "bin/ng.js" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular/common": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-18.1.4.tgz", + "integrity": "sha512-No4lCrL80WlAGg0DAyuPW+jsfA6EIQ06CFrRgt3R6YFrKbIuU0NKUt+D8IB7UNgTLNYXmurxapNf8jef8rq1wg==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "@angular/core": "18.1.4", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/compiler": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-18.1.4.tgz", + "integrity": "sha512-Xdvm9trEmrWZaxCk3a7bt5kN/jdXBPukVsibFpu5lKl9ZL7j2sn4JUd7j/dVNRUIVsPahQMATAOgl8xdUJzh4Q==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "@angular/core": "18.1.4" + }, + "peerDependenciesMeta": { + "@angular/core": { + "optional": true + } + } + }, + "node_modules/@angular/compiler-cli": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-18.1.4.tgz", + "integrity": "sha512-wOOLzxPLsDYsD+f6Bqr31ol8K7I4cm4k5uuaQl+wkLBpX9AD1rMi/7CPJrXAWBdgOW67uPzAdLBsK+axKfg91w==", + "dev": true, + "dependencies": { + "@babel/core": "7.24.9", + "@jridgewell/sourcemap-codec": "^1.4.14", + "chokidar": "^3.0.0", + "convert-source-map": "^1.5.1", + "reflect-metadata": "^0.2.0", + "semver": "^7.0.0", + "tslib": "^2.3.0", + "yargs": "^17.2.1" + }, + "bin": { + "ng-xi18n": "bundles/src/bin/ng_xi18n.js", + "ngc": "bundles/src/bin/ngc.js", + "ngcc": "bundles/ngcc/index.js" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "@angular/compiler": "18.1.4", + "typescript": ">=5.4 <5.6" + } + }, + "node_modules/@angular/compiler-cli/node_modules/@babel/core": { + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz", + "integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.9", + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-module-transforms": "^7.24.9", + "@babel/helpers": "^7.24.8", + "@babel/parser": "^7.24.8", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.9", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@angular/compiler-cli/node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@angular/compiler-cli/node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@angular/compiler-cli/node_modules/@babel/generator": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz", + "integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@angular/core": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-18.1.4.tgz", + "integrity": "sha512-+N3oWYFubT3GdCkBfD/CmH4DGjr/fGFQZChWbph2ZuPpK7JYNgfyvXS4SjLtdL4WTjjBevBTgR70GyLH/5EbKA==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "rxjs": "^6.5.3 || ^7.4.0", + "zone.js": "~0.14.0" + } + }, + "node_modules/@angular/forms": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-18.1.4.tgz", + "integrity": "sha512-PYaQ7/2toAwgJWIznVWgJAd3l8mjAreilGOVIMbBIaotL/EHRQjhlikitJEFDGXeVUarY/rm3IlLWBYnLyliyg==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "@angular/common": "18.1.4", + "@angular/core": "18.1.4", + "@angular/platform-browser": "18.1.4", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/material": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-18.1.4.tgz", + "integrity": "sha512-xmKIVOKZA8yFXrw4PsBvShFSYFQCnuVNGGuJlc8S8xvURh/f9P6hAo1Ua9pSBkOKz2W2dHE+726zOqL+o4kNxg==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/animations": "^18.0.0 || ^19.0.0", + "@angular/cdk": "18.1.4", + "@angular/common": "^18.0.0 || ^19.0.0", + "@angular/core": "^18.0.0 || ^19.0.0", + "@angular/forms": "^18.0.0 || ^19.0.0", + "@angular/platform-browser": "^18.0.0 || ^19.0.0", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/platform-browser": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-18.1.4.tgz", + "integrity": "sha512-zGx33St0JVYT8EZOaf0s8Twr0RgfU2cqEAc9Wwx9HVJ0pF5y4VnftK3pewwiHWDHkPfiJy0jBKbtrkVUSbgZfg==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "@angular/animations": "18.1.4", + "@angular/common": "18.1.4", + "@angular/core": "18.1.4" + }, + "peerDependenciesMeta": { + "@angular/animations": { + "optional": true + } + } + }, + "node_modules/@angular/platform-browser-dynamic": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-18.1.4.tgz", + "integrity": "sha512-ZQQcKXGIriOzILTZxIbmDpGnwuiwfJ0xh2EmmnfC0zh/NB+li6whgplOLEciaHgsUKtDn7kNZFn2vKrx+B/cDQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "@angular/common": "18.1.4", + "@angular/compiler": "18.1.4", + "@angular/core": "18.1.4", + "@angular/platform-browser": "18.1.4" + } + }, + "node_modules/@angular/router": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-18.1.4.tgz", + "integrity": "sha512-982+bnO3uGFYjRFcQDoKmnWvUcZUvFxEpX/I2Yu+WmPJrY7fPJ693mBaWgwVFa0xIBNfjvJjNXdikGBz5UrMsw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0" + }, + "peerDependencies": { + "@angular/common": "18.1.4", + "@angular/core": "18.1.4", + "@angular/platform-browser": "18.1.4", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.0.tgz", + "integrity": "sha512-P4fwKI2mjEb3ZU5cnMJzvRsRKGBUcs8jvxIoRmr6ufAY9Xk2Bz7JubRTTivkw55c7WQJfTECeqYVa+HZ0FzREg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", + "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", + "integrity": "sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz", + "integrity": "sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.8", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.0.tgz", + "integrity": "sha512-GYM6BxeQsETc9mnct+nIIpf63SAyzvyYN7UB/IlTyd+MBg06afFGp0mIeUqGyWgS2mxad6vqbMrHVlaL3m70sQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/helper-replace-supers": "^7.25.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/traverse": "^7.25.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.0.tgz", + "integrity": "sha512-q0T+dknZS+L5LDazIP+02gEZITG5unzvb6yIjcmj5i0eFrs5ToBV2m2JGH4EsE/gtP8ygEGLGApBgRIZkTm7zg==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "regexpu-core": "^5.3.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", + "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", + "integrity": "sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.0.tgz", + "integrity": "sha512-bIkOa2ZJYn7FHnepzr5iX9Kmz8FjIz4UKzJ9zhX3dnYuVW0xul9RuR3skBfoLu+FPTQw90EHW9rJsSZhyLQ3fQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", + "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.0.tgz", + "integrity": "sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-wrap-function": "^7.25.0", + "@babel/traverse": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz", + "integrity": "sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==", + "dev": true, + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/traverse": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", + "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.0.tgz", + "integrity": "sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", + "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.0.tgz", + "integrity": "sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.0.tgz", + "integrity": "sha512-dG0aApncVQwAUJa8tP1VHTnmU67BeIQvKafd3raEx315H54FfkZSz3B/TT+33ZQAjatGJA79gZqTtqL5QZUKXw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.0.tgz", + "integrity": "sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", + "integrity": "sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.0.tgz", + "integrity": "sha512-tggFrk1AIShG/RUQbEwt2Tr/E+ObkfwrPjR6BjbRvsx24+PSjK8zrq0GWPNCjo8qpRx4DuJzlcvWJqlm+0h3kw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz", + "integrity": "sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz", + "integrity": "sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", + "integrity": "sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz", + "integrity": "sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-remap-async-to-generator": "^7.24.7", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz", + "integrity": "sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-remap-async-to-generator": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", + "integrity": "sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.0.tgz", + "integrity": "sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz", + "integrity": "sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", + "integrity": "sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.0.tgz", + "integrity": "sha512-xyi6qjr/fYU304fiRwFbekzkqVJZ6A7hOjWZd+89FVcBqPV3S9Wuozz82xdpLspckeaafntbzglaW4pqpzvtSw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-replace-supers": "^7.25.0", + "@babel/traverse": "^7.25.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", + "integrity": "sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/template": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz", + "integrity": "sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", + "integrity": "sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", + "integrity": "sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", + "integrity": "sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", + "integrity": "sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==", + "dev": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", + "integrity": "sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", + "integrity": "sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.0.tgz", + "integrity": "sha512-CQmfSnK14eYu82fu6GlCwRciHB7mp7oLN+DeyGDDwUr9cMwuSVviJKPXw/YcRYZdB1TdlLJWHHwXwnwD1WnCmQ==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", + "integrity": "sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz", + "integrity": "sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", + "integrity": "sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", + "integrity": "sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", + "integrity": "sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz", + "integrity": "sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-simple-access": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.0.tgz", + "integrity": "sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.25.0", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", + "integrity": "sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", + "integrity": "sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", + "integrity": "sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", + "integrity": "sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", + "integrity": "sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", + "integrity": "sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", + "integrity": "sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-replace-supers": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", + "integrity": "sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz", + "integrity": "sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz", + "integrity": "sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz", + "integrity": "sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz", + "integrity": "sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz", + "integrity": "sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", + "integrity": "sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "regenerator-transform": "^0.15.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", + "integrity": "sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.24.7.tgz", + "integrity": "sha512-YqXjrk4C+a1kZjewqt+Mmu2UuV1s07y8kqcUf4qYLnoqemhR4gRQikhdAhSVJioMjVTu6Mo6pAbaypEA3jY6fw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.1", + "babel-plugin-polyfill-regenerator": "^0.6.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", + "integrity": "sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", + "integrity": "sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", + "integrity": "sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", + "integrity": "sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz", + "integrity": "sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", + "integrity": "sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", + "integrity": "sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", + "integrity": "sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz", + "integrity": "sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.7.tgz", + "integrity": "sha512-1YZNsc+y6cTvWlDHidMBsQZrZfEFjRIo/BZCT906PMdzOyXtSLTgqGdrpcuTDCXyd11Am5uQULtDIcCfnTc8fQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.7", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.24.7", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.24.7", + "@babel/plugin-transform-async-generator-functions": "^7.24.7", + "@babel/plugin-transform-async-to-generator": "^7.24.7", + "@babel/plugin-transform-block-scoped-functions": "^7.24.7", + "@babel/plugin-transform-block-scoping": "^7.24.7", + "@babel/plugin-transform-class-properties": "^7.24.7", + "@babel/plugin-transform-class-static-block": "^7.24.7", + "@babel/plugin-transform-classes": "^7.24.7", + "@babel/plugin-transform-computed-properties": "^7.24.7", + "@babel/plugin-transform-destructuring": "^7.24.7", + "@babel/plugin-transform-dotall-regex": "^7.24.7", + "@babel/plugin-transform-duplicate-keys": "^7.24.7", + "@babel/plugin-transform-dynamic-import": "^7.24.7", + "@babel/plugin-transform-exponentiation-operator": "^7.24.7", + "@babel/plugin-transform-export-namespace-from": "^7.24.7", + "@babel/plugin-transform-for-of": "^7.24.7", + "@babel/plugin-transform-function-name": "^7.24.7", + "@babel/plugin-transform-json-strings": "^7.24.7", + "@babel/plugin-transform-literals": "^7.24.7", + "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", + "@babel/plugin-transform-member-expression-literals": "^7.24.7", + "@babel/plugin-transform-modules-amd": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.7", + "@babel/plugin-transform-modules-systemjs": "^7.24.7", + "@babel/plugin-transform-modules-umd": "^7.24.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", + "@babel/plugin-transform-new-target": "^7.24.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", + "@babel/plugin-transform-numeric-separator": "^7.24.7", + "@babel/plugin-transform-object-rest-spread": "^7.24.7", + "@babel/plugin-transform-object-super": "^7.24.7", + "@babel/plugin-transform-optional-catch-binding": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.7", + "@babel/plugin-transform-parameters": "^7.24.7", + "@babel/plugin-transform-private-methods": "^7.24.7", + "@babel/plugin-transform-private-property-in-object": "^7.24.7", + "@babel/plugin-transform-property-literals": "^7.24.7", + "@babel/plugin-transform-regenerator": "^7.24.7", + "@babel/plugin-transform-reserved-words": "^7.24.7", + "@babel/plugin-transform-shorthand-properties": "^7.24.7", + "@babel/plugin-transform-spread": "^7.24.7", + "@babel/plugin-transform-sticky-regex": "^7.24.7", + "@babel/plugin-transform-template-literals": "^7.24.7", + "@babel/plugin-transform-typeof-symbol": "^7.24.7", + "@babel/plugin-transform-unicode-escapes": "^7.24.7", + "@babel/plugin-transform-unicode-property-regex": "^7.24.7", + "@babel/plugin-transform-unicode-regex": "^7.24.7", + "@babel/plugin-transform-unicode-sets-regex": "^7.24.7", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.4", + "babel-plugin-polyfill-regenerator": "^0.6.1", + "core-js-compat": "^3.31.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", + "dev": true + }, + "node_modules/@babel/runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.0.tgz", + "integrity": "sha512-ubALThHQy4GCf6mbb+5ZRNmLLCI7bJ3f8Q6LHBSRlSKSWj5a7dSUzJBLv3VuIhFrFPgjF4IzPF567YG/HSCdZA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz", + "integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.0.tgz", + "integrity": "sha512-LcnxQSsd9aXOIgmmSpvZ/1yo46ra2ESYyqLcryaBZOghxy5qqOBjvCWP5JfkI8yl9rlxRgdLTTMCQQRcN2hdCg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@fullcalendar/angular": { + "version": "6.1.15", + "resolved": "https://registry.npmjs.org/@fullcalendar/angular/-/angular-6.1.15.tgz", + "integrity": "sha512-4QUwYt5X/BQIz+Y6EnRIC9el4MyLPFQ/Yq6ZDPdStH9EGOu+8mDMMCvQFj0RApIgs+uOLe9Vz92Jd4ajTBrymA==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": "12 - 18", + "@angular/core": "12 - 18", + "@fullcalendar/core": "~6.1.15" + } + }, + "node_modules/@fullcalendar/core": { + "version": "6.1.15", + "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.15.tgz", + "integrity": "sha512-BuX7o6ALpLb84cMw1FCB9/cSgF4JbVO894cjJZ6kP74jzbUZNjtwffwRdA+Id8rrLjT30d/7TrkW90k4zbXB5Q==", + "peer": true, + "dependencies": { + "preact": "~10.12.1" + } + }, + "node_modules/@fullcalendar/daygrid": { + "version": "6.1.15", + "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.15.tgz", + "integrity": "sha512-j8tL0HhfiVsdtOCLfzK2J0RtSkiad3BYYemwQKq512cx6btz6ZZ2RNc/hVnIxluuWFyvx5sXZwoeTJsFSFTEFA==", + "peerDependencies": { + "@fullcalendar/core": "~6.1.15" + } + }, + "node_modules/@inquirer/checkbox": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-2.4.2.tgz", + "integrity": "sha512-iZRNbTlSB9xXt/+jdMFViBdxw1ILWu3365rzfM5OLwAyOScbDFFGSH7LEUwoq1uOIo48ymOEwYSqP5y8hQMlmA==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.5", + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/checkbox/node_modules/@inquirer/core": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.5.tgz", + "integrity": "sha512-QWG41I7vn62O9stYKg/juKXt1PEbr/4ZZCPb4KgXDQGwgA9M5NBTQ7FnOvT1ridbxkm/wTxLCNraUs7y47pIRQ==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.11", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/checkbox/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@inquirer/checkbox/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/@inquirer/confirm": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-3.1.11.tgz", + "integrity": "sha512-3wWw10VPxQP279FO4bzWsf8YjIAq7NdwATJ4xS2h1uwsXZu/RmtOVV95rZ7yllS1h/dzu+uLewjMAzNDEj8h2w==", + "dev": true, + "dependencies": { + "@inquirer/core": "^8.2.4", + "@inquirer/type": "^1.3.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/core": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-8.2.4.tgz", + "integrity": "sha512-7vsXSfxtrrbwMTirfaKwPcjqJy7pzeuF/bP62yo1NQrRJ5HjmMlrhZml/Ljm9ODc1RnbhJlTeSnCkjtFddKjwA==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.3", + "@inquirer/type": "^1.3.3", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.9", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "picocolors": "^1.0.1", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/core/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@inquirer/core/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/@inquirer/editor": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-2.1.17.tgz", + "integrity": "sha512-hwx3VpFQzOY2hFWnY+XPsUGCIUVQ5kYxH6+CExv/RbMiAoN3zXtzj8DyrWBOHami0vBrrnPS8CTq3uQWc7N2BA==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.5", + "@inquirer/type": "^1.5.1", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/editor/node_modules/@inquirer/core": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.5.tgz", + "integrity": "sha512-QWG41I7vn62O9stYKg/juKXt1PEbr/4ZZCPb4KgXDQGwgA9M5NBTQ7FnOvT1ridbxkm/wTxLCNraUs7y47pIRQ==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.11", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/editor/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@inquirer/editor/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/@inquirer/expand": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-2.1.17.tgz", + "integrity": "sha512-s4V/dC+GeE5s97xoTtZSmC440uNKePKqZgzqEf0XM63ciilnXAtKGvoAWOePFdlK+oGTz0d8bhbPKwpKGvRYfg==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.5", + "@inquirer/type": "^1.5.1", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/expand/node_modules/@inquirer/core": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.5.tgz", + "integrity": "sha512-QWG41I7vn62O9stYKg/juKXt1PEbr/4ZZCPb4KgXDQGwgA9M5NBTQ7FnOvT1ridbxkm/wTxLCNraUs7y47pIRQ==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.11", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/expand/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@inquirer/expand/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/@inquirer/figures": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.5.tgz", + "integrity": "sha512-79hP/VWdZ2UVc9bFGJnoQ/lQMpL74mGgzSYX1xUqCVk7/v73vJCMw1VuyWN1jGkZ9B3z7THAbySqGbCNefcjfA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-2.2.4.tgz", + "integrity": "sha512-wvYnDITPQn+ltktj/O9kQjPxOvpmwcpxLWh8brAyD+jlEbihxtrx9cZdZcxqaCVQj3caw4eZa2Uq5xELo4yXkA==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.5", + "@inquirer/type": "^1.5.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input/node_modules/@inquirer/core": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.5.tgz", + "integrity": "sha512-QWG41I7vn62O9stYKg/juKXt1PEbr/4ZZCPb4KgXDQGwgA9M5NBTQ7FnOvT1ridbxkm/wTxLCNraUs7y47pIRQ==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.11", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@inquirer/input/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/@inquirer/password": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-2.1.17.tgz", + "integrity": "sha512-/u6DM/fDHXoBWyA+9aRhghkeo5smE7wO9k4E2UoJbgiRCkt3JjBEuBqLOJNrz8E16M0ez4UM1vd5cXrmICHW+A==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.5", + "@inquirer/type": "^1.5.1", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/password/node_modules/@inquirer/core": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.5.tgz", + "integrity": "sha512-QWG41I7vn62O9stYKg/juKXt1PEbr/4ZZCPb4KgXDQGwgA9M5NBTQ7FnOvT1ridbxkm/wTxLCNraUs7y47pIRQ==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.11", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/password/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@inquirer/password/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/@inquirer/prompts": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-5.0.7.tgz", + "integrity": "sha512-GFcigCxJTKCH3aECzMIu4FhgLJWnFvMXzpI4CCSoELWFtkOOU2P+goYA61+OKpGrB8fPE7q6n8zAXBSlZRrHjQ==", + "dev": true, + "dependencies": { + "@inquirer/checkbox": "^2.3.7", + "@inquirer/confirm": "^3.1.11", + "@inquirer/editor": "^2.1.11", + "@inquirer/expand": "^2.1.11", + "@inquirer/input": "^2.1.11", + "@inquirer/password": "^2.1.11", + "@inquirer/rawlist": "^2.1.11", + "@inquirer/select": "^2.3.7" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/rawlist": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-2.1.17.tgz", + "integrity": "sha512-RFrw34xU5aVlMA3ZJCaeKGxYjhu3j4i46O2GMmaRRGeLObCRM1yOKQOsRclSTzjd4A7+M5QleR2iuW/68J9Kwg==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.5", + "@inquirer/type": "^1.5.1", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/rawlist/node_modules/@inquirer/core": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.5.tgz", + "integrity": "sha512-QWG41I7vn62O9stYKg/juKXt1PEbr/4ZZCPb4KgXDQGwgA9M5NBTQ7FnOvT1ridbxkm/wTxLCNraUs7y47pIRQ==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.11", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/rawlist/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@inquirer/rawlist/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/@inquirer/select": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-2.4.2.tgz", + "integrity": "sha512-r78JlgShqRxyAtBDeBHSDtfrOhSQwm2ecWGGaxe7kD9JwgL3UN563G1ncVRYdsWD7/tigflcskfipVeoDLhLJg==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.5", + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/select/node_modules/@inquirer/core": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.5.tgz", + "integrity": "sha512-QWG41I7vn62O9stYKg/juKXt1PEbr/4ZZCPb4KgXDQGwgA9M5NBTQ7FnOvT1ridbxkm/wTxLCNraUs7y47pIRQ==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.1", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.11", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/select/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@inquirer/select/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/@inquirer/type": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.5.1.tgz", + "integrity": "sha512-m3YgGQlKNS0BM+8AFiJkCsTqHEFCWn6s/Rqye3mYwvqY6LdfUv12eSwbsgNzrYyrLXiy7IrrjDLPysaSBwEfhw==", + "dev": true, + "dependencies": { + "mute-stream": "^1.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsonjoy.com/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", + "dev": true, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.1.0.tgz", + "integrity": "sha512-zlQONA+msXPPwHWZMKFVS78ewFczIll5lXiVPwFPCZUsrOKdxc2AvxU1HoNBmMRhqDZUR9HkC3UOm+6pME6Xsg==", + "dev": true, + "dependencies": { + "@jsonjoy.com/base64": "^1.1.1", + "@jsonjoy.com/util": "^1.1.2", + "hyperdyperid": "^1.2.0", + "thingies": "^1.20.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.3.0.tgz", + "integrity": "sha512-Cebt4Vk7k1xHy87kHY7KSPLT77A7Ev7IfOblyLZhtYEhrdQ6fX4EoLq3xOQ3O/DRMEh2ok5nyC180E+ABS8Wmw==", + "dev": true, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", + "dev": true + }, + "node_modules/@listr2/prompt-adapter-inquirer": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@listr2/prompt-adapter-inquirer/-/prompt-adapter-inquirer-2.0.13.tgz", + "integrity": "sha512-nAl6teTt7EWSjttNavAnv3uFR3w3vPP3OTYmHyPNHzKhAj2NoBDHmbS3MGpvvO8KXXPASnHjEGrrKrdKTMKPnQ==", + "dev": true, + "dependencies": { + "@inquirer/type": "^1.3.3" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@inquirer/prompts": ">= 3 < 6" + } + }, + "node_modules/@lmdb/lmdb-darwin-arm64": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-3.0.12.tgz", + "integrity": "sha512-vgTwzNUD3Hy4aqtGhX2+nV/usI0mwy3hDRuTjs8VcK0BLiMVEpNQXgzwlWEgPmA8AAPloUgyOs2nK5clJF5oIg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@lmdb/lmdb-darwin-x64": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-3.0.12.tgz", + "integrity": "sha512-qOt0hAhj2ZLY6aEWu85rzt5zcyCAQITMhCMEPNlo1tuYekpVAdkQNiwXxEkCjBYvwTskvXuwXOOUpjuSc+aJnA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@lmdb/lmdb-linux-arm": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-3.0.12.tgz", + "integrity": "sha512-Ggd/UXpE+alMncbELCXA3OKpDj9bDBR3qVO7WRTxstloDglRAHfZmUJgTkeaNKjFO1JHqS7AKy0jba9XebZB1w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-linux-arm64": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-3.0.12.tgz", + "integrity": "sha512-Qy4cFXFe9h1wAWMsojex8x1ifvw2kqiZv686YiRTdQEzAfc3vJASHFcD/QejHUCx7YHMYdnUoCS45rG2AiGDTQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-linux-x64": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-3.0.12.tgz", + "integrity": "sha512-c+noT9IofktxktFllKHFmci8ka2SYGSLN17pj/KSl1hg7mmfAiGp4xxFxEwMLTb+SX95vP1DFiR++1I3WLVxvA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lmdb/lmdb-win32-x64": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-3.0.12.tgz", + "integrity": "sha512-CO3MFV8gUx16NU/CyyuumAKblESwvoGVA2XhQKZ976OTOxaTbb8F8D3f0iiZ4MYqsN74jIrFuCmXpPnpjbhfOQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@mattlewis92/dom-autoscroller": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@mattlewis92/dom-autoscroller/-/dom-autoscroller-2.4.2.tgz", + "integrity": "sha512-YbrUWREPGEjE/FU6foXcAT1YbVwqD/jkYnY1dFb0o4AxtP3s4xKBthlELjndZih8uwsDWgQZx1eNskRNe2BgZQ==" + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz", + "integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz", + "integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz", + "integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz", + "integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz", + "integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz", + "integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@ng-select/ng-option-highlight": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/@ng-select/ng-option-highlight/-/ng-option-highlight-13.7.0.tgz", + "integrity": "sha512-sh4f9DeZ24IZb4YZOW2XNw/F43W0/Nf/62DE6akQx9/NNaf5Q2lDiYbPmOraHnoaBgovN5Y0Lf6Yl1lBHZbUDQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": "^18.0.0", + "@angular/core": "^18.0.0" + } + }, + "node_modules/@ng-select/ng-select": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/@ng-select/ng-select/-/ng-select-13.7.0.tgz", + "integrity": "sha512-GMNu3bLYxWAbgy9pXZ4RgnWp/cxRcrWRQdxLLyg8p9gMCLpim1p4TXR8laXJKK25MKG/LEaWgs+90yCVOoWgZA==", + "dependencies": { + "tslib": "^2.3.1" + }, + "engines": { + "node": ">= 18", + "npm": ">= 8" + }, + "peerDependencies": { + "@angular/common": "^18.0.0", + "@angular/core": "^18.0.0", + "@angular/forms": "^18.0.0" + } + }, + "node_modules/@ngtools/webpack": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-18.1.4.tgz", + "integrity": "sha512-suoeZjd+7qd3ivzbNGGSzHtY/WMxTKU6ZD1gIIya0Un8Ve1eVxfq6Si6ReKqhygO8zN3paJMATn8sMmAV7qVrw==", + "dev": true, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^18.0.0", + "typescript": ">=5.4 <5.6", + "webpack": "^5.54.0" + } + }, + "node_modules/@ngx-translate/core": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-15.0.0.tgz", + "integrity": "sha512-Am5uiuR0bOOxyoercDnAA3rJVizo4RRqJHo8N3RqJ+XfzVP/I845yEnMADykOHvM6HkVm4SZSnJBOiz0Anx5BA==", + "engines": { + "node": "^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/common": ">=16.0.0", + "@angular/core": ">=16.0.0", + "rxjs": "^6.5.5 || ^7.4.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/agent": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", + "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.8.tgz", + "integrity": "sha512-liASfw5cqhjNW9UFd+ruwwdEf/lbOAQjLL2XY2dFW/bkJheXDYZgOyul/4gVvEV4BWkTXjYGmDqMw9uegdbJNQ==", + "dev": true, + "dependencies": { + "@npmcli/promise-spawn": "^7.0.0", + "ini": "^4.1.3", + "lru-cache": "^10.0.1", + "npm-pick-manifest": "^9.0.0", + "proc-log": "^4.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/git/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/installed-package-contents": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz", + "integrity": "sha512-c8UuGLeZpm69BryRykLuKRyKFZYJsZSCT4aVY5ds4omyZqJ172ApzgfKJ5eV/r3HgLdUYgFVe54KSFVjKoe27w==", + "dev": true, + "dependencies": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "bin/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/package-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.2.0.tgz", + "integrity": "sha512-qe/kiqqkW0AGtvBjL8TJKZk/eBBSpnJkUWvHdQ9jM2lKHXRYYJuyNpJPlJw3c8QjC2ow6NZYiLExhUaeJelbxQ==", + "dev": true, + "dependencies": { + "@npmcli/git": "^5.0.0", + "glob": "^10.2.2", + "hosted-git-info": "^7.0.0", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^6.0.0", + "proc-log": "^4.0.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@npmcli/package-json/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@npmcli/promise-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz", + "integrity": "sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ==", + "dev": true, + "dependencies": { + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/redact": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-2.0.1.tgz", + "integrity": "sha512-YgsR5jCQZhVmTJvjduTOIHph0L73pK8xwMVaDY0PatySqVM9AZj93jpoXYSJqfHFxFkN9dmqTw6OiqExsS3LPw==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-8.1.0.tgz", + "integrity": "sha512-y7efHHwghQfk28G2z3tlZ67pLG0XdfYbcVG26r7YIXALRsrVQcTq4/tdenSmdOrEsNahIYA/eh8aEVROWGFUDg==", + "dev": true, + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^5.0.0", + "@npmcli/promise-spawn": "^7.0.0", + "node-gyp": "^10.0.0", + "proc-log": "^4.0.0", + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@scarf/scarf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.3.0.tgz", + "integrity": "sha512-lHKK8M5CTcpFj2hZDB3wIjb0KAbEOgDmiJGDv1WBRfQgRm/a8/XMEkG/N1iM01xgbUDsPQwi42D+dFo1XPAKew==", + "hasInstallScript": true + }, + "node_modules/@schematics/angular": { + "version": "18.1.4", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-18.1.4.tgz", + "integrity": "sha512-M3edVYKiAGWAAKs7XDLpz1OKUy4STVMT+46Y44ydYz06hI8m/dJfS8ZHTvXPl7JhkrIrSDEMed+WidZtGPIxMg==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "18.1.4", + "@angular-devkit/schematics": "18.1.4", + "jsonc-parser": "3.3.1" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@sigstore/bundle": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.3.2.tgz", + "integrity": "sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA==", + "dev": true, + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-1.1.0.tgz", + "integrity": "sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/protobuf-specs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz", + "integrity": "sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.3.2.tgz", + "integrity": "sha512-5Vz5dPVuunIIvC5vBb0APwo7qKA4G9yM48kPWJT+OEERs40md5GoUR1yedwpekWZ4m0Hhw44m6zU+ObsON+iDA==", + "dev": true, + "dependencies": { + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.2", + "make-fetch-happen": "^13.0.1", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/tuf": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.4.tgz", + "integrity": "sha512-44vtsveTPUpqhm9NCrbU8CWLe3Vck2HO1PNLw7RIajbB7xhtn5RBPm1VNSCMwqGYHhDsBJG8gDF0q4lgydsJvw==", + "dev": true, + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.2", + "tuf-js": "^2.2.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/verify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-1.2.1.tgz", + "integrity": "sha512-8iKx79/F73DKbGfRf7+t4dqrc0bRr0thdPrxAtCKWRm/F0tG71i6O1rvlnScncJLLBZHn3h8M3c1BSUAb9yu8g==", + "dev": true, + "dependencies": { + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.1.0", + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@socket.io/component-emitter": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", + "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", + "dev": true + }, + "node_modules/@tufjs/canonical-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", + "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-2.0.1.tgz", + "integrity": "sha512-92F7/SFyufn4DXsha9+QfKnN03JGqtMFMXgSHbZOo8JG59WkTni7UzAouNQDf7AuP9OAMxVOPQcqG3sB7w+kkg==", + "dev": true, + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@tufjs/models/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bonjour": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", + "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect-history-api-fallback": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz", + "integrity": "sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==", + "dev": true, + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "node_modules/@types/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true + }, + "node_modules/@types/cors": { + "version": "2.8.17", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", + "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.0.tgz", + "integrity": "sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", + "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/file-saver": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/file-saver/-/file-saver-2.0.7.tgz", + "integrity": "sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==", + "dev": true + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true + }, + "node_modules/@types/http-proxy": { + "version": "1.17.14", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz", + "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/jasmine": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-5.1.4.tgz", + "integrity": "sha512-px7OMFO/ncXxixDe1zR13V1iycqWae0MxTaw62RpFlksUi5QuNWgQJFkTQjIOvrmutJbI7Fp2Y2N1F6D2R4G6w==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true + }, + "node_modules/@types/mute-stream": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz", + "integrity": "sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "dev": true, + "dependencies": { + "undici-types": "~6.13.0" + } + }, + "node_modules/@types/node-forge": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", + "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "dev": true + }, + "node_modules/@types/raf": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz", + "integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==", + "optional": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true + }, + "node_modules/@types/retry": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", + "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", + "dev": true + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-index": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.4.tgz", + "integrity": "sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==", + "dev": true, + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@types/sockjs": { + "version": "0.3.36", + "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.36.tgz", + "integrity": "sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/wrap-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", + "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==", + "dev": true + }, + "node_modules/@types/ws": { + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vitejs/plugin-basic-ssl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.1.0.tgz", + "integrity": "sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A==", + "dev": true, + "engines": { + "node": ">=14.6.0" + }, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, + "node_modules/abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/adjust-sourcemap-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", + "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "regex-parser": "^2.2.11" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/adjust-sourcemap-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/ag-charts-types": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/ag-charts-types/-/ag-charts-types-10.0.2.tgz", + "integrity": "sha512-Nxo5slHOXlaeg0gRIsVnovAosQzzlYfWJtdDy0Aq/VvpJru/PJ+5i2c9aCyEhgRxhBjImsoegwkgRj7gNOWV6Q==" + }, + "node_modules/ag-grid-angular": { + "version": "32.0.2", + "resolved": "https://registry.npmjs.org/ag-grid-angular/-/ag-grid-angular-32.0.2.tgz", + "integrity": "sha512-GU9m0hCgBK6DqrXJ2R8r1Vm+CutCUbgrEXtsQPWlQh9AipW9khvbMF0NzuAYpZrGnk8KI9E9+jhzWhT4ZWLOTw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": ">= 16.0.0", + "@angular/core": ">= 16.0.0", + "ag-grid-community": "32.0.2" + } + }, + "node_modules/ag-grid-community": { + "version": "32.0.2", + "resolved": "https://registry.npmjs.org/ag-grid-community/-/ag-grid-community-32.0.2.tgz", + "integrity": "sha512-vLJJUjnsG9hNK41GNuW2EHu1W264kxA/poOpcX4kmyrjU5Uzvelsbj3HdKAO9POV28iqyRdKGYfAWdn8QzA7KA==", + "dependencies": { + "ag-charts-types": "10.0.2" + } + }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/angular-calendar": { + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/angular-calendar/-/angular-calendar-0.31.1.tgz", + "integrity": "sha512-pjSIpoAaUzS/gx+14eOr4hPZhlQ8HxpiZypCSGqJNptq5PD+vOdVQ3h/Aaqnk86GraVcAQPXqfu64MtdKwTVNw==", + "dependencies": { + "@scarf/scarf": "^1.1.1", + "angular-draggable-droppable": "^8.0.0", + "angular-resizable-element": "^7.0.0", + "calendar-utils": "^0.10.4", + "positioning": "^2.0.1", + "tslib": "^2.4.1" + }, + "funding": { + "url": "https://github.com/sponsors/mattlewis92" + }, + "peerDependencies": { + "@angular/core": ">=15.0.0" + } + }, + "node_modules/angular-draggable-droppable": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/angular-draggable-droppable/-/angular-draggable-droppable-8.0.0.tgz", + "integrity": "sha512-+gpSNBbygjV1pxTxsM3UPJKcXHXJabYoTtKcgQe74rGnb1umKc07XCBD1qDzvlG/kocthvhQ12qfYOYzHnE3ZA==", + "dependencies": { + "@mattlewis92/dom-autoscroller": "^2.4.2", + "tslib": "^2.4.1" + }, + "peerDependencies": { + "@angular/core": ">=15.0.0" + } + }, + "node_modules/angular-resizable-element": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/angular-resizable-element/-/angular-resizable-element-7.0.2.tgz", + "integrity": "sha512-/BGuNiA38n9klexHO1xgnsA3VYigj9v+jUGjKtBRgfB26bCxZKsNWParSu2k3EqbATrfAJC4Nl8f7cORpJFf4w==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/core": ">=15.0.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "dev": true, + "engines": [ + "node >= 0.8.0" + ], + "bin": { + "ansi-html": "bin/ansi-html" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/autoprefixer": { + "version": "10.4.19", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", + "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001599", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/babel-loader": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.3.tgz", + "integrity": "sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==", + "dev": true, + "dependencies": { + "find-cache-dir": "^4.0.0", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0", + "webpack": ">=5" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", + "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.6.2", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz", + "integrity": "sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.1", + "core-js-compat": "^3.36.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", + "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", + "optional": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "dev": true, + "engines": { + "node": "^4.5.0 || >= 5.9" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/bonjour-service": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", + "integrity": "sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.23.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", + "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001640", + "electron-to-chromium": "^1.4.820", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "bin": { + "btoa": "bin/btoa.js" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "18.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.4.tgz", + "integrity": "sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/calendar-utils": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/calendar-utils/-/calendar-utils-0.10.4.tgz", + "integrity": "sha512-gBK4xCJ42yjaUKwuUha6cZOfxAmGzvSgbdAaX3xLRioeKbYoOK1x1qeD6dch72rsMZlTgATPbBBx42bnkStqgQ==" + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001643", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", + "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/canvg": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz", + "integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==", + "optional": true, + "dependencies": { + "@babel/runtime": "^7.12.5", + "@types/raf": "^3.4.0", + "core-js": "^3.8.3", + "raf": "^3.4.1", + "regenerator-runtime": "^0.13.7", + "rgbcolor": "^1.0.1", + "stackblur-canvas": "^2.0.0", + "svg-pathdata": "^6.0.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/canvg/node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "optional": true + }, + "node_modules/cfb": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "dependencies": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", + "dev": true + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/connect/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/connect/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true + }, + "node_modules/copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "dev": true, + "dependencies": { + "is-what": "^3.14.1" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/copy-webpack-plugin": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz", + "integrity": "sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==", + "dev": true, + "dependencies": { + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.1", + "globby": "^14.0.0", + "normalize-path": "^3.0.0", + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/core-js": { + "version": "3.37.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", + "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==", + "hasInstallScript": true, + "optional": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat": { + "version": "3.37.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz", + "integrity": "sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/critters": { + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.24.tgz", + "integrity": "sha512-Oyqew0FGM0wYUSNqR0L6AteO5MpMoUU0rhKRieXeiKs+PmRTxiJMyaunYB2KF6fQ3dzChXKCpbFOEJx3OQ1v/Q==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "css-select": "^5.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.2", + "htmlparser2": "^8.0.2", + "postcss": "^8.4.23", + "postcss-media-query-parser": "^0.2.3" + } + }, + "node_modules/critters/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/critters/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/critters/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/critters/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/critters/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/critters/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + }, + "node_modules/css-line-break": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", + "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", + "optional": true, + "dependencies": { + "utrie": "^1.0.2" + } + }, + "node_modules/css-loader": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", + "integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==", + "dev": true, + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.27.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", + "dev": true + }, + "node_modules/date-fns": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", + "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, + "node_modules/date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/default-browser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", + "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "dev": true, + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", + "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-gateway": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", + "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defaults/node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true + }, + "node_modules/di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", + "dev": true + }, + "node_modules/dns-packet": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", + "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", + "dev": true, + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", + "dev": true, + "dependencies": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/dompurify": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.6.tgz", + "integrity": "sha512-zUTaUBO8pY4+iJMPE1B9XlO2tXVYIcEA4SNGtvDELzTSCQO7RzH+j7S180BmhmJId78lqGU2z19vgVx2Sxs/PQ==", + "optional": true + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "dev": true, + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.2.tgz", + "integrity": "sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/engine.io": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.5.tgz", + "integrity": "sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==", + "dev": true, + "dependencies": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.2.1", + "ws": "~8.17.1" + }, + "engines": { + "node": ">=10.2.0" + } + }, + "node_modules/engine.io-parser": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", + "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.1.tgz", + "integrity": "sha512-QHuXVeZx9d+tIQAz/XztU0ZwZf2Agg9CcXcgE1rurqvdBeDBrpSwjl8/6XUqMg7tw2Y7uAdKb2sRv+bSEFqQ5A==", + "dev": true, + "dependencies": { + "punycode": "^1.4.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "devOptional": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "optional": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/esbuild-wasm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.21.5.tgz", + "integrity": "sha512-L/FlOPMMFtw+6qPAbuPvJXdrOYOp9yx/PEwSrIZW0qghY4vgV003evdYDwqQ/9ENMQI0B6RMod9xT4FHtto6OQ==", + "dev": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "dev": true + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "dev": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/express/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fflate": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz", + "integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==" + }, + "node_modules/file-saver": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/finalhandler/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-cache-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", + "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", + "dev": true, + "dependencies": { + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/frac": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", + "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", + "dev": true, + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", + "dev": true, + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "node_modules/hpack.js/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/hpack.js/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/hpack.js/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/html-entities": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", + "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ] + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/html2canvas": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz", + "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==", + "optional": true, + "dependencies": { + "css-line-break": "^2.1.0", + "text-segmentation": "^1.0.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, + "node_modules/http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", + "dev": true + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "dev": true + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-middleware": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-3.0.0.tgz", + "integrity": "sha512-36AV1fIaI2cWRzHo+rbcxhe3M3jUDCNzc4D5zRl57sEWRAxdXYtw7FSQKYY6PDKssiAKjLYypbssHk+xs/kMXw==", + "dev": true, + "dependencies": { + "@types/http-proxy": "^1.17.10", + "debug": "^4.3.4", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.5" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", + "dev": true, + "engines": { + "node": ">=10.18" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-walk": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.5.tgz", + "integrity": "sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A==", + "dev": true, + "dependencies": { + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ignore-walk/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/ignore-walk/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "dev": true, + "optional": true, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", + "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true + }, + "node_modules/is-network-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.1.0.tgz", + "integrity": "sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "dev": true + }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dev": true, + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "dev": true, + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jasmine-core": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.2.0.tgz", + "integrity": "sha512-tSAtdrvWybZkQmmaIoDgnvHG8ORUNw5kEVlO5CvrXj02Jjr9TZrmjFq7FUiOUzJiOP2wLGYT6PgrQgQF4R1xiw==", + "dev": true + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jiti": { + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, + "node_modules/jsencrypt": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/jsencrypt/-/jsencrypt-3.3.2.tgz", + "integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A==" + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/jspdf": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.1.tgz", + "integrity": "sha512-hXObxz7ZqoyhxET78+XR34Xu2qFGrJJ2I2bE5w4SM8eFaFEkW2xcGRVUss360fYelwRSid/jT078kbNvmoW0QA==", + "dependencies": { + "@babel/runtime": "^7.14.0", + "atob": "^2.1.2", + "btoa": "^1.2.1", + "fflate": "^0.4.8" + }, + "optionalDependencies": { + "canvg": "^3.0.6", + "core-js": "^3.6.0", + "dompurify": "^2.2.0", + "html2canvas": "^1.0.0-rc.5" + } + }, + "node_modules/jspdf-autotable": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/jspdf-autotable/-/jspdf-autotable-3.8.2.tgz", + "integrity": "sha512-zW1ix99/mtR4MbIni7IqvrpfHmuTaICl6iv6wqjRN86Nxtwaw/QtOeDbpXqYSzHIJK9JvgtLM283sc5x+ipkJg==", + "peerDependencies": { + "jspdf": "^2.5.1" + } + }, + "node_modules/karma": { + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz", + "integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==", + "dev": true, + "dependencies": { + "@colors/colors": "1.5.0", + "body-parser": "^1.19.0", + "braces": "^3.0.2", + "chokidar": "^3.5.1", + "connect": "^3.7.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.1", + "glob": "^7.1.7", + "graceful-fs": "^4.2.6", + "http-proxy": "^1.18.1", + "isbinaryfile": "^4.0.8", + "lodash": "^4.17.21", + "log4js": "^6.4.1", + "mime": "^2.5.2", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.5", + "qjobs": "^1.2.0", + "range-parser": "^1.2.1", + "rimraf": "^3.0.2", + "socket.io": "^4.7.2", + "source-map": "^0.6.1", + "tmp": "^0.2.1", + "ua-parser-js": "^0.7.30", + "yargs": "^16.1.1" + }, + "bin": { + "karma": "bin/karma" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/karma-chrome-launcher": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", + "integrity": "sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==", + "dev": true, + "dependencies": { + "which": "^1.2.1" + } + }, + "node_modules/karma-coverage": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.1.tgz", + "integrity": "sha512-yj7hbequkQP2qOSb20GuNSIyE//PgJWHwC2IydLE6XRtsnaflv+/OSGNssPjobYUlhVVagy99TQpqUt3vAUG7A==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.1", + "istanbul-reports": "^3.0.5", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/karma-coverage/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/karma-coverage/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/karma-jasmine": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", + "integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==", + "dev": true, + "dependencies": { + "jasmine-core": "^4.1.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "karma": "^6.0.0" + } + }, + "node_modules/karma-jasmine-html-reporter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.1.0.tgz", + "integrity": "sha512-sPQE1+nlsn6Hwb5t+HHwyy0A1FNCVKuL1192b+XNauMYWThz2kweiBVW1DqloRpVvZIJkIoHVB7XRpK78n1xbQ==", + "dev": true, + "peerDependencies": { + "jasmine-core": "^4.0.0 || ^5.0.0", + "karma": "^6.0.0", + "karma-jasmine": "^5.0.0" + } + }, + "node_modules/karma-jasmine/node_modules/jasmine-core": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.1.tgz", + "integrity": "sha512-VYz/BjjmC3klLJlLwA4Kw8ytk0zDSmbbDLNs794VnWmkcCB7I9aAL/D48VNQtmITyPvea2C3jdUMfc3kAoy0PQ==", + "dev": true + }, + "node_modules/karma-source-map-support": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz", + "integrity": "sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==", + "dev": true, + "dependencies": { + "source-map-support": "^0.5.5" + } + }, + "node_modules/karma/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/karma/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/karma/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/karma/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/karma/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/karma/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/karma/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/karma/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/karma/node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/karma/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/karma/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/karma/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/launch-editor": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.8.1.tgz", + "integrity": "sha512-elBx2l/tp9z99X5H/qev8uyDywVh0VXAwEbjk8kJhnc5grOFkGh7aW6q55me9xnYbss261XtnUrysZ+XvGbhQA==", + "dev": true, + "dependencies": { + "picocolors": "^1.0.0", + "shell-quote": "^1.8.1" + } + }, + "node_modules/less": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz", + "integrity": "sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==", + "dev": true, + "dependencies": { + "copy-anything": "^2.0.1", + "parse-node-version": "^1.0.1", + "tslib": "^2.3.0" + }, + "bin": { + "lessc": "bin/lessc" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "source-map": "~0.6.0" + } + }, + "node_modules/less-loader": { + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-12.2.0.tgz", + "integrity": "sha512-MYUxjSQSBUQmowc0l5nPieOYwMzGPUaTzB6inNW/bdPEG9zOL3eAAD1Qw5ZxSPk7we5dMojHwNODYMV1hq4EVg==", + "dev": true, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "less": "^3.5.0 || ^4.0.0", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/less/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "optional": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/less/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/less/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/license-webpack-plugin": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz", + "integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==", + "dev": true, + "dependencies": { + "webpack-sources": "^3.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-sources": { + "optional": true + } + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/listr2": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.3.tgz", + "integrity": "sha512-Lllokma2mtoniUOS94CcOErHWAug5iu7HOmDrvWgpw8jyQH2fomgB+7lZS4HWZxytUuQwkGOwe49FvwVaA85Xw==", + "dev": true, + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.0.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/listr2/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, + "node_modules/listr2/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/lmdb": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-3.0.12.tgz", + "integrity": "sha512-JnoEulTgveoC64vlYJ9sufGLuNkk6TcxSYpKxSC9aM42I61jIv3pQH0fgb6qW7HV0+FNqA3g1WCQQYfhfawGoQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "msgpackr": "^1.10.2", + "node-addon-api": "^6.1.0", + "node-gyp-build-optional-packages": "5.2.2", + "ordered-binary": "^1.4.1", + "weak-lru-cache": "^1.2.2" + }, + "bin": { + "download-lmdb-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@lmdb/lmdb-darwin-arm64": "3.0.12", + "@lmdb/lmdb-darwin-x64": "3.0.12", + "@lmdb/lmdb-linux-arm": "3.0.12", + "@lmdb/lmdb-linux-arm64": "3.0.12", + "@lmdb/lmdb-linux-x64": "3.0.12", + "@lmdb/lmdb-win32-x64": "3.0.12" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/loader-utils": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.3.1.tgz", + "integrity": "sha512-FMJTLMXfCLMLfJxcX9PFqX5qD88Z5MRGaZCVzfuqeZSPsyiBzs+pahDQjbIWz2QIzPZz0NX9Zy4FX3lmK6YHIg==", + "dev": true, + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "dev": true, + "dependencies": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", + "dev": true, + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/log4js": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", + "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", + "dev": true, + "dependencies": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "flatted": "^3.2.7", + "rfdc": "^1.3.0", + "streamroller": "^3.1.5" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-fetch-happen": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", + "dev": true, + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.11.1.tgz", + "integrity": "sha512-LZcMTBAgqUUKNXZagcZxvXXfgF1bHX7Y7nQ0QyEiNbRJgE29GhgPd8Yna1VQcLlPiHt/5RFJMWYN9Uv/VPNvjQ==", + "dev": true, + "dependencies": { + "@jsonjoy.com/json-pack": "^1.0.3", + "@jsonjoy.com/util": "^1.3.0", + "tree-dump": "^1.0.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">= 4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mini-css-extract-plugin": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.0.tgz", + "integrity": "sha512-Zs1YsZVfemekSZG+44vBsYTLQORkPMwnlv+aehcxK/NLKC+EGhDB39/YePYYqx/sTk6NnYpuqikhSn7+JIevTA==", + "dev": true, + "dependencies": { + "schema-utils": "^4.0.0", + "tapable": "^2.2.1" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/msgpackr": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.0.tgz", + "integrity": "sha512-I8qXuuALqJe5laEBYoFykChhSXLikZmUhccjGsPuSJ/7uPip2TJ7lwdIQwWSAi0jGZDXv4WOP8Qg65QZRuXxXw==", + "dev": true, + "optionalDependencies": { + "msgpackr-extract": "^3.0.2" + } + }, + "node_modules/msgpackr-extract": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz", + "integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.2.2" + }, + "bin": { + "download-msgpackr-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" + } + }, + "node_modules/multicast-dns": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", + "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", + "dev": true, + "dependencies": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + }, + "bin": { + "multicast-dns": "cli.js" + } + }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/needle": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz", + "integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==", + "dev": true, + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/ng-otp-input": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/ng-otp-input/-/ng-otp-input-1.9.3.tgz", + "integrity": "sha512-QiAvOeTVPk8DiY2dnVstyCikWnsY70TXgsVl2iBgz7nFnNM5sdrgbVj8tP0usGznJowVRygCQZJ+hzvYLEhIOQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": ">=6.0.0", + "@angular/core": ">=6.0.0" + } + }, + "node_modules/ngx-cookie-service": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/ngx-cookie-service/-/ngx-cookie-service-18.0.0.tgz", + "integrity": "sha512-hkkUckzZTXXWtFgvVkT2hg6mwYMLXioXDZWBsVCOy9gYkADjsj0N5VViO7eo2izQ0VcMPd/Etog1trf/T4oZMQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "peerDependencies": { + "@angular/common": "^18.0.0-rc.0", + "@angular/core": "^18.0.0-rc.0" + } + }, + "node_modules/nice-napi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", + "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "!win32" + ], + "dependencies": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2" + } + }, + "node_modules/nice-napi/node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true, + "optional": true + }, + "node_modules/node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", + "dev": true + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true, + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-gyp": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.2.0.tgz", + "integrity": "sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^4.1.0", + "semver": "^7.3.5", + "tar": "^6.2.1", + "which": "^4.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", + "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", + "dev": true, + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", + "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", + "dev": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/node-gyp/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/node-gyp/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/node-gyp/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "node_modules/nopt": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "dev": true, + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", + "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", + "dev": true, + "dependencies": { + "hosted-git-info": "^7.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-bundled": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.1.tgz", + "integrity": "sha512-+AvaheE/ww1JEwRHOrn4WHNzOxGtVp+adrg2AeZS/7KuxGUYFuBta98wYpfHBbJp6Tg6j1NKSEVHNcfZzJHQwQ==", + "dev": true, + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-install-checks": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", + "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", + "dev": true, + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-package-arg": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz", + "integrity": "sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw==", + "dev": true, + "dependencies": { + "hosted-git-info": "^7.0.0", + "proc-log": "^4.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-packlist": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-8.0.2.tgz", + "integrity": "sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==", + "dev": true, + "dependencies": { + "ignore-walk": "^6.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.0.1.tgz", + "integrity": "sha512-Udm1f0l2nXb3wxDpKjfohwgdFUSV50UVwzEIpDXVsbDMXVIEF81a/i0UhuQbhrPMMmdiq3+YMFLFIRVLs3hxQw==", + "dev": true, + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^11.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-17.1.0.tgz", + "integrity": "sha512-5+bKQRH0J1xG1uZ1zMNvxW0VEyoNWgJpY9UDuluPFLKDfJ9u2JmmjmTJV1srBGQOROfdBMiVvnH2Zvpbm+xkVA==", + "dev": true, + "dependencies": { + "@npmcli/redact": "^2.0.0", + "jsonparse": "^1.3.1", + "make-fetch-happen": "^13.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minizlib": "^2.1.2", + "npm-package-arg": "^11.0.0", + "proc-log": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", + "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", + "dev": true, + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ora/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ordered-binary": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.5.1.tgz", + "integrity": "sha512-5VyHfHY3cd0iza71JepYG50My+YUbrFtGoUz2ooEydPyPM7Aai/JW098juLr+RG6+rDJuzNNTsEQu2DZa1A41A==", + "dev": true + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.0.tgz", + "integrity": "sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA==", + "dev": true, + "dependencies": { + "@types/retry": "0.12.2", + "is-network-error": "^1.0.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry/node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, + "node_modules/pacote": { + "version": "18.0.6", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-18.0.6.tgz", + "integrity": "sha512-+eK3G27SMwsB8kLIuj4h1FUhHtwiEUo21Tw8wNjmvdlpOEr613edv+8FUsTj/4F/VN5ywGE19X18N7CC2EJk6A==", + "dev": true, + "dependencies": { + "@npmcli/git": "^5.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/package-json": "^5.1.0", + "@npmcli/promise-spawn": "^7.0.0", + "@npmcli/run-script": "^8.0.0", + "cacache": "^18.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^11.0.0", + "npm-packlist": "^8.0.0", + "npm-pick-manifest": "^9.0.0", + "npm-registry-fetch": "^17.0.0", + "proc-log": "^4.0.0", + "promise-retry": "^2.0.1", + "sigstore": "^2.2.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "bin/index.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/parchment": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/parchment/-/parchment-3.0.0.tgz", + "integrity": "sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A==" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-json/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "devOptional": true, + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-html-rewriting-stream": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-7.0.0.tgz", + "integrity": "sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg==", + "dev": true, + "dependencies": { + "entities": "^4.3.0", + "parse5": "^7.0.0", + "parse5-sax-parser": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-sax-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-7.0.0.tgz", + "integrity": "sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg==", + "dev": true, + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "dev": true + }, + "node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "optional": true + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true + }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/piscina": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-4.6.1.tgz", + "integrity": "sha512-z30AwWGtQE+Apr+2WBZensP2lIvwoaMcOPkQlIEmSGMJNUvaYACylPYrQM6wSdUNJlnDVMSpLv7xTMJqlVshOA==", + "dev": true, + "optionalDependencies": { + "nice-napi": "^1.0.2" + } + }, + "node_modules/pkg-dir": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "dev": true, + "dependencies": { + "find-up": "^6.3.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/positioning": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/positioning/-/positioning-2.0.1.tgz", + "integrity": "sha512-DsAgM42kV/ObuwlRpAzDTjH9E8fGKkMDJHWFX+kfNXSxh7UCCQxEmdjv/Ws5Ft1XDnt3JT8fIDYeKNSE2TbttA==" + }, + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-loader": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-8.1.1.tgz", + "integrity": "sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ==", + "dev": true, + "dependencies": { + "cosmiconfig": "^9.0.0", + "jiti": "^1.20.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "postcss": "^7.0.0 || ^8.0.1", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==", + "dev": true + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", + "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", + "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.1.tgz", + "integrity": "sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/preact": { + "version": "10.12.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.12.1.tgz", + "integrity": "sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/primeicons": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/primeicons/-/primeicons-7.0.0.tgz", + "integrity": "sha512-jK3Et9UzwzTsd6tzl2RmwrVY/b8raJ3QZLzoDACj+oTJ0oX7L9Hy+XnVwgo4QVKlKpnP/Ur13SXV/pVh4LzaDw==" + }, + "node_modules/primeng": { + "version": "17.18.7", + "resolved": "https://registry.npmjs.org/primeng/-/primeng-17.18.7.tgz", + "integrity": "sha512-RKbUL69uTzDrVLOKxC8Qn7tyzoAUXetBsMOnNJJaomXTirC001vNTw/wzcuLxkTQpNXAOztxcKMpMTmZQMhe5Q==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": "^17.0.0 || ^18.0.0", + "@angular/core": "^17.0.0 || ^18.0.0", + "@angular/forms": "^17.0.0 || ^18.0.0", + "rxjs": "^6.0.0 || ^7.8.1", + "zone.js": "~0.14.0" + } + }, + "node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "dev": true + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-addr/node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "dev": true, + "optional": true + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true + }, + "node_modules/qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "dev": true, + "engines": { + "node": ">=0.9" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quill": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/quill/-/quill-2.0.2.tgz", + "integrity": "sha512-QfazNrhMakEdRG57IoYFwffUIr04LWJxbS/ZkidRFXYCQt63c1gK6Z7IHUXMx/Vh25WgPBU42oBaNzQ0K1R/xw==", + "dependencies": { + "eventemitter3": "^5.0.1", + "lodash-es": "^4.17.21", + "parchment": "^3.0.0", + "quill-delta": "^5.1.0" + }, + "engines": { + "npm": ">=8.2.3" + } + }, + "node_modules/quill-delta": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", + "dependencies": { + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/quill/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, + "node_modules/raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "optional": true, + "dependencies": { + "performance-now": "^2.1.0" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "dev": true + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", + "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, + "node_modules/regenerator-transform": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regex-parser": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.3.0.tgz", + "integrity": "sha512-TVILVSz2jY5D47F4mA4MppkBrafEaiUWJO/TcZHEIuI13AqoZMkK1WMA4Om1YkYbTx+9Ki1/tSUXbceyr9saRg==", + "dev": true + }, + "node_modules/regexpu-core": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", + "dev": true, + "dependencies": { + "@babel/regjsgen": "^0.8.0", + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-url-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz", + "integrity": "sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==", + "dev": true, + "dependencies": { + "adjust-sourcemap-loader": "^4.0.0", + "convert-source-map": "^1.7.0", + "loader-utils": "^2.0.0", + "postcss": "^8.2.14", + "source-map": "0.6.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/resolve-url-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/resolve-url-loader/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true + }, + "node_modules/rgbcolor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz", + "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==", + "optional": true, + "engines": { + "node": ">= 0.8.15" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-applescript": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", + "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sass": { + "version": "1.77.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", + "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "dev": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-loader": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-14.2.1.tgz", + "integrity": "sha512-G0VcnMYU18a4N7VoNDegg2OuMjYtxnqzQWARVWCIVSZwJeiL9kg8QMsuIZOplsJgTzZLF6jGxI3AClj8I9nRdQ==", + "dev": true, + "dependencies": { + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/sax": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", + "dev": true, + "optional": true + }, + "node_modules/schema-utils": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/schema-utils/node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", + "dev": true + }, + "node_modules/selfsigned": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", + "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", + "dev": true, + "dependencies": { + "@types/node-forge": "^1.3.0", + "node-forge": "^1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + }, + "node_modules/serve-index/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dev": true, + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sigstore": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.3.1.tgz", + "integrity": "sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ==", + "dev": true, + "dependencies": { + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.2", + "@sigstore/sign": "^2.3.2", + "@sigstore/tuf": "^2.3.4", + "@sigstore/verify": "^1.2.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socket.io": { + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", + "integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "cors": "~2.8.5", + "debug": "~4.3.2", + "engine.io": "~6.5.2", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.4" + }, + "engines": { + "node": ">=10.2.0" + } + }, + "node_modules/socket.io-adapter": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", + "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", + "dev": true, + "dependencies": { + "debug": "~4.3.4", + "ws": "~8.17.1" + } + }, + "node_modules/socket.io-parser": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "dev": true, + "dependencies": { + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.3.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/sockjs": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "dev": true, + "dependencies": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dev": true, + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-5.0.0.tgz", + "integrity": "sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA==", + "dev": true, + "dependencies": { + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.72.1" + } + }, + "node_modules/source-map-loader/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, + "node_modules/spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, + "node_modules/ssf": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "dependencies": { + "frac": "~1.1.2" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/ssri": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/stackblur-canvas": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.7.0.tgz", + "integrity": "sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ==", + "optional": true, + "engines": { + "node": ">=0.1.14" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/streamroller": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", + "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", + "dev": true, + "dependencies": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-pathdata": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz", + "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==", + "optional": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/terser": { + "version": "5.29.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.29.2.tgz", + "integrity": "sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/text-segmentation": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", + "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", + "optional": true, + "dependencies": { + "utrie": "^1.0.2" + } + }, + "node_modules/thingies": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz", + "integrity": "sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==", + "dev": true, + "engines": { + "node": ">=10.18" + }, + "peerDependencies": { + "tslib": "^2" + } + }, + "node_modules/thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tree-dump": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.2.tgz", + "integrity": "sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==", + "dev": true, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, + "node_modules/tuf-js": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.1.tgz", + "integrity": "sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==", + "dev": true, + "dependencies": { + "@tufjs/models": "2.0.1", + "debug": "^4.3.4", + "make-fetch-happen": "^13.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-assert": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/typed-assert/-/typed-assert-1.0.9.tgz", + "integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==", + "dev": true + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ua-parser-js": { + "version": "0.7.38", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.38.tgz", + "integrity": "sha512-fYmIy7fKTSFAhG3fuPlubeGaMoAd6r0rSnfEsO5nEY55i26KSLt9EH7PLQiiqPUhNqYIJvSkTy1oArIcXAbPbA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "engines": { + "node": "*" + } + }, + "node_modules/undici": { + "version": "6.19.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.2.tgz", + "integrity": "sha512-JfjKqIauur3Q6biAtHJ564e3bWa8VvT+7cSiOJHFbX4Erv6CLGDpg8z+Fmg/1OI/47RA+GI2QZaF48SSaLvyBA==", + "dev": true, + "engines": { + "node": ">=18.17" + } + }, + "node_modules/undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "dev": true + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dev": true, + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/utrie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", + "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", + "optional": true, + "dependencies": { + "base64-arraybuffer": "^1.0.2" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.2.tgz", + "integrity": "sha512-6lA7OBHBlXUxiJxbO5aAY2fsHHzDr1q7DvXYnyZycRs2Dz+dXBWuhpWHvmljTRTpQC2uvGmUFFkSHF2vGo90MA==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.38", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "dependencies": { + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/weak-lru-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", + "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", + "dev": true + }, + "node_modules/webpack": { + "version": "5.93.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.93.0.tgz", + "integrity": "sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-middleware": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.2.1.tgz", + "integrity": "sha512-hRLz+jPQXo999Nx9fXVdKlg/aehsw1ajA9skAneGmT03xwmyuhvF93p6HUKKbWhXdcERtGTzUCtIQr+2IQegrA==", + "dev": true, + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^4.6.0", + "mime-types": "^2.1.31", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.0.4.tgz", + "integrity": "sha512-dljXhUgx3HqKP2d8J/fUMvhxGhzjeNVarDLcbO/EWMSgRizDkxHQDZQaLFL5VJY9tRBj2Gz+rvCEYYvhbqPHNA==", + "dev": true, + "dependencies": { + "@types/bonjour": "^3.5.13", + "@types/connect-history-api-fallback": "^1.5.4", + "@types/express": "^4.17.21", + "@types/serve-index": "^1.9.4", + "@types/serve-static": "^1.15.5", + "@types/sockjs": "^0.3.36", + "@types/ws": "^8.5.10", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.2.1", + "chokidar": "^3.6.0", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "default-gateway": "^6.0.3", + "express": "^4.17.3", + "graceful-fs": "^4.2.6", + "html-entities": "^2.4.0", + "http-proxy-middleware": "^2.0.3", + "ipaddr.js": "^2.1.0", + "launch-editor": "^2.6.1", + "open": "^10.0.3", + "p-retry": "^6.2.0", + "rimraf": "^5.0.5", + "schema-utils": "^4.2.0", + "selfsigned": "^2.4.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^7.1.0", + "ws": "^8.16.0" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/webpack-dev-server/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/webpack-dev-server/node_modules/http-proxy-middleware": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "dev": true, + "dependencies": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@types/express": "^4.17.13" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/webpack-dev-server/node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dev": true, + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-subresource-integrity": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-5.1.0.tgz", + "integrity": "sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q==", + "dev": true, + "dependencies": { + "typed-assert": "^1.0.8" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "html-webpack-plugin": ">= 5.0.0-beta.1 < 6", + "webpack": "^5.12.0" + }, + "peerDependenciesMeta": { + "html-webpack-plugin": { + "optional": true + } + } + }, + "node_modules/webpack/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/webpack/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/webpack/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/webpack/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + }, + "node_modules/wmf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xlsx": { + "version": "0.18.5", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz", + "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", + "dependencies": { + "adler-32": "~1.3.0", + "cfb": "~1.2.1", + "codepage": "~1.15.0", + "crc-32": "~1.2.1", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + }, + "bin": { + "xlsx": "bin/xlsx.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", + "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zone.js": { + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz", + "integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9e1bbda --- /dev/null +++ b/package.json @@ -0,0 +1,71 @@ +{ + "name": "extra-net", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "build-dev": "ng build --configuration=dev", + "build-uat": "ng build --configuration=uat", + "build-preprod": "ng build --configuration=preprod", + "build-prod": "ng build --configuration=prod", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e", + "post-build": "node ./build/post-build.js", + "serve": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng serve" + }, + "private": true, + "dependencies": { + "@angular/animations": "^18.1.4", + "@angular/cdk": "^18.1.4", + "@angular/common": "^18.1.4", + "@angular/compiler": "^18.1.4", + "@angular/core": "^18.1.4", + "@angular/forms": "^18.1.4", + "@angular/material": "^18.1.4", + "@angular/platform-browser": "^18.1.4", + "@angular/platform-browser-dynamic": "^18.1.4", + "@angular/router": "^18.1.4", + "@fullcalendar/angular": "^6.1.15", + "@fullcalendar/daygrid": "^6.1.15", + "@ng-select/ng-option-highlight": "^13.7.0", + "@ng-select/ng-select": "^13.7.0", + "@ngx-translate/core": "^15.0.0", + "ag-grid-angular": "^32.0.2", + "ag-grid-community": "^32.0.2", + "angular-calendar": "^0.31.1", + "crypto-js": "^4.2.0", + "date-fns": "^3.6.0", + "file-saver": "^2.0.5", + "jsencrypt": "^3.3.2", + "jspdf": "^2.5.1", + "jspdf-autotable": "^3.8.2", + "moment": "^2.30.1", + "ng-otp-input": "^1.9.3", + "ngx-cookie-service": "^18.0.0", + "primeicons": "^7.0.0", + "primeng": "^17.18.7", + "quill": "^2.0.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.3", + "xlsx": "^0.18.5", + "zone.js": "^0.14.10" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^18.1.4", + "@angular/cli": "^18.1.4", + "@angular/compiler-cli": "^18.1.4", + "@types/file-saver": "^2.0.7", + "@types/jasmine": "^5.1.4", + "@types/node": "^22.1.0", + "jasmine-core": "^5.2.0", + "karma": "^6.4.4", + "karma-chrome-launcher": "^3.2.0", + "karma-coverage": "^2.2.1", + "karma-jasmine": "^5.1.0", + "karma-jasmine-html-reporter": "^2.1.0", + "typescript": "^5.5.4", + "webpack": "^5.93.0" + } +} \ No newline at end of file diff --git a/preprod.Dockerfile b/preprod.Dockerfile new file mode 100644 index 0000000..2b3fdc7 --- /dev/null +++ b/preprod.Dockerfile @@ -0,0 +1,16 @@ +FROM node:20.11.1 as builder + +WORKDIR /usr/src/app +COPY . /usr/src/app + +RUN npm install && npm run build-preprod + +FROM nginx:1.14.2-alpine + +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=builder /usr/src/app/dist/ExtraNet /usr/share/nginx/html + +EXPOSE 80 +EXPOSE 443 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/prod.Dockerfile b/prod.Dockerfile new file mode 100644 index 0000000..88693fd --- /dev/null +++ b/prod.Dockerfile @@ -0,0 +1,16 @@ +FROM node:16 as builder + +WORKDIR /usr/src/app +COPY . /usr/src/app + +RUN npm install && npm run build-prod + +FROM nginx:1.14.2-alpine + +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=builder /usr/src/app/dist/ExtraNet /usr/share/nginx/html + +EXPOSE 80 +EXPOSE 443 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/readme.md b/readme.md index e69de29..e37e4b1 100644 --- a/readme.md +++ b/readme.md @@ -0,0 +1,20 @@ +# Introduction +TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project. + +# Getting Started +TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: +1. Installation process +2. Software dependencies +3. Latest releases +4. API references + +# Build and Test +TODO: Describe and show how to build your code and run the tests. + +# Contribute +TODO: Explain how other users and developers can contribute to make your code better. + +If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files: +- [ASP.NET Core](https://github.com/aspnet/Home) +- [Visual Studio Code](https://github.com/Microsoft/vscode) +- [Chakra Core](https://github.com/Microsoft/ChakraCore) \ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts new file mode 100644 index 0000000..1135639 --- /dev/null +++ b/src/app/app-routing.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +const routes: Routes = [ + { + path: 'Auth', + loadChildren: () => + import('./modules/auth/auth.module').then((m) => m.AuthModule), + }, + { + path: '', + loadChildren: () => + import('./layouts/theme.module').then((m) => m.ThemeModule), + }, + { path: '**', redirectTo: 'Error/404', pathMatch: 'full' }, +]; + +@NgModule({ + imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' })], + exports: [RouterModule], +}) +export class AppRoutingModule {} diff --git a/src/app/app.component.html b/src/app/app.component.html new file mode 100644 index 0000000..761542b --- /dev/null +++ b/src/app/app.component.html @@ -0,0 +1,67 @@ + + + +
+ +
+ + + +
Session Expire Warning
+
Your session will expire in {{commonService.remainingTime}} seconds.
+
Do you want to extend the session?
+ + + +
+
+
\ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts new file mode 100644 index 0000000..5f69ae6 --- /dev/null +++ b/src/app/app.component.ts @@ -0,0 +1,108 @@ +import { Component, Renderer2 } from '@angular/core'; +import * as moment from 'moment'; +import { Subscription, interval } from 'rxjs'; +import { CommonFunctionService } from './core/common/common-function.service'; +import { API } from './core/services/api.service'; +import { RouteChangeService } from './core/common/RouteChangeService.service'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', +}) +export class AppComponent { + // displayPosition = false; + // position: string; + title = "AngularStructure"; + constructor(private renderer: Renderer2, public commonService: CommonFunctionService, private ApiSer: API, private routeChangeService: RouteChangeService) { + // Check if userId exists in sessionStorage + if (sessionStorage.getItem('LoginUserData')) { + // Set up an interval that runs every second + this.commonService.StartTimer(); + } else { + // If userId doesn't exist in sessionStorage + // Set displayPosition to false, remove 'excd' from sessionStorage, and unsubscribe from the subscription + this.commonService.displayPosition = false; + sessionStorage.removeItem('excd'); + this.commonService.subscription?.unsubscribe(); + } + + } + stopTimer() { + if (this.commonService.subscription) { + this.commonService.subscription.unsubscribe(); + this.commonService.subscription = undefined; + } + }; + + ngOnInit(): void { + //sessionStorage.getItem("userId") + // ? "" + // : (window.location.href = "/Login/Login"); + // const links = this.renderer.createElement("link"); + // links.setAttribute("rel", "stylesheet"); + // links.setAttribute("type", "text/css"); + // links.setAttribute( + // "href", + // isTheme ? "../assets/css/empire/e-default.css" : "../assets/css/retina/r-default.css" + // ); + // this.renderer.appendChild(document.head, links); + // const link = this.renderer.createElement("link"); + // link.setAttribute("rel", "stylesheet"); + // link.setAttribute("type", "text/css"); + // link.setAttribute( + // "href", + // isTheme ? "../assets/css/empire.css" : "../assets/css/retina.css" + // ); + // this.renderer.appendChild(document.head, link); + // this.commonService.GetOrgDetails(); + // this.route.queryParams.subscribe(obj => { + // console.log(obj) + // // if(obj.key) CommonFunctions.DecryptReq("UfCP%2FE7upxltDZyVLfTj%2F8fMMbudOAFfwLCR1RVqPXNvD%203jblAZ3pQ0i9LtrXpE0DFYbSnyHNj353T2bJx9Zg%3D%3D"); + + // }) + // sessionStorage.getItem('userId') ? '' : window.location.href = '/Login/Login' + } + + showPositionDialog(position: string) { + this.commonService.position = position; + this.commonService.displayPosition = true; + }; + + ngOnDestroy() { + // Unsubscribe from the observable to prevent memory leaks + this.commonService.subscription.unsubscribe(); + } + extendJWTTime() { + this.stopTimer(); + let postdata = { + "JwtToken": sessionStorage.getItem('JwtToken'), + "RefreshToken": sessionStorage.getItem('RefreshToken') + }; + this.ApiSer.AdminPost('/JWT/RefreshToken', postdata).subscribe(res => { + if (!res.Status) { + this.commonService.loginOut(); + } else { + sessionStorage.setItem('JwtToken', res.JwtToken); + sessionStorage.setItem('RefreshToken', res.RefreshToken); + sessionStorage.setItem('JwtTokenExpiry', res.JwtTokenExpiry); + this.Close(true) + this.commonService.StartTimer(); + } + }) + }; + // remainingTime: number; + exit() { + this.commonService.displayPosition = false; + sessionStorage.removeItem('excd'); + this.commonService.loginOut(); + }; + Close(check) { + this.commonService.displayPosition = false; + sessionStorage.setItem('excd', 'OK') + if (check) { + setTimeout(function () { + sessionStorage.removeItem('excd'); + }, 10000); // 10000 milliseconds = 10 second + } + } +} diff --git a/src/app/app.module.ts b/src/app/app.module.ts new file mode 100644 index 0000000..bd2e986 --- /dev/null +++ b/src/app/app.module.ts @@ -0,0 +1,42 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { AppRoutingModule } from './app-routing.module'; +import { AppComponent } from './app.component'; +import { TranslateService } from '@ngx-translate/core'; +import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { InterceptLoader } from './core/common/intercept-loader.service'; +import { MessageService } from 'primeng/api'; +import { ToastModule } from 'primeng/toast'; +import { AuthGuard } from './core/guard/auth.guard'; +import { DialogModule } from 'primeng/dialog'; +import { ButtonModule } from 'primeng/button'; +import { LoaderComponent } from './core/shared/intercept-loader/intercept-loader.component'; + + +@NgModule({ + declarations: [ + AppComponent, + LoaderComponent, + ], + imports: [ + BrowserModule, + HttpClientModule, + BrowserAnimationsModule, + AppRoutingModule, + FormsModule, + ReactiveFormsModule, + ToastModule, + ButtonModule, + DialogModule + ], + providers: [ + TranslateService, MessageService, + AuthGuard, + { provide: HTTP_INTERCEPTORS, useClass: InterceptLoader, multi: true } + ], + bootstrap: [AppComponent] +}) +export class AppModule { } + diff --git a/src/app/core/common/RouteChangeService.service.ts b/src/app/core/common/RouteChangeService.service.ts new file mode 100644 index 0000000..bd749cc --- /dev/null +++ b/src/app/core/common/RouteChangeService.service.ts @@ -0,0 +1,51 @@ +import { Injectable } from '@angular/core'; +import { Router, NavigationEnd } from '@angular/router'; +import { filter } from 'rxjs/operators'; +import { MessageService } from 'primeng/api'; +import { API } from '../services/api.service'; +import { securityFunctions } from './security'; + +@Injectable({ + providedIn: 'root' +}) +export class RouteChangeService { + constructor(private router: Router, private apiService: API) { + this.setupRouteChangeSubscription(); + // this.checkSessionMsg() + } + + private setupRouteChangeSubscription() { + this.router.events + .pipe(filter(event => event instanceof NavigationEnd)) + .subscribe(() => { + const currentUrl = this.router.url; + // Check the current route's URL + + if (currentUrl.includes('Unauthorized') || currentUrl == '/' || currentUrl.includes('/404') || currentUrl.includes('/error') || currentUrl.includes('/Auth') || currentUrl.includes('/Home') || currentUrl.includes('/Login')) { + // console.log('Not making API call for 404 or error route:', currentUrl); + } else { + let LoginUserData = JSON.parse(securityFunctions.getSessionStorage('LoginUserData')); + // Call your API function here + let url = currentUrl + if (currentUrl.includes('?')) { + url = currentUrl.split('?')[0] + } + let obj = { + "page_url": url, + "user_id": LoginUserData.user_id, + "project_id": '2405170833594899108' + } + this.apiService.AdminPost('/MenuMasterNew/IsAuthorizedPage', obj).subscribe( + (response) => { + if (!response.resp) { + this.router.navigate(['/Unauthorized']); + } + }, + (error) => { + this.router.navigate(['/']) + } + ); + } + }); + } +} \ No newline at end of file diff --git a/src/app/core/common/common-function.service.ts b/src/app/core/common/common-function.service.ts new file mode 100644 index 0000000..c0cfa12 --- /dev/null +++ b/src/app/core/common/common-function.service.ts @@ -0,0 +1,657 @@ +import { MessageService } from "primeng/api"; +import { API } from "../services/api.service"; +import { Injectable } from "@angular/core"; +import { Title } from "@angular/platform-browser"; +import { ValidationService } from "./validation.service"; +import * as moment from "moment"; +import { FileUpload } from "primeng/fileupload"; +import jsPDF from "jspdf"; +import * as FileSaver from "file-saver"; +import autoTable from 'jspdf-autotable'; +import { UserLoginData } from "../models/common-model/userModel"; +import { securityFunctions } from "./security"; +import { UserLog } from "../models/common-model/user-logout.model"; +import { Subscription, interval } from "rxjs"; +import { environment } from "src/environments/environment"; +import { Router, NavigationEnd } from '@angular/router'; +import { filter } from 'rxjs/operators'; + +@Injectable({ + providedIn: 'root' +}) +export class CommonFunctionService { + LoginUserData: UserLoginData + constructor( + public MsgService: MessageService, + public ApiServ: API, + public validationService: ValidationService, + public titleService: Title, + public router:Router + ) { + this.LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null + this.clientId = environment.client_id + } + clientId = '' + logo; + AllMenu; + ChangeStatusAllowed = false; + DownloadFilesAllowed = false; + environmentObj = environment; + ddLoader = { + country: false, + city: false, + Currency: false, + vendor: false, + }; + MenuTabList = { + Overview: { val:false, link:'Services/Hotel/HotelManage/OverView', IsActive: false, Download: false}, + MealAddOn: { val:false, link:'Services/Hotel/HotelManage/HotelMealAdd', IsActive: false, Download: false}, + Rooms: { val:false, link:'Services/Hotel/HotelManage/HotelAddRoom', IsActive: false, Download: false}, + HotelSeason: { val:false, link:'Services/Hotel/HotelManage/AddSeason', IsActive: false, Download: false}, + RoomContract: { val:false, link:'Services/Hotel/HotelManage/RoomContractAdd', IsActive: false, Download: false}, + MinStay: { val:false, link:'Services/Hotel/HotelManage/AddMinStay', IsActive: false, Download: false}, + RoomAllocation: { val:false, link:'Services/Hotel/HotelManage/AddAllocation', IsActive: false, Download: false}, + HotelBlockDates: { val:false, link:'Services/Hotel/HotelManage/HotelAddBlockDate', IsActive: false, Download: false}, + HotelOffers: { val:false, link:'Services/Hotel/HotelManage/AddOffer', IsActive: false, Download: false}, + HotelSupplements: { val:false, link:'Services/Hotel/HotelManage/AddSuppliment', IsActive: false, Download: false}, + } + CurrencyList = []; + CountryList = []; + CityList = []; + agencyData = []; + timer; + AllVendor = [] + // =============================== normal function ========================== + + /** + * this function for show message + * @param check boolean + * @param message text + */ + public showMessage(check, message, type?) { + this.MsgService.add({ + severity: type ? type : check ? "success" : "error", + detail: message, + }); + }; + + /** + * @author Ayaan kazi + * last updated by Abdul Razzak on 03-06-2024 + * @param otpInp + * @param otpBox + */ + focusEmptyOtpInp(otpInp, otpBox) { + let targetOtpInput = otpInp.target; + const otpInputWrapper = targetOtpInput.closest('.ng-otp-input-wrapper'); + const inputList = [...otpInputWrapper.querySelectorAll('input')]; + let ind = inputList.findIndex(z => z.getAttribute('id') == targetOtpInput.id); + if (ind == -1 || inputList[ind].value == '') { + for (let i = 0; i <= inputList.length; i++) { + let inp = inputList[i]; + if (inp?.value == '') { + let id = inp.getAttribute('id'); + otpBox.focusTo(id); + break; + } + } + } + }; + + // check Token expire time + /** + * @param check pass boolean for check time expire or not + */ + CheckTokenExpireTime(check) { + const currentISOString = moment.utc(this.ApiServ.getAdjustedLocalTime()).format('YYYY-MM-DD HH:mm:ss'); + const time1 = moment.utc(sessionStorage.getItem('JwtTokenExpiry')).subtract(3, 'seconds').format('YYYY-MM-DD HH:mm:ss'); + const isTime1AfterTime2 = this.isTime1AfterTime2(time1, currentISOString); + if (isTime1AfterTime2) { + let postdata = { + "JwtToken": sessionStorage.getItem('JwtToken'), + "RefreshToken": sessionStorage.getItem('RefreshToken') + } + this.ApiServ.AdminPost('/JWT/RefreshToken', postdata).subscribe(res => { + if (!res.Status) { + this.loginOut(); + } else { + sessionStorage.setItem('JwtToken', res.JwtToken); + sessionStorage.setItem('RefreshToken', res.RefreshToken); + sessionStorage.setItem('JwtTokenExpiry', res.JwtTokenExpiry); + check ? window.location.href = "/Home/Dashboard" : ''; + } + }) + } else { + check ? window.location.href = "/Home/Dashboard" : ''; + } + }; + isTime1AfterTime2(time1, time2) { + const date1 = new Date(time1); // Create a Date object for time1 + const date2 = new Date(time2); // Create a Date object for time2 + return date1 < date2 ? true : false; // Compare the two Date objects + }; + // ---------------------------------------------- Export file ---------------------------------------------- + /** + * this function for download excel + * @param GetallData all data + * @param title_list header and property list + * @param file_name file name + */ + public exportExcel(GetallData, title_list, file_name) { + let bookResultResp = GetallData.map(el => { + let obj = {} + title_list.forEach(title => obj[title.header] = el[title.field]) + return obj; + }); + import("xlsx").then((xlsx) => { + console.log(xlsx); + const worksheet = xlsx.utils.json_to_sheet(bookResultResp); + const workbook = { Sheets: { data: worksheet }, SheetNames: ["data"] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: "xlsx", + type: "array", + }); + this.saveAsExcelFile(excelBuffer, file_name); + }); + } + /** + * @param buffer + * @param fileName + */ + saveAsExcelFile(buffer: any, fileName: string): void { + import("file-saver").then((abc) => { + let EXCEL_TYPE = + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"; + let EXCEL_EXTENSION = ".xlsx"; + const data: Blob = new Blob([buffer], { + type: EXCEL_TYPE, + }); + console.log(FileSaver); + FileSaver.saveAs( + data, + fileName + "_export_" + new Date().getTime() + EXCEL_EXTENSION + ); + }); + } + /** + * this function for download PDF + * @param GetallData all data + * @param title_list header and property list + * @param file_name file name + */ + public exportPdf(GetallData, title_list, file_name) { + let bookResultResp = GetallData.map(el => { + let data_Array = []; + title_list.forEach(title => data_Array.push(el[title.field])) + return data_Array + }); + let key_Array = []; + title_list.forEach(title => key_Array.push(title.header)) + const head = [key_Array] + const doc = new jsPDF("l", "ex", [100, 280]); + autoTable(doc, { + head: head, + body: bookResultResp, + didDrawCell: (bookResultResp) => { }, + }); + doc.save(file_name); + } + // ---------------------------------------------- amount Formater ---------------------------------------------- + /** + * + * @param amount + * @param amountFormat + * @param amountFormatDecimalSpliter + * @returns + */ + public amountFormater(amount, amountFormat, amountFormatDecimalSpliter) { + amountFormat = amountFormat != null && amountFormat != '' ? amountFormat : '#,###,###,###.##'; + amountFormatDecimalSpliter = amountFormatDecimalSpliter != null && amountFormatDecimalSpliter != '' ? amountFormatDecimalSpliter : '.'; + let outputAmount = amount; + let splitAmount = amount.toString().split('.'); + let splitAmountFormat = amountFormat + .toString() + .split(amountFormatDecimalSpliter); + let amountSplitList = + splitAmount != null && splitAmount.length > 0 + ? splitAmount[0].split('').reverse() + : []; + let decimalAmountSplitList = + splitAmount != null && splitAmount.length > 1 + ? splitAmount[1].split('') + : []; + let amountFormatSplitList = + splitAmountFormat != null && splitAmountFormat.length > 0 + ? splitAmountFormat[0].split('').reverse() + : []; + let decimalAmountFormatSplitList = + splitAmountFormat != null && splitAmountFormat.length > 1 + ? splitAmountFormat[1].split('') + : []; + + decimalAmountFormatSplitList.forEach((x, index) => { + decimalAmountFormatSplitList[index] = decimalAmountSplitList[index] + ? decimalAmountSplitList[index] + : '0'; + }); + let amountSplitListTemp = []; + let amountIndex = 0; + amountFormatSplitList.forEach((x, index) => { + if (amountFormatSplitList[index] == '#' && amountSplitList[amountIndex]) { + amountSplitListTemp.push(amountSplitList[amountIndex]); + amountIndex += 1; + } else if (amountSplitList[amountIndex]) { + amountSplitListTemp.push(amountFormatSplitList[index]); + } + }); + + if (decimalAmountFormatSplitList && decimalAmountFormatSplitList.length > 0) { + outputAmount = + amountSplitListTemp.reverse().join('') + + amountFormatDecimalSpliter + + decimalAmountFormatSplitList.join(''); + } else { + outputAmount = + amountSplitListTemp.reverse().join('') + } + return outputAmount; + } + // ---------------------------------------------- passsword update functions --------------------------------------------------------- + + // This function for password criteria + password_criteria(password_Value) { + password_Value.length >= 8 ? this.password_criteria_obj.is_length = true : this.password_criteria_obj.is_length = false; + password_Value.match(this.validationService.regExps.lower_case) ? this.password_criteria_obj.is_lowerCase = true : this.password_criteria_obj.is_lowerCase = false; + password_Value.match(this.validationService.regExps.Capital_case) ? this.password_criteria_obj.is_Uppercase = true : this.password_criteria_obj.is_Uppercase = false; + password_Value.match(this.validationService.regExps.numbers) ? this.password_criteria_obj.is_numbers = true : this.password_criteria_obj.is_numbers = false; + password_Value.match(this.validationService.regExps.special_characters) ? this.password_criteria_obj.is_special_characters = true : this.password_criteria_obj.is_special_characters = false; + }; + password_criteria_obj = { + is_lowerCase: false, + is_Uppercase: false, + is_Capital_case: false, + is_numbers: false, + is_special_characters: false, + is_length: false + }; + + public isFormControlHasError(e, validationType) { + let result = e.hasError(validationType) && (e.dirty || e.touched); + return result; + }; + + // for create priority update array of object + // createPriorityObj(data, rule) { + // return data.map(e => ({ priority: e.priority, [rule]: e[rule] })); + // }; + // /** + // * Updates the priority and sets the 'is_change' flag for an element in the given list + // * based on a specified rule identifier property. + // * + // * @param listToUpdate - The array of objects + // * @param targetRuleId - The value of the rule identifier to find the target element. + // * @param newPriority - The new priority value to set. + // * @param ruleIdProperty - The property name representing the rule identifier in each object. + // */ + // updatePriorityByRuleId(listToUpdate, targetRuleId, newPriority, ruleIdProperty) { + // if (newPriority !== "") { + // const targetElement = listToUpdate.find(item => item[ruleIdProperty] === targetRuleId); + // if (targetElement) { + // targetElement.is_change = true; + // targetElement.priority = parseInt(newPriority); + // }; + // }; + // }; + + // -------------------------------------------------------------Date Formmat function -------------------------------------------------- + /** + * Converts a UTC date to a formatted local time string. + * @author Abdul Razzak + * @param date + * @param format + */ + UtcToLocaleTime(date, format = 'DD MMM YYYY, HH:mm:ss') { + let localeTime = moment.utc(date).local(); + let formattedTime = localeTime.format(format); + return formattedTime; + } + GetTimeZoneGMT() { + let _date = new Date().getTimezoneOffset(); + return `${((_date / 60) > 0 ? "-" : "+")}${Math.floor(Math.abs(_date / 60))} hours ${Math.abs(_date % 60)} minutes` + }; + + convertDateToSave(date: Date) { + return moment(date).format('YYYY-MM-DD') + 'T00:00:00Z' + }; + convertDateToSaveWithoutTime(date: Date) { + return moment(date).format('YYYY-MM-DD') + }; + convertDateWithTimeToShow(date: Date) { + return moment(date).format('DD MMM YYYY, HH:mm:ss') + }; + convertDateToShow(date: Date) { + return moment(date).format('DD MMM YYYY') + }; + + // ----------------------------------------------------------- image update function ------------------------------------------------------------ + /** + * for check image file + * @param file + * @param controls + * @param filedata + * @author Abdul Razzak + */ + checkImageFile(file, controls, filedata: FileUpload) { + const reader = new FileReader(); + reader.readAsText(file); // Read as binary data + reader.onload = (e) => { + const binaryString = e.target.result as string; + const hasScriptTag = this.hasScriptTagInBinary(binaryString); + if (hasScriptTag) { + filedata.clear(); + this.showMessage(false, 'Invalid file (contains script tag)'); + } else { + controls.setValue(file); + } + }; + }; + + /** + * Image script validation + * @author Abdul Razzak + */ + hasScriptTagInBinary(binaryData: string) { + // This is a simplified and potentially unreliable approach + const scriptTagRegex = /)<[^<]*)*<\/script>/g; + return scriptTagRegex.test(binaryData); + }; + + // ------------------------------------------------------------ api calls function--------------------------------------------------------- + GetCurrencyList(val) { + if (val.length >= 2 || val == 'ALL') { + this.ddLoader.Currency = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + let request = { + "langcode": "en", + "query": val == 'ALL' ? '' : val + } + this.ApiServ.AdminGoPost(`/MasterSearch/GetAllCurrency`, request).subscribe(res => { + if (res) { + this.CurrencyList = res?.Result; + this.ddLoader.Currency = false; + } + }); + }, 500); + }; + if (!val) { + this.CurrencyList = []; + } + }; + + /** + * this function for get standalone feature by code + * @param pageId page id + */ + getFeatures(pageId) { + return this.ApiServ.Get("/MenuMasterNew/GetAllFeatureCode/2110180851430030870/" + pageId) + } + + getCountryBySearch(val) { + if (val.length >= 2) { + this.ddLoader.country = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.ApiServ.AdminGet(`/MasterSearch/GetAllCountry/en/` + val).subscribe(res => { + if (res) { + this.CountryList = res; + this.ddLoader.country = false; + } + }); + }, 500); + } + if (!val) { + this.CountryList = []; + } + }; + // This function is used for country search by name. + + checkCountryExist = false; + getCitySearchByCountryCode(val, country_code) { + if (country_code) { + this.checkCountryExist = false; + if (val.length >= 2) { + this.ddLoader.city = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.ApiServ.AdminGet(`/MasterSearch/GetCitySearch/en/${country_code}/` + val).subscribe(res => { + if (res) { + this.CityList = res; + this.ddLoader.city = false; + } + }); + }, 500); + } + if (!val) { + this.CityList = []; + } + } else this.checkCountryExist = true; + }; + ExtranetVendorMaster(val, check) { + if (val.length >= 2) { + this.ddLoader.vendor = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.FetchExtranetVendorMaster(val, check) + }, 500); + } + if (!val) { + this.AllVendor = []; + } + }; + + FetchExtranetVendorMaster(val, check) { + let searchObj = { + vendor_name: check ? val : '', + extranet_vendor_id: !check ? val : '', + }; + return this.ApiServ.AdminGoPost('/ExtranetVendorMaster/GetAll', searchObj) + }; + loginOut() { + let loginData = sessionStorage.getItem('IP'); + this.LoginUserData = JSON.parse(securityFunctions.getSessionStorage('LoginUserData')); + try { + let userLogModel = new UserLog(); + userLogModel.ip = loginData['iP']; + userLogModel.ip_city = loginData['city']; + userLogModel.ip_country_code = loginData['countryCode']; + userLogModel.ip_lat = loginData['lat']; + userLogModel.ip_lon = loginData['lon']; + userLogModel.ip_proxy = loginData['proxy']; + userLogModel.user_id = this.LoginUserData.user_id; + userLogModel.user_type = this.LoginUserData.user_type; + this.ApiServ.AdminPost("/Log/SaveLogoutLog", userLogModel).subscribe(d => { + securityFunctions.resetSessionStoage('lastLogin') + securityFunctions.resetSessionStoage('LoginUserData') + securityFunctions.resetSessionStoage('IP') + securityFunctions.resetSessionStoage('userName') + securityFunctions.resetSessionStoage('JwtToken') + securityFunctions.resetSessionStoage('RefreshToken') + securityFunctions.resetSessionStoage('JwtTokenExpiry') + sessionStorage.removeItem('selMenu'); + window.location.href = '/Auth/Login'; + }); + } catch (error) { + window.location.href = '/Auth/Login'; + } + }; + + // + displayPosition = false; + position: string; + public subscription: Subscription; + remainingTime: number; + StartTimer() { + const source = interval(1000); + // Subscribe to the interval observable + this.subscription = source.subscribe(() => { + // Get the current time in milliseconds + const currentTime = moment.utc(this.ApiServ.getAdjustedLocalTime()).valueOf(); + const LastEndpointCallTime = moment.utc(sessionStorage.getItem('LastEndpointCallTime')).valueOf(); + // Get the token expiry time from sessionStorage + const tokenExpiry = moment.utc(sessionStorage.getItem('JwtTokenExpiry')); + // Calculate the time difference between token expiry and current time in milliseconds + const timeDifference = tokenExpiry.valueOf() - currentTime; + // Calculate the diffence between current time and the last endpoint call time. + const diff_between_endpoint_call = currentTime - LastEndpointCallTime + + // Check if time difference is less than or equal to 2 minutes (120000 milliseconds) + if (timeDifference <= 120000) { + if (this.displayPosition && this.remainingTime <= 0) { + this.exit(); + } else { + if (diff_between_endpoint_call >= 780000) { + // If excd is not set and displayPosition is not already true, set displayPosition to true + if (!sessionStorage.getItem('excd') && !this.displayPosition) { + this.displayPosition = true; + } + + // Calculate remaining time in seconds + const remainingTimeSeconds = tokenExpiry.diff(moment.utc(this.ApiServ.getAdjustedLocalTime()), 'seconds'); + // Update remainingTime property + this.remainingTime = remainingTimeSeconds; + // If remaining time is less than or equal to 0, call exit function + if (this.remainingTime <= 0) { + this.exit(); + } + } else { + this.extendJWTTime(); + } + } + } + }); + }; + exit() { + this.displayPosition = false; + sessionStorage.removeItem('excd'); + this.loginOut(); + }; + extendJWTTime() { + this.stopTimer(); + let postdata = { + "JwtToken": sessionStorage.getItem('JwtToken'), + "RefreshToken": sessionStorage.getItem('RefreshToken') + }; + this.ApiServ.AdminPost('/JWT/RefreshToken', postdata).subscribe(res => { + if (!res.Status) { + this.loginOut(); + } else { + sessionStorage.setItem('JwtToken', res.JwtToken); + sessionStorage.setItem('RefreshToken', res.RefreshToken); + sessionStorage.setItem('JwtTokenExpiry', res.JwtTokenExpiry); + sessionStorage.setItem('RefreshTokenExpireAt', res.RefreshTokenExpireAt); + this.Close(true); + this.StartTimer(); + } + }) + }; + stopTimer() { + if (this.subscription) { + this.subscription.unsubscribe(); + this.subscription = undefined; + } + }; + Close(check) { + this.displayPosition = false; + sessionStorage.setItem('excd', 'OK') + if (check) { + setTimeout(function () { + sessionStorage.removeItem('excd'); + }, 10000); // 10000 milliseconds = 10 second + } + } + AffiliateDetails(value, target, check, agencytype?, is_active?, is_cug?) { + let obj = { + AgencyId: check ? value : null, + AgencyName: !check ? value : '' + } + if (value.length >= 3) { + this.ddLoader[target] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.ApiServ.PostGo(`/AgencyDetail/GetAllAffiliateDetail`, obj).subscribe(res => { + if (res) { + this.agencyData = res.result; + if (agencytype) { + if (agencytype == '211526104324609556' || agencytype == '211526104324609557') { + if (agencytype == '211526104324609556') this.agencyData = this.agencyData.filter(z => z.AgencyType == 'B2C'); + if (agencytype == '211526104324609557') this.agencyData = this.agencyData.filter(z => z.AgencyType == 'B2B'); + } + else this.agencyData = this.agencyData.filter(z => z.AgencyType == agencytype); + }; + if(is_active) this.agencyData = res.result.filter(z => z.AgencyType == 'B2B' && z.IsActive); + if(is_cug) this.agencyData = res.result.filter(z => (z.AgencyType === "B2B" || z.is_cug) && z.IsActive); + if(!is_active && is_cug) this.agencyData = res.result.filter(z => (z.AgencyType === "B2B" || z.is_cug)); + this.ddLoader[target] = false; + } + }); + }, 500); + } else { + this.agencyData = []; + } + } + public amountDefiner(amount, definer) { + let outputAmount = amount; + let splitAmount = amount.toString().split("."); + if (splitAmount.length > 1 && splitAmount[1].length > 0) { + let decimals = splitAmount[1].substr(0, definer); + outputAmount = parseFloat(decimals.length > 0 ? `${splitAmount[0]}.${decimals}` : amount).toFixed(definer); + } else { + outputAmount = parseFloat(`${splitAmount[0]}.0}`).toFixed(definer) + } + return outputAmount; + } + + getHeaderSize(logoElem) { + const logo = logoElem.nativeElement; + let header_height = 0; + if (logo) { + header_height = logo.clientHeight; + } + return header_height; + } + + CheckActiveTabMenus(menulist){ + this.AllMenu = menulist; + Object.keys(this.MenuTabList).forEach(e=>{ + const Menu = menulist.find(d=>d.page_data.includes(this.MenuTabList[e].link)); + if(Menu){ + this.MenuTabList[e].val = true; + this.MenuTabList[e].Download = Menu.permission.Download; + this.MenuTabList[e].IsActive = Menu.permission.Status; + } + }); + this.onRouteChange(); + this.router.events + .pipe(filter(event => event instanceof NavigationEnd)) // Filter to get NavigationEnd event + .subscribe(() => { + this.onRouteChange(); // Trigger your function + }); + + } + onRouteChange(): void { + const currentUrl = this.router.url; + const currentUrlMenu = this.AllMenu.find(d=>{ + if(d.page_data){ + const page_data = JSON.parse(d.page_data); + return page_data.some(e=>currentUrl.includes(e.page_url.replaceAll('/$',''))) + }else { + return false; + } + }); + if(currentUrlMenu){ + this.DownloadFilesAllowed = currentUrlMenu.permission.Download; + this.ChangeStatusAllowed = currentUrlMenu.permission.Status; + } + } +} \ No newline at end of file diff --git a/src/app/core/common/intercept-loader.service.ts b/src/app/core/common/intercept-loader.service.ts new file mode 100644 index 0000000..ba1c0a0 --- /dev/null +++ b/src/app/core/common/intercept-loader.service.ts @@ -0,0 +1,264 @@ +import { HttpHandler, HttpRequest, HttpResponse } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable, Subject, throwError } from 'rxjs'; +import { catchError, exhaustMap, finalize, take } from 'rxjs/operators'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { LoaderService } from './loader.service'; +import { API } from '../services/api.service'; +import { securityFunctions } from './security'; +import { UserLog } from '../models/common-model/user-logout.model'; +import { UserLoginData } from '../models/common-model/userModel'; +import { CommonFunctionService } from './common-function.service'; + +@Injectable({ + providedIn: 'root' +}) +export class InterceptLoader { + private readonly requests: HttpRequest[] = []; + LoginUserData: UserLoginData + constructor( + private readonly loaderService: LoaderService, + private readonly apiServ: API, + public MsgService: MessageService, + private readonly commonService: CommonFunctionService) { + } + + removeRequest(req: HttpRequest) { + const i = this.requests.indexOf(req); + if (i >= 0) { + this.requests.splice(i, 1); + } + if (!req.url.includes('RetryInvoice') && !req.url.includes('invoice/GetCustomer') && !req.url.includes('UserMachine/CheckUserVerified')) { + this.loaderService.isLoading.next(this.requests.length > 0); + } + } + private readonly refreshToken$ = new Subject(); + private refreshInProgress = false; + intercept(req: HttpRequest, next: HttpHandler) { + const modifiedRequest = this.headerSetup(req); + const adjustedTime = this.apiServ.getAdjustedLocalTime(); // Get adjusted local time + const currentISOString = moment.utc(adjustedTime).format('YYYY-MM-DD HH:mm:ss'); + const time1 = moment.utc(sessionStorage.getItem('JwtTokenExpiry')).subtract(3, 'seconds').format('YYYY-MM-DD HH:mm:ss'); + const isTime1AfterTime2 = this.isTime1AfterTime2(time1, currentISOString); + const isRefreshTokenUrl = req.url.toLowerCase().includes('/jwt/refreshtoken'); + const isLogoutLogUrl = req.url.toLowerCase().includes('/log/savelogoutlog'); + let UGT = sessionStorage.getItem('UGT'); + const isServerUTCTimeUrl = req.url.includes('/Server/GetServerUTCTime'); + if (((isTime1AfterTime2) && !isRefreshTokenUrl && !isLogoutLogUrl) || (!UGT && !isServerUTCTimeUrl)) { + // If a token refresh is in progress, wait for it to complete before proceeding + if (this.refreshInProgress) { + return this.refreshToken$.pipe( + take(1), + exhaustMap(() => { + const modifiedRequest = this.headerSetup(req); + this.requests.push(modifiedRequest); + if (!req.url.includes('RetryInvoice') && !req.url.includes('invoice/GetCustomer') && !req.url.includes('UserMachine/CheckUserVerified')) { + this.loaderService.isLoading.next(true); + } + return this.ObservableReturn(modifiedRequest, next) + }) + ); + } + // Trigger token refresh and queue other requests + this.refreshInProgress = true; + this.refreshToken$.next(); + if (!UGT && !isServerUTCTimeUrl) { + return this.GetServerTime(req, next); + } else { + return this.GetJWTToKen(req, next); + } + } else { + this.requests.push(modifiedRequest); + if (!req.url.includes('RetryInvoice') && !req.url.includes('invoice/GetCustomer') && !req.url.includes('UserMachine/CheckUserVerified')) { + this.loaderService.isLoading.next(true); + } + return this.ObservableReturn(modifiedRequest, next); + } + } + + isTime1AfterTime2(time1, time2) { + const date1 = new Date(time1); // Create a Date object for time1 + const date2 = new Date(time2); // Create a Date object for time2 + return date1 < date2 ? true : false; // Compare the two Date objects + } + + ObservableReturn(req, next) { + return Observable.create(observer => { + const subscription = next.handle(req).subscribe( + event => { + if (event instanceof HttpResponse) { + + this.removeRequest(req); + observer.next(event); + + } + }, + err => { + if (err.status === 401) { + // Response status is 401, so you can run your function here + const customResponse = err; // Pass the response to your function + // updated by Abdul Razzak on 23 mar 2024 + if (err.url.toLowerCase().includes('/log/savelogoutlog')) { + window.location.href = '/Auth/Login'; + } else { + this.handleUnauthorizedResponse(customResponse.error); // Replace this with your actual function + } + this.removeRequest(req); + } else if (err.status === 429) { + this.MsgService.add({ + severity: "error", + detail: err.error["metadata"]?.message ? err.error["metadata"]?.message : 'Service is currently unavailable', + }); + this.removeRequest(req); + } else { + this.removeRequest(req); + console.log('error' + err); + observer.error(err); + } + }, + () => { + this.removeRequest(req); + observer.complete(); + }); + // remove request from queue when cancelled + return () => { + this.removeRequest(req); + subscription.unsubscribe(); + }; + }); + } + + handleUnauthorizedResponse(Response) { + if (Response.AuthResponseType == 2 || Response.AuthResponseType == 1 || Response.AuthResponseType == 4 || Response.AuthResponseType == 5 || Response.AuthResponseType == 6 || Response.AuthResponseType == 7 || Response.AuthResponseType == 8) { + this.loginOut(); + } + if (Response.AuthResponseType == 3) { + this.MsgService.add({ + severity: "error", + detail: Response["message"], + }); + } + } + + loginOut() { + let loginData = sessionStorage.getItem('IP'); + let LoginUserData = JSON.parse(securityFunctions.getSessionStorage('LoginUserData')); + try { + let userLogModel = new UserLog(); + userLogModel.ip = loginData['iP']; + userLogModel.ip_city = loginData['city']; + userLogModel.ip_country_code = loginData['countryCode']; + userLogModel.ip_lat = loginData['lat']; + userLogModel.ip_lon = loginData['lon']; + userLogModel.ip_proxy = loginData['proxy']; + userLogModel.user_id = LoginUserData.user_id; + userLogModel.user_type = LoginUserData.user_type; + this.apiServ.AdminPost("/Log/SaveLogoutLog", userLogModel).subscribe(d => { + securityFunctions.resetSessionStoage('lastLogin') + securityFunctions.resetSessionStoage('LoginUserData') + securityFunctions.resetSessionStoage('IP') + securityFunctions.resetSessionStoage('userName') + securityFunctions.resetSessionStoage('userType') + securityFunctions.resetSessionStoage('JwtToken') + securityFunctions.resetSessionStoage('RefreshToken') + securityFunctions.resetSessionStoage('JwtTokenExpiry') + sessionStorage.removeItem('selMenu'); + window.location.href = '/Auth/Login'; + }); + } catch (error) { + window.location.href = '/Auth/Login'; + } + } + GetJWTToKen(req,next) { + let postdata = { + "JwtToken": sessionStorage.getItem('JwtToken'), + "RefreshToken": sessionStorage.getItem('RefreshToken') + }; + return this.apiServ.AdminPost('/JWT/RefreshToken', postdata).pipe( + catchError((error) => { + // return throwError(error); + if (error.status === 401) { + // Response status is 401, so you can run your function here + const customResponse = error; // Pass the response to your function + // updated by Abdul Razzak on 04 apr 2024 + this.handleUnauthorizedResponse(customResponse.error); // Replace this with your actual function + this.removeRequest(req); + return throwError(error); + } else { + console.log('Error:', error); + this.removeRequest(req); + return throwError(error); + } + }), + finalize(() => { + this.refreshInProgress = false; + this.refreshToken$.next(); // Signal completion of token refresh + }), + exhaustMap((res: any) => { + if (!res.Status) { + this.loginOut(); + const modifiedRequest = this.headerSetup(req); + this.requests.push(modifiedRequest); + } else { + sessionStorage.setItem('JwtToken', res.JwtToken); + sessionStorage.setItem('RefreshToken', res.RefreshToken); + sessionStorage.setItem('JwtTokenExpiry', res.JwtTokenExpiry); + const modifiedRequest = this.headerSetup(req); + if (!req.url.includes('RetryInvoice') && !req.url.includes('invoice/GetCustomer') && !req.url.includes('UserMachine/CheckUserVerified') && !req.url.toLowerCase().includes('/jwt/refreshtoken')) { + this.loaderService.isLoading.next(true); + } + this.commonService.StartTimer(); + return this.ObservableReturn(modifiedRequest, next); + } + }) + ); + } + + GetServerTime(req, next) { + return this.apiServ.GetGo('/Server/GetServerUTCTime').pipe( + catchError((error) => { + console.log('Error:', error); + this.removeRequest(req); + return throwError(error); + }), + finalize(() => { + this.refreshInProgress = false; + this.refreshToken$.next(); // Signal completion of token refresh + }), + exhaustMap((res) => { + this.SetuserLocalGapTime(res) + this.loaderService.isLoading.next(true); + let modifiedRequest = this.headerSetup(req); + return this.ObservableReturn(modifiedRequest, next); + }) + ); + }; + SetuserLocalGapTime(data) { + let gaptime = data.server_utc_time - new Date().getTime(); + sessionStorage.setItem('UGT', gaptime.toString()); + } + + headerSetup(req) { + this.LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : ''; + // let domain = document.location.host + let domain = 'extranet.dev.futuretravelplatform.com' + let domainName = domain.replace(/^(https?:\/\/)?/, ''); + const adjustedTime = this.apiServ.getAdjustedLocalTime(); // Get adjusted local time + // Handle vendor id in token + // Don't remove '~' as there was a length undefined in the API to get vendor id + let domain_time = domainName + '~' + adjustedTime + '~' + '' + '~' + '' + '~' + '' + '~' + (this.LoginUserData ? this.LoginUserData.extranet_vendor_id : ''); + let key = securityFunctions.rsa_public_key; + let encrypted_string = securityFunctions.encryptRSA(key, domain_time).toString(); + if (!req.url.toLowerCase().includes('/jwt/refreshtoken')) { + sessionStorage.setItem('LastEndpointCallTime', moment.utc(adjustedTime).format('YYYY-MM-DD HH:mm:ss')); + } + return req.clone({ + setHeaders: { + 'Authorization': 'Bearer ' + sessionStorage.getItem('JwtToken'), + 'token': encrypted_string + } + }); + } + +} diff --git a/src/app/core/common/loader.service.ts b/src/app/core/common/loader.service.ts new file mode 100644 index 0000000..1ae2a46 --- /dev/null +++ b/src/app/core/common/loader.service.ts @@ -0,0 +1,11 @@ +import { Injectable } from '@angular/core'; +import { BehaviorSubject } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class LoaderService { + + public isLoading = new BehaviorSubject(false); + constructor() { } +} \ No newline at end of file diff --git a/src/app/core/common/security.ts b/src/app/core/common/security.ts new file mode 100644 index 0000000..85bfef4 --- /dev/null +++ b/src/app/core/common/security.ts @@ -0,0 +1,154 @@ +import * as CryptoJS from 'crypto-js'; +import { JSEncrypt } from 'jsencrypt'; +export class securityFunctions { + + static yek = "$uPer@dm1n~dI@z7"; + static sayek = "$uper@dmin~diaZ1" + static savi = "$uper@dmin~diaZ1" + static rsa_public_key = `-----BEGIN PUBLIC KEY----- + MIICITANBgkqhkiG9w0BAQEFAAOCAg4AMIICCQKCAgB0rRSHGZK/FtK15IRfQxtl + dN5ToPtfXGzTNBe1vGhow5xqp6BLubMKKPwCj3zOJiAm1Ip1VNqqYxWnaL8ZErBF + rErtE0r7kn50QgGgJCpdrWJ4unhaoe1su207d9oY6D6OBH90v1aXA6ZjN7zTJmiq + FJZOOTQE6t/XwNAOphq/B6Lcr1iQSQmSqaMozy4OQ4NvIzNTQn5tcs9qJBMsKFeU + cSp8VK76JBNEqSuEHNmbV2d/IQ5XAqVUiAs34kH2xWRSbBmy0WK3c3QKGzC1MRWM + 9JauLN56TKUFOmUSjfWY3caJru6HxsiMTGKnvflXHfgA2aLAPxu72pIHoCTy5Hxj + AUoKM7qXUn/kQj4Ci0M/0LRF4boqd37wpbyVNeXNvqm+dLjxklf/+NHMfNL2Wvb4 + ekHUVI8nMVPgswIcQ7q/Njf9DC+LA+/duf8m9JDjI3J6r9y1gQugdkLETGzF2Gj1 + ToU0Pocrg6CFHImqq2z+cOeWnURrV0f0I1UWWGCb79OZxZ5oDjM9uCLRsoe8+Npg + ACZNf4AbnM7OUNj5TEYs6t/tUYouvTB7gH452I3EH6KWBl+ZTgCg0RFkOMazNOjn + 4J0yfbaPvpVgKzF2WRyn63mTO2tdLRl5s9uqMFhXmCs6IzEqBpxMKL1aS6ONZLDG + 5qPtpCPJnUFQEBTVlSO15QIDAQAB + -----END PUBLIC KEY-----` + /** + * encrypting text using cryptoJS with 128/8 key size + * used CBC mode + * used Pkcs7 padding + * returning encrypted text + * @param plainText text to be encrypted + */ + //encrypt text using AES + public static encryptText(plainText) { + var key = CryptoJS.enc.Utf8.parse(this.yek); + var iv = CryptoJS.enc.Utf8.parse(this.yek); + + var encryptedText = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(plainText), key, + { + keySize: 128 / 8, + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }).toString(); + return encryptedText; + } + + /** + * decryption method for decrypt text that was decrypted in encrypt text method + * @param cipherText text to be encrypt + */ + //decrypt cypher text using AES + public static decryptText(cipherText) { + var key = CryptoJS.enc.Utf8.parse(this.yek); + var iv = CryptoJS.enc.Utf8.parse(this.yek); + + var decryptedText = CryptoJS.AES.decrypt(cipherText, key, + { + keySize: 128 / 8, + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }).toString(CryptoJS.enc.Utf8); + return decryptedText; + } + + public static setLocalStoage(key: string, value) { + localStorage.setItem(key, this.encryptText(value)); + } + + public static getLocalStoage(key: string) { + var value = localStorage.getItem(key); + if (value) { + return this.decryptText(value); + } + } + + public static setSessionStorage(key: string, value) { + sessionStorage.setItem(key, this.encryptText(value)); + } + + public static getSessionStorage(key: string) { + var value = sessionStorage.getItem(key); + if (value) { + return this.decryptText(value); + } + } + public static resetLocalStoage(key: string) { + localStorage.removeItem(key); + } + public static resetSessionStoage(key: string) { + sessionStorage.removeItem(key); + } + public static getSaUrlKey(userId) { + var key = CryptoJS.enc.Utf8.parse(this.sayek); + var iv = CryptoJS.enc.Utf8.parse(this.savi); + + var encryptedText = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(userId), key, + { + keySize: 128 / 8, + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }).toString(); + return encryptedText; + } + + public static DecryptReq(data) { + var key = CryptoJS.enc.Utf8.parse(this.sayek); + var iv = CryptoJS.enc.Utf8.parse(this.savi); + + // encrypt data using AES + var encrypted = CryptoJS.AES.decrypt(data, key, { iv: iv }); + + return encrypted.toString(CryptoJS.enc.Utf8) + } + + /** + * method to add restrict for priority + * + */ + checkLength(e, input) { + const functionalKeys = ['Backspace', 'ArrowRight', 'ArrowLeft']; + if (functionalKeys.indexOf(e.key) !== -1) { + return; + } + const keyValue = +e.key; + if (isNaN(keyValue)) { + e.preventDefault(); + return; + } + let newValue; + newValue = input.value + keyValue.toString(); + if (+newValue > 100 || +newValue == 0 || newValue.length > 3) { + e.preventDefault(); + } + } + public static EncryptReq(data) { + var key = CryptoJS.enc.Utf8.parse(this.sayek); + var iv = CryptoJS.enc.Utf8.parse(this.savi); + + // encrypt data using AES + var encrypted = CryptoJS.AES.encrypt(data, key, { iv: iv }); + + // convert encrypted data to base64 string for transport + var encryptedBase64 = encrypted.toString(); + return encryptedBase64 + } + + public static encryptRSA(publicKey: string, jsonString: string) { + const encryptor = new JSEncrypt(); + encryptor.setPublicKey(publicKey); + + const encrypted = encryptor.encrypt(jsonString); + + return encrypted; + } +} diff --git a/src/app/core/common/static-data.service.ts b/src/app/core/common/static-data.service.ts new file mode 100644 index 0000000..7c338fa --- /dev/null +++ b/src/app/core/common/static-data.service.ts @@ -0,0 +1,269 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class StaticDataService { + + ActivityOverViewtab = 0; + Hours = [ + { id: 0, name: '00' }, + { id: 1, name: '01' }, + { id: 2, name: '02' }, + { id: 3, name: '03' }, + { id: 4, name: '04' }, + { id: 5, name: '05' }, + { id: 6, name: '06' }, + { id: 7, name: '07' }, + { id: 8, name: '08' }, + { id: 9, name: '09' }, + { id: 10, name: '10' }, + { id: 11, name: '11' }, + { id: 12, name: '12' }, + { id: 13, name: '13' }, + { id: 14, name: '14' }, + { id: 15, name: '15' }, + { id: 16, name: '16' }, + { id: 17, name: '17' }, + { id: 18, name: '18' }, + { id: 19, name: '19' }, + { id: 20, name: '20' }, + { id: 21, name: '21' }, + { id: 22, name: '22' }, + { id: 23, name: '23' }, + ]; + HoursAndMinutes = [ + { hour: '00', minute: '00' }, + { hour: '00', minute: '30' }, + { hour: '01', minute: '00' }, + { hour: '01', minute: '30' }, + { hour: '02', minute: '00' }, + { hour: '02', minute: '30' }, + { hour: '03', minute: '00' }, + { hour: '03', minute: '30' }, + { hour: '04', minute: '00' }, + { hour: '04', minute: '30' }, + { hour: '05', minute: '00' }, + { hour: '05', minute: '30' }, + { hour: '06', minute: '00' }, + { hour: '06', minute: '30' }, + { hour: '07', minute: '00' }, + { hour: '07', minute: '30' }, + { hour: '08', minute: '00' }, + { hour: '08', minute: '30' }, + { hour: '09', minute: '00' }, + { hour: '09', minute: '30' }, + { hour: '10', minute: '00' }, + { hour: '10', minute: '30' }, + { hour: '11', minute: '00' }, + { hour: '11', minute: '30' }, + { hour: '12', minute: '00' }, + { hour: '12', minute: '30' }, + { hour: '13', minute: '00' }, + { hour: '13', minute: '30' }, + { hour: '14', minute: '00' }, + { hour: '14', minute: '30' }, + { hour: '15', minute: '00' }, + { hour: '15', minute: '30' }, + { hour: '16', minute: '00' }, + { hour: '16', minute: '30' }, + { hour: '17', minute: '00' }, + { hour: '17', minute: '30' }, + { hour: '18', minute: '00' }, + { hour: '18', minute: '30' }, + { hour: '19', minute: '00' }, + { hour: '19', minute: '30' }, + { hour: '20', minute: '00' }, + { hour: '20', minute: '30' }, + { hour: '21', minute: '00' }, + { hour: '21', minute: '30' }, + { hour: '22', minute: '00' }, + { hour: '22', minute: '30' }, + { hour: '23', minute: '00' }, + { hour: '23', minute: '30' }, + ]; + days = [ + { id: 0, name: '00' }, + { id: 1, name: '01' }, + { id: 2, name: '02' }, + { id: 3, name: '03' }, + { id: 4, name: '04' }, + { id: 5, name: '05' }, + { id: 6, name: '06' }, + { id: 7, name: '07' }, + { id: 8, name: '08' }, + { id: 9, name: '09' }, + { id: 10, name: '10' }, + { id: 11, name: '11' }, + { id: 12, name: '12' }, + { id: 13, name: '13' }, + { id: 14, name: '14' }, + { id: 15, name: '15' }, + { id: 16, name: '16' }, + { id: 17, name: '17' }, + { id: 18, name: '18' }, + { id: 19, name: '19' }, + { id: 20, name: '20' }, + { id: 21, name: '21' }, + { id: 22, name: '22' }, + { id: 23, name: '23' }, + { id: 24, name: '24' }, + { id: 25, name: '25' }, + { id: 26, name: '26' }, + { id: 27, name: '27' }, + { id: 28, name: '28' }, + { id: 29, name: '29' }, + { id: 30, name: '30' }, + { id: 31, name: '31' } + ]; + minutes = [ + { id: 0, name: '00' }, + { id: 1, name: '01' }, + { id: 2, name: '02' }, + { id: 3, name: '03' }, + { id: 4, name: '04' }, + { id: 5, name: '05' }, + { id: 6, name: '06' }, + { id: 7, name: '07' }, + { id: 8, name: '08' }, + { id: 9, name: '09' }, + { id: 10, name: '10' }, + { id: 11, name: '11' }, + { id: 12, name: '12' }, + { id: 13, name: '13' }, + { id: 14, name: '14' }, + { id: 15, name: '15' }, + { id: 16, name: '16' }, + { id: 17, name: '17' }, + { id: 18, name: '18' }, + { id: 19, name: '19' }, + { id: 20, name: '20' }, + { id: 21, name: '21' }, + { id: 22, name: '22' }, + { id: 23, name: '23' }, + { id: 24, name: '24' }, + { id: 25, name: '25' }, + { id: 26, name: '26' }, + { id: 27, name: '27' }, + { id: 28, name: '28' }, + { id: 29, name: '29' }, + { id: 30, name: '30' }, + { id: 31, name: '31' }, + { id: 32, name: '32' }, + { id: 33, name: '33' }, + { id: 34, name: '34' }, + { id: 35, name: '35' }, + { id: 36, name: '36' }, + { id: 37, name: '37' }, + { id: 38, name: '38' }, + { id: 39, name: '39' }, + { id: 40, name: '40' }, + { id: 41, name: '41' }, + { id: 42, name: '42' }, + { id: 43, name: '43' }, + { id: 44, name: '44' }, + { id: 45, name: '45' }, + { id: 46, name: '46' }, + { id: 47, name: '47' }, + { id: 48, name: '48' }, + { id: 49, name: '49' }, + { id: 50, name: '50' }, + { id: 51, name: '51' }, + { id: 52, name: '52' }, + { id: 53, name: '53' }, + { id: 54, name: '54' }, + { id: 55, name: '55' }, + { id: 56, name: '56' }, + { id: 57, name: '57' }, + { id: 58, name: '58' }, + { id: 59, name: '59' }, + ]; + AtoZ = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] + WeekDaysList = [ + { + "ItemKey": "MONDAY", + "Itemkey2": "Monday", + "ItemToDisplay": "Mon", + "ItemOrder": 1, + }, + { + "ItemKey": "TUESDAY", + "Itemkey2": "Tuesday", + "ItemToDisplay": "Tue", + "ItemOrder": 2, + }, + { + "ItemKey": "WEDNESDAY", + "Itemkey2": "Wednesday", + "ItemToDisplay": "Wed", + "ItemOrder": 3, + }, + { + "ItemKey": "THURSDAY", + "Itemkey2": "Thursday", + "ItemToDisplay": "Thu", + "ItemOrder": 4, + }, + { + "ItemKey": "FRIDAY", + "Itemkey2": "Friday", + "ItemToDisplay": "Fri", + "ItemOrder": 5, + }, + { + "ItemKey": "SATURDAY", + "Itemkey2": "Saturday", + "ItemToDisplay": "Sat", + "ItemOrder": 6, + }, + { + "ItemKey": "SUNDAY", + "Itemkey2": "Sunday", + "ItemToDisplay": "Sun", + "ItemOrder": 7, + } + ]; + // flight contract + CabinsClassType = [ + { value: 'Y', displayName: 'Economy' }, + { value: 'W', displayName: 'Premium Economy' }, + { value: 'C', displayName: 'Business Class' }, + { value: 'F', displayName: 'First Class' }, + ]; + RefundType = [ + { value: 'REFUNDABLE', displayName: 'Refundable' }, + { value: 'NONREFUNDABLE', displayName: 'Non-Refundable' }, + ]; + ConfirmationType = [ + { value: 'YES', displayName: 'Instant' }, + { value: 'NO', displayName: 'Manual' }, + ]; + PaxTypes = [ + { value: 'A', displayName: 'Adult' }, + { value: 'C', displayName: 'Child' }, + { value: 'I', displayName: 'Infant' }, + ]; + AmountType = [ + { value: 'FIXED', displayName: 'Fixed' }, + { value: 'PERCENTAGE', displayName: 'Percentage' }, + ]; + BagUnit = [ + { value: 'KG', displayName: 'KG' }, + { value: 'POUNDS', displayName: 'Pounds' }, + { value: 'PIECE', displayName: 'Piece' }, + { value: 'TEXT', displayName: 'Text' }, + ]; + dateType = [ + { value: '1', displayName: 'Departure Date' }, + { value: '2', displayName: 'Return Date' }, + ]; + FareTypeApp = [ + { value: 'ONEWAY', displayName: 'Oneway Only' }, + { value: 'ROUNDTRIP', displayName: 'Roundtrip / Multicity Only' }, + { value: 'BOTH', displayName: 'Both' }, + ]; + Confirmation_Type = [ + { value: 'INSTANT', displayName: 'Instant' }, + { value: 'MANUAL', displayName: 'Manual' }, + ]; +} \ No newline at end of file diff --git a/src/app/core/common/validation.service.ts b/src/app/core/common/validation.service.ts new file mode 100644 index 0000000..0aff256 --- /dev/null +++ b/src/app/core/common/validation.service.ts @@ -0,0 +1,156 @@ +import { Injectable } from '@angular/core'; +import { AbstractControl, FormControl, ValidatorFn, Validators } from '@angular/forms'; + +@Injectable({ + providedIn: 'root', +}) + +export class ValidationService { + regExps = { + password: /^[0-9]{6}$/, + passwordV2: /(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,<>\/?~])(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{8,}/, + mobCode: /^[0-9]{2,4}$/, + mobNum: /^[0-9]*$/, + numbers: /[0-9]/, + decimal: /^(0|[1-9.]\d*)(\.\d+)?$/, + alpha_numeric: /^[a-zA-Z ]*$/, + lower_case: /[a-z]/, + Capital_case: /[A-Z]/, + special_characters: /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/, + lat_long: /^-?(?=.*\d\.\d)(?!.*\.\d*\.)\d+\.?\d*$/ + }; + get email() { + return new FormControl('', [Validators.required, Validators.email]); + } + get email_non_required() { + return new FormControl('', [Validators.email]); + } + get passwordV2() { + return new FormControl('', [ + Validators.required, + Validators.pattern(this.regExps['passwordV2']), + ]); + } + get passwordV2_non_required() { + return new FormControl('', [ + Validators.required, + Validators.pattern(this.regExps['passwordV2']), + ]); + } + get password() { + return new FormControl('', [ + Validators.required, + Validators.pattern(this.regExps['password']), + ]); + } + get password_non_required() { + return new FormControl('', [ + Validators.pattern(this.regExps['password']), + ]); + } + get number() { + return new FormControl('', [ + Validators.required, + Validators.pattern(this.regExps['mobNum']), + ]); + } + get mobNo() { + return new FormControl('', [ + Validators.pattern(this.regExps['mobNum']), + Validators.required, + ]); + } + get alpha_numeric() { + return new FormControl('', [ + Validators.pattern(this.regExps['alpha_numeric']) + ]); + } + get alphaNumericWithReq() { + return new FormControl('', [ + Validators.pattern(this.regExps['alpha_numeric']), + Validators.required, + ]); + } + get required() { + return new FormControl(null, [Validators.required]); + } + + get decimal() { + return new FormControl('', [ + Validators.pattern(this.regExps['decimal']), + Validators.required, + ]); + } + get numreq() { + return new FormControl('', [ + Validators.pattern(this.regExps['mobNum']), + Validators.required, + ]); + } + get lat_long() { + return new FormControl('', [ + Validators.pattern(this.regExps['lat_long']), + Validators.required, + ]); + } + + + + onBlur(Control, validationType) { + return Control.hasError(validationType) && Control.touched; + } + + + getFormArrControls(formArrayName, index, controlName) { + return formArrayName.controls[index].controls[controlName]; + } + + showValidationsMsg(form) { + form.markAllAsTouched(); + } + + prioirtyValidation(alldata) { + let message = null + let pri_arr = alldata.filter((el, ind) => { + return alldata.findIndex(e => e.priority == el.priority) != ind; + }); + let negative_pr = alldata.filter(e => e.priority < 0); + let max_pr = alldata.filter(e => e.priority > 100); + let zero_pr = alldata.filter(e => e.priority == 0) + if (negative_pr.length > 0) { + message = "Priority can't be negative" + } else if (pri_arr.length > 0) { + message = "Priority can't be same" + } else if (max_pr.length > 0) { + message = "Priority can't be above 100" + } else if (zero_pr.length > 0) { + message = "Priority can't be 0" + } + return message + } + + + scrollTo(el: Element): void { + if (el) { + el.scrollIntoView({ behavior: 'smooth', block: 'center' }); + } + } + scrollToError(): void { + const errorInput = document.querySelector('.ErrorWrapper'); + const errorspan = document.querySelector('.errorspan'); + this.scrollTo(errorInput ? errorInput : errorspan); + } + dateRangeValidation(): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + } + return null; + }; + } + + + +} \ No newline at end of file diff --git a/src/app/core/guard/auth.guard.ts b/src/app/core/guard/auth.guard.ts new file mode 100644 index 0000000..e2afb30 --- /dev/null +++ b/src/app/core/guard/auth.guard.ts @@ -0,0 +1,43 @@ +// Angular +import { Injectable } from '@angular/core'; +import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router'; +// RxJS +import { Observable } from 'rxjs'; +import { securityFunctions } from '../common/security'; +@Injectable() +export class AuthGuard implements CanActivate { + constructor( + private router: Router) { } + + canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean { + if (securityFunctions.getSessionStorage('LoginUserData')) { + let userdata = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null + if (userdata) { + if (userdata.user_id) { + // let tpinApplicable = sessionStorage.getItem('TpinApplicable') == 'true' ? true : false; + // let tpinActivated = sessionStorage.getItem('T_Activated') == 'true' ? true : false; + // let tpinExpired = sessionStorage.getItem('T_Expired') == 'true' ? true : false; + // if (tpinApplicable) { + // if (!tpinActivated || tpinExpired) { + // let userId = sessionStorage.getItem('userId') + // const now = new Date(); + // const formattedDate = now.toISOString().slice(0, 19).replace('T', ' '); + // let keyVal = securityFunctions.EncryptReq(userId + '~' + formattedDate + '~' + (tpinExpired ? 'expired' : 'create')).trim() + // this.router.navigate(['/Login/TPIN'], { queryParams: { key: keyVal } }) + // return false; + // } + // else { + // return true + // } + // } + return true + } + return false + } + return false; + } else { + window.location.href = '/Auth/Login'; + return false; + } + } +} diff --git a/src/app/core/models/Experience-Service/experience-manage-languag/experience-manage-lang.model.ts b/src/app/core/models/Experience-Service/experience-manage-languag/experience-manage-lang.model.ts new file mode 100644 index 0000000..b5b7287 --- /dev/null +++ b/src/app/core/models/Experience-Service/experience-manage-languag/experience-manage-lang.model.ts @@ -0,0 +1,27 @@ + +export class ActivityContent { + activity_content_id: string | null; + org_id: string | null; + activity_id: string; + supplier_id: string; + language_code: string; + activity_name: string; + departure_point: string; + meeting_point: string; + drop_point: string; + activity_highlight: string; + activity_description: string; + activity_restriction: string; + activities_details: string; + activity_inclusion: string; + activity_exclusion: string; + revision_nbr: number | null; + created_by: string | null; + created_on: string | null; + updated_by: string | null; + updated_on: string | null; + is_active: boolean; + is_deleted: boolean; + additional_pick_up_details: string; + daywise_itinerary: string; +} \ No newline at end of file diff --git a/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-allocation/edit-allocation.model.ts b/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-allocation/edit-allocation.model.ts new file mode 100644 index 0000000..ce0c44d --- /dev/null +++ b/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-allocation/edit-allocation.model.ts @@ -0,0 +1,31 @@ + +export class AllocationItems { + activity_allocation_id: string | null; + activity_contract_id: string | null; + activity_slot_id: string | null; + _date: string; + allocation_count: number | null; + release_days: number | null; + _allocation_type: string | null; + is_active: boolean; +} + + +export class UpdateAllocation { + activity_contract_id: string | null; + activity_slot_id: string | null; + allocationItems: AllocationItems[]; +} + +export class AllocationOverview { + activity_allocation_id: string | null; + activity_contract_id: string | null; + activity_slot_id: string | null; + _date: string; + allocation_count: number | null; + release_days: number | null; + booking_count: number | null; + remaining_count: number | null; + _allocation_type: string | null; + is_active: boolean; +} \ No newline at end of file diff --git a/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-cancellation-policy/edit-cancellation-policy.model.ts b/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-cancellation-policy/edit-cancellation-policy.model.ts new file mode 100644 index 0000000..759885b --- /dev/null +++ b/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-cancellation-policy/edit-cancellation-policy.model.ts @@ -0,0 +1,30 @@ +export class CancellationDisplay { + activity_cancellation_policy_id: string; + date: string; + _cancellation_policy_type: string; + from: number; + to: number; + _charge_type: string; + charge_value: number; +} +export class GetCancellationPolicy { + contract_id: string; + from_date: string | null; + to_date: string | null; + slot_id: string | null; + seasonId: string[] | null; + days: string | null; +} + + +export class UpdateCancellationPolicy { + activity_contract_id: string; + _no_show_policy_type: string; + no_show_value: number; + cancellation_policy: CancellationDisplay[]; +} + +// export class UpdateCancellationPolicy { +// activity_contract_id: string; +// cancellation_policy: CancellationDisplay[]; +// } \ No newline at end of file diff --git a/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-details/edit-deatils.model.ts b/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-details/edit-deatils.model.ts new file mode 100644 index 0000000..b27665c --- /dev/null +++ b/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-details/edit-deatils.model.ts @@ -0,0 +1,16 @@ +export class EditActivityContractDetail { + contract_id: string; + option_name: string; + currency_code: string; + language_code: string; + include_nationality_code: string; + exclude_nationality_code: string; + _nationality_type: string; + is_exclude_nationality: boolean; + rate_inclusion: string; + contract_remark: string; + is_pickup_included: boolean; + is_drop_off_included: boolean; + is_guide_included: boolean; + guide_languages: string; +} \ No newline at end of file diff --git a/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-rate-confi/edit-rate-confi.model.ts b/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-rate-confi/edit-rate-confi.model.ts new file mode 100644 index 0000000..a9dade9 --- /dev/null +++ b/src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-rate-confi/edit-rate-confi.model.ts @@ -0,0 +1,80 @@ + + + +export class ActivityAllContract { + activity_id: string; + option_name: string | null; + is_pickup_included: boolean; + is_drop_off_included: boolean; +} + +export class GetRateDetails { + contract_id: string; + slot_id: string | null; + from_date: string | null; + to_date: string | null; + dates: string | null; + seasonId: string[] | null; + days: string | null; +} + +// export class GetTieredRateDetail { +// contract_id: string; +// slot_id: string; +// dates: string; +// days: string; +// } + + +export class EditActivityContractRate { + activity_contract_id: string; + activity_slot_id: string; + perPaxPrices: PaxRates[] | null; + perVehicleRates: VehicleRates[] | null; + tieredPricings: TieredPricingList[] | null; + privateTransfer: ActivityPrivateTransfer[] | null; + sharedTransfer: ActivitySharedTransfer | null; +} +export class PaxRates { + activity_rate_per_pax_id: string; + date: string; + adult_rate: number; + senior_rate: number; + youth_rate: number; + child_rate: number; +} + + +export class VehicleRates { + activity_rate_per_vehicle_id: string; + vehicle_supplier_id: string; + vehicle_id: string; + vehicle_max_occupancy: string; + date: string; + rate: number; +} + +export class TieredPricingList { + id: string; + pricing: PaxPricing[]; +} + +export class PaxPricing { + pax_type: string; + sequence: number; + rate: number; +} + +export class ActivityPrivateTransfer { + vehicle_id: string; + vehicle_occupancy: string; + vehicle_supplier_id: string; + rate: number; +} +export class ActivitySharedTransfer { + vehicle_supplier_id: string; + adult_rate: number; + senior_rate: number; + youth_rate: number; + child_rate: number; +} \ No newline at end of file diff --git a/src/app/core/models/Experience-Service/experience-rate-config/experience-rate-config.model.ts b/src/app/core/models/Experience-Service/experience-rate-config/experience-rate-config.model.ts new file mode 100644 index 0000000..e25bb29 --- /dev/null +++ b/src/app/core/models/Experience-Service/experience-rate-config/experience-rate-config.model.ts @@ -0,0 +1,157 @@ + + +export class SaveActivityContractDetails { + activityContract: ActivityContract; + activityContractDetails: ActivityDetails[]; + privateTransfer: ActivityPrivateTransfer[]; + sharedTransfer: ActivitySharedTransfer; + incNationalityCodes: string[] | null; + excNationalityCodes: string[] | null; + seasonIdsForRateDates: string[] | null; + datesForRates: DateRange[]; + slotDetails: SlotDetails[] | null; + activityCancellationDetails: ActivityCancellationDetails[] | null; +} + +export class ActivityPrivateTransfer { + vehicle_id: string; + vehicle_occupancy: string; + vehicle_supplier_id: string; + rate: number; +} +export class ActivitySharedTransfer { + vehicle_supplier_id: string; + adult_rate: number; + senior_rate: number; + youth_rate: number; + child_rate: number; +} + +export class Specific { + specificTimeSlot: DateRange[]; + specificSlotRateRange: RateRange; + activityPaxRate: ActivityPaxRate; + activityVehicleRate: ActivityVehicleRate; +} + +export class SlotDetails { + slot: Slot[]; + applicableDays: string; + rateRange: RateRange | null; + activityPaxRate: ActivityPaxRate | null; + activityVehicleRate: ActivityVehicleRate[] | null; + activityCancellationDetails: ActivityCancellationDetails[] | null; +} +export class Slot { + slotId: string; + is_private_transfer: boolean; + is_shared_transfer: boolean; + is_without_transfer: boolean; +} + + +export class ActivityContract { + activity_contract_id: string | null; + org_id: string | null; + supplier_id: string; + activity_id: string | null; + currency_code: string; + _nationality_type: string; + is_exclude_nationality: boolean; + _period_type: string; + season_id: string; + is_pickup_included: boolean; + is_drop_off_included: boolean; + is_private_transfer_price_included: boolean; + is_shared_transfer_price_included: boolean; + is_slot_wise_cancellation_policy: boolean; + is_guide_included: boolean; + guide_languages: string; + _rate_type: string; + _pricing_type: string; + _no_show_policy_type: string; + no_show_charge_value: number; + is_approved: boolean; + is_rejected: boolean; + reviewed_by: string; + reviewer_comments: string; + reviewer_user_type: string; + reviewed_on: string | null; + revision_nbr: number | null; + created_by: string | null; + created_on: string | null; + updated_by: string | null; + updated_on: string | null; + is_active: boolean; + is_deleted: boolean; +} + +export class ActivityDetails { + language_code: string; + option_name: string; + rate_inclusion: string; + contract_remark: string; +} +export class DateRange { + Start: string; + End: string; +} + +export class AgeRange { + from_count: number; + to_count: number; + sequence: number; + rate: number; +} + + +export class RateRange { + adultAgeRange: AgeRange[]; + youthAgeRange: AgeRange[]; + seniorAgeRange: AgeRange[]; + childAgeRange: AgeRange[]; + allocationDetails: AllocationDetails | null; +} + + +export class ActivityPaxRate { + date: string; + adult_rate: number; + senior_rate: number; + youth_rate: number; + child_rate: number; + allocationDetails: AllocationDetails | null; +} +export class Slots { + slotId: string; + is_private_transfer: boolean; + is_shared_transfer: boolean; + is_without_transfer: boolean; +} + +export class ActivityVehicleRate { + rate: number; + vehicle_supplier_id: number; + vehicle_id: number; + vehicle_max_occupancy: number; + allocationDetails: AllocationDetails | null; +} + +export class ActivityCancellationDetails { + from: number; + to: number; + CP_Type: string; + CP_Value: number; + cancellation_Type: string; +} + +export class AllocationDetails { + _allocation_type: string; + allocation_count: number; + booking_count: number; + vehicle_id: string; + remaining_count: number; + _release_type: string; + date: string; + release_days: number; +} \ No newline at end of file diff --git a/src/app/core/models/Experience-Service/experience-sevice-add/experience-service-add.model.ts b/src/app/core/models/Experience-Service/experience-sevice-add/experience-service-add.model.ts new file mode 100644 index 0000000..b398710 --- /dev/null +++ b/src/app/core/models/Experience-Service/experience-sevice-add/experience-service-add.model.ts @@ -0,0 +1,88 @@ + +export class experience_add { + activity_id: string; + org_id: string; + supplier_id: string; + activity_code: number; + category_id: string; + emergency_phone_code: string; + emergency_phone_nbr: string; + default_lang_code: string; + _service_language: string; + service_days: number; + service_hours: number; + service_minutes: number; + starting_city: string; + is_pickup_included: boolean; + _pickup_point_type: string; + _hotel_pickup_type: string; + pickup_hotel: string; + hotel_zone: string; + pickup_before_hour: number; + pickup_before_minute: number; + meeting_before_hour: number; + meeting_before_minute: number; + is_drop_included: boolean; + min_pax: number; + max_pax: number; + is_adult: boolean; + adult_age_from: number; + adult_age_to: number; + is_senior: boolean; + senior_age_from: number; + senior_age_to: number; + is_youth: boolean; + youth_age_from: number; + youth_age_to: number; + is_child: boolean; + child_age_from: number; + child_age_to: number; + max_child_count: number; + free_child_age_from: number; + free_child_age_to: number; + is_child_seat: boolean; + thumbnail_image: string; + activity_images: string; + activity_videos: string; + requirements: string; + revision_nbr: number; + created_by: string; + created_on: string | null; + updated_by: string | null; + updated_on: string | null; + is_active: boolean | null; + is_deleted: boolean | null; + category_name: string; + sub_category_id: string; + country_code: string; + city_id: string; + activityContents: ActivityContent[]; + activity_content_json: string; +} + +export class ActivityContent { + activity_content_id: string; + org_id: string; + activity_id: string; + supplier_id: string; + language_code: string; + activity_name: string; + departure_point: string; + meeting_point: string; + drop_point: string; + activity_highlight: string; + activity_description: string; + activity_restriction: string; + activities_details: string; + activity_inclusion: string; + activity_exclusion: string; + revision_nbr: number; + created_by: string; + created_on: string; + updated_by: string; + updated_on: string; + is_active: boolean; + is_deleted: boolean; + additional_pick_up_details: string; + daywise_itinerary: string; +} \ No newline at end of file diff --git a/src/app/core/models/Experience-Service/season-setting/season-setting-add.model.ts b/src/app/core/models/Experience-Service/season-setting/season-setting-add.model.ts new file mode 100644 index 0000000..e8adb3f --- /dev/null +++ b/src/app/core/models/Experience-Service/season-setting/season-setting-add.model.ts @@ -0,0 +1,23 @@ +export class ActivitySeasonDetails { + activitySeason: ActivitySeason; + seasondateRange: ActivitySeasonDateRange[]; +} + +export class ActivitySeasonDateRange { + fromDate: string; + toDate: string; +} + +export class ActivitySeason { + activity_season_id: string; + org_id: string; + activity_id: string; + supplier_id: string; + season_name: string; + created_by: string; + created_on: string; + updated_by: string; + updated_on: string; + is_active: boolean; + is_deleted: boolean; +} \ No newline at end of file diff --git a/src/app/core/models/Experience-Service/slot/add-slots-model.ts b/src/app/core/models/Experience-Service/slot/add-slots-model.ts new file mode 100644 index 0000000..5ed5814 --- /dev/null +++ b/src/app/core/models/Experience-Service/slot/add-slots-model.ts @@ -0,0 +1,24 @@ +export class ActivitySlot { + activity_slot_id: string; + org_id: string; + supplier_id: string; + activity_id: string; + start_time: string; + end_time: string; + cut_off_time: string | null; + timezone: string | null; + revision_nbr: number; + created_by: string | null; + created_on: string | null; + updated_by: string | null; + updated_on: string | null; + is_active: boolean | null; + is_deleted: boolean | null; +} +export class GetActivitySlot { + activity_id: string; + from_hour: string | null; + from_minute: string | null; + to_hour: string | null; + to_minute: string | null; +} \ No newline at end of file diff --git a/src/app/core/models/common-model/Sign-in.model.ts b/src/app/core/models/common-model/Sign-in.model.ts new file mode 100644 index 0000000..92c87cc --- /dev/null +++ b/src/app/core/models/common-model/Sign-in.model.ts @@ -0,0 +1,58 @@ +export class LoginModel { + EmailID: string + Password: string + domain: string + ProjectId: string + MachineId: string + Platform: string + Browser: string + City: string + CountryCode: string + Lat: number + Lon: number + Proxy: boolean + IP: string + time: string +} + +export class OTPModel { + oTP: string; + userId: string; + city: string; + ProjectId: string; + countryCode: string; + lat: number; + lon: number; + proxy: boolean; + iP: string; + platform: string | null; + browser: string | null; + macId: string | null; +} + +export class SSOModel { + emailID: string; + domain: string; +} + +export class dtoKey { + key: string; +} + +export class agency_data { + is_pay_at_agency: boolean; + time_zone: string; + b2c_agency_code: string; + utc: string; + pay_at_agency_disclaimer: string; + org_id: string; + b2c_agency_id: string; + project: string; + domain: string; + is_active: boolean; +} +export class SSOLoginModel { + isSSO: boolean + isLoggedIn: boolean + token: string +} \ No newline at end of file diff --git a/src/app/core/models/common-model/user-logout.model.ts b/src/app/core/models/common-model/user-logout.model.ts new file mode 100644 index 0000000..38cfad6 --- /dev/null +++ b/src/app/core/models/common-model/user-logout.model.ts @@ -0,0 +1,11 @@ +export class UserLog{ + user_id:string; + user_type:string; + IsMFAApplicable:boolean; + ip_city:string; + ip_country_code:string; + ip_lat:number; + ip_lon:number; + ip_proxy:boolean; + ip:string; +} \ No newline at end of file diff --git a/src/app/core/models/common-model/userModel.ts b/src/app/core/models/common-model/userModel.ts new file mode 100644 index 0000000..0c05908 --- /dev/null +++ b/src/app/core/models/common-model/userModel.ts @@ -0,0 +1,66 @@ +export class changeUserLoginPassword { + user_id: string; + org_id: string; + first_name: string; + middle_name: string; + last_name: string; + user_mobile_country_code: string; + user_mobile: string; + email: string; + password: string; + country: string; + city: string; + user_type: string; + affiliate_id: string; + affiliate_type: string; + user_profile: string; + user_role: string; + is_active: boolean; + created_by: string; + updated_by: string; + created_on: string; + updated_on: string; + time_zone: string; +} + +export class UserLoginData { + user_id: string; + org_id: number; + first_name: string; + middle_name: string; + last_name: string; + user_mobile_country_code: string; + user_mobile: string; + email: string; + password: string; + country: string; + city: string; + user_type: string; + user_profile: string; + user_role: string; + is_active: boolean; + created_on: Date; + created_by: string; + updated_on: Date; + updated_by: string; + affiliate_id: number; + markup_type: string; + is_mfa_applicable: boolean; + is_inactive_wrong_attempt: boolean; + is_cancel_pnr: boolean; + is_cancel_ticketed_pnr: boolean; + is_import_pnr_access: boolean; + is_allow_void_ticket: boolean; + last_log_on: Date; + is_password_expired: boolean; + is_login_expired: boolean; + role_id: number; + jwt_token_id: number; + refresh_token: string; + refresh_token_expire_at: Date; + change_default_password: boolean; + is_b2b_surcharge: boolean; + is_reserve_hotel_booking: boolean; + extranet_vendor_id: string; + timezone: string; +} diff --git a/src/app/core/models/flight-service/flight-contracts.model.ts b/src/app/core/models/flight-service/flight-contracts.model.ts new file mode 100644 index 0000000..97962ae --- /dev/null +++ b/src/app/core/models/flight-service/flight-contracts.model.ts @@ -0,0 +1,221 @@ + + +export class FlightContractDTO { + contract_id: string | null; + org_id: string | null; + supplier_id: string; + contract_name: string; + contract_description: string; + pnr: string; + is_instant_confirmation: boolean; + _trip_type: string; + no_of_legs: number; + from_airport: string; + to_airport: string; + is_economy: boolean; + is_premium_economy: boolean; + is_business: boolean; + is_first_class: boolean; + is_all_pax_type: boolean; + is_adult: boolean; + is_child: boolean; + is_infant: boolean; + currency_code: string; + validating_airline: string; + is_multi_day: boolean; + is_multi_day_range: boolean; + outbound_date: string; + return_date: string; + operation_from: string; + operation_to: string; + revision_nbr: number | null; + created_by: string | null; + created_on: string | null; + updated_by: string | null; + updated_on: string | null; + is_active: boolean | null; + is_deleted: boolean | null; + outbound_days: string | null; + outbound_dates: string | null; + flightDetail: FlightDetailDto[]; + flightRate: FlightsRateDto[]; +} +export class FlightsRateDto { + rate_id: string | null; + org_id: string | null; + supplier_id: string | null; + contract_id: string | null; + contract_date_unique_id: string | null; + outbound_date: string; + return_date: string; + rbd: string; + cabin_class: string; + adt_base_fare: number; + adt_tax: number; + chd_base_fare: number; + chd_tax: number; + inf_base_fare: number; + inf_tax: number; + seat_allocation: number; + seat_booked: number; + seat_remaining: number; + adt_check_bag: number; + chd_check_bag: number; + inf_check_bag: number; + _check_bag_unit: number; + adt_cabin_bag: number; + chd_cabin_bag: number; + inf_cabin_bag: number; + _cabin_bag_unit: number; + _fare_type: number; + adt_fare_rule: string; + chd_fare_rule: string; + inf_fare_rule: string; + is_meal_included: boolean; + meal_details: string; + inclusions: string; + pnr: string; + is_instant_confirmation: boolean; + is_stop_sale: boolean; + revision_nbr: number | null; + created_by: string | null; + created_on: string | null; + updated_by: string | null; + updated_on: string | null; + is_active: boolean | null; + is_deleted: boolean | null; +} +// +export class FlightContractReq { + FlightContract: FlightContracts; + FlightDetails: FlightDetailDto[]; + FlightRates: FlightRateArray[]; +} +export class FlightContracts { + contract_name: string; + contract_description: string; + trip_type: string; + origin: string; + destination: string; + no_of_legs: number; + currency_code: string; + contracted_cabin_class: string; + contracted_pax_type: string; + validating_airline: string; + is_multi_day: boolean; + is_oneway_sale_allowed: boolean; + multi_day_operation_type: string; + operation_from: string; // Assuming you'll handle date parsing separately + operation_to: string; // Assuming you'll handle date parsing separately + departure_date: string; // Assuming you'll handle date parsing separately + return_date: string; // Assuming you'll handle date parsing separately + departure_days: string; + departure_dates: string; + is_nearby_airports: boolean; + is_active: boolean; + nearby_from_airports: string; + nearby_to_airports: string; + is_instant_confirmation: boolean; +} + +export class FlightDetailDto { + flight_details_id: string | null; + org_id: string | null; + supplier_id: string | null; + contract_id: string | null; + airline_code: string; + flight_no: string; + aircraft_type_id: string; + from_airport: string; + to_airport: string; + departure_date: string; + departure_time: string; + is_next_day_departure: boolean; + departure_terminal: string; + is_next_day_arrival: boolean; + arrival_date: string; + arrival_time: string; + arrival_terminal: string; + flying_duration: string; + sector_nbr: number | null; + _sector_type: string; + leg_nbr: number; + seg_nbr: number; + contract_date_unique_id: string | null; + revision_nbr: number | null; + created_by: string | null; + created_on: string | null; + updated_by: string | null; + updated_on: string | null; + is_active: boolean | null; + is_deleted: boolean | null; +} +export class FlightRateArray { + rate_id: string; + org_id: string; + contract_id: string; + contract_date_unique_id: string; + departure_date: Date; + rbd: string; + fare_family_group_id: string; + fare_family_name: string; + cabin_class: string; + adt_base_fare: number; + adt_tax: number; + chd_base_fare: number; + chd_tax: number; + inf_base_fare: number; + inf_tax: number; + fare_type_applicability: string; + round_trip_discount_type: string; + is_apply_discount_with_same_vc_only: boolean; + adult_round_trip_discount: number; + child_round_trip_discount: number; + infant_round_trip_discount: number; + seat_allocation: number; + seat_booked: number; + seat_cancelled: number; + is_checked_bag_included: boolean; + adt_check_bag: string; + chd_check_bag: string; + inf_check_bag: string; + _check_bag_unit: string; + adt_cabin_bag: string; + chd_cabin_bag: string; + inf_cabin_bag: string; + _cabin_bag_unit: string; + refund_type: string; + adt_fare_rule: string; + chd_fare_rule: string; + inf_fare_rule: string; + is_meal_included: boolean; + meal_details: string; + inclusions: string; + pnr: string; + is_instant_confirmation: boolean; + is_stop_sale: boolean; + updated_by: string; +} +export class FlightDetailsSearchModel { + contract_name: string; + vendor_id: string; + validating_airline: string; + trip_type: string; + flight_no: string; + cabin_class: string; + origin: string; + destination: string; + departure_days: string; + date_type: string; + from_date: string; + to_date: string; + pnr: string; + currency_code: string; + refund_type: string; + rbd: string; + is_instant_confirmation: boolean; + is_multi_day: boolean; + is_oneway_sale_allowed: boolean; + airline_code: any; + confirmation_type: string; +} \ No newline at end of file diff --git a/src/app/core/models/flight-service/flight-service-manage/edit-Rate-inventry.model.ts b/src/app/core/models/flight-service/flight-service-manage/edit-Rate-inventry.model.ts new file mode 100644 index 0000000..88a401b --- /dev/null +++ b/src/app/core/models/flight-service/flight-service-manage/edit-Rate-inventry.model.ts @@ -0,0 +1,44 @@ +export class FlightRateobj { + _id: string; + _from_date: string; + _to_date: string; + days: string; + _rbd: string; +} + + + +export class UpdateFlightRate { + contract_id: string; + flight_rate: dtoFlightRate[]; +} + +export class dtoFlightRate { + rate_id: string; + outbound_date: string; + adt_base_fare: number; + adt_tax: number; + chd_base_fare: number; + chd_tax: number; + inf_base_fare: number; + inf_tax: number; + seat_allocation: number; + adt_check_bag: number; + chd_check_bag: number; + inf_check_bag: number; + _check_bag_unit: number; + adt_cabin_bag: number; + chd_cabin_bag: number; + inf_cabin_bag: number; + _cabin_bag_unit: number; + _fare_type: number; + adt_fare_rule: string; + chd_fare_rule: string; + inf_fare_rule: string; + is_meal_included: boolean; + meal_details: string; + inclusions: string; + pnr: string; + is_instant_confirmation: boolean; + is_stop_sale: boolean; +} \ No newline at end of file diff --git a/src/app/core/models/flight-service/flight-service-manage/edit-contract-details.model.ts b/src/app/core/models/flight-service/flight-service-manage/edit-contract-details.model.ts new file mode 100644 index 0000000..d0598bd --- /dev/null +++ b/src/app/core/models/flight-service/flight-service-manage/edit-contract-details.model.ts @@ -0,0 +1,13 @@ +export class ContractDetailDto { + contract_id: string; + contract_name: string; + contract_description: string; + is_premium_economy: boolean; + is_economy: boolean; + is_business: boolean; + is_first_class: boolean; + is_all_pax_type: boolean; + is_adult: boolean; + is_child: boolean; + is_infant: boolean; +} \ No newline at end of file diff --git a/src/app/core/models/flight-service/flight-service-manage/edit-flight-details.model.ts b/src/app/core/models/flight-service/flight-service-manage/edit-flight-details.model.ts new file mode 100644 index 0000000..25236ca --- /dev/null +++ b/src/app/core/models/flight-service/flight-service-manage/edit-flight-details.model.ts @@ -0,0 +1,24 @@ +export class UpdateFlightDetail { + contract_id: string; + departure_dates: string; + outbound_days: string; + flight_detail: FlightDetailobj[]; +} + +export class FlightDetailobj { + airline_code: string; + flight_no: string; + _aircraft_type: string; + from_airport: string; + to_airport: string; + departure_time: string; + is_next_day_departure: boolean; + departure_terminal: string; + is_next_day_arrival: boolean; + arrival_time: string; + arrival_terminal: string; + flying_duration: string; + sector_nbr: number | null; + _sector_type: string; + leg_nbr: number; +} \ No newline at end of file diff --git a/src/app/core/models/flight-service/flight-service-search/flight-service-search.model.ts b/src/app/core/models/flight-service/flight-service-search/flight-service-search.model.ts new file mode 100644 index 0000000..7ac6835 --- /dev/null +++ b/src/app/core/models/flight-service/flight-service-search/flight-service-search.model.ts @@ -0,0 +1,25 @@ +export class FlightContractSearhObj { + contract_name: string; + supplier_name: string; + _trip_type: string; + airline_code: string; + flight_no: string; + from_airport: string; + to_airport: string; + dep_from_date: string; + dep_to_date: string; + ret_from_date: string; + ret_to_date: string; + dep_days: string; + ret_days: string; + is_multi_day: boolean; + pnr: string; + rbd: string; + currency_code: string; + fare_type: number; + is_instant_confirmation: boolean; + is_economy: boolean; + is_premium_economy: boolean; + is_business: boolean; + is_first_class: boolean; +} \ No newline at end of file diff --git a/src/app/core/models/hotelService/AddRoom/Room.model.ts b/src/app/core/models/hotelService/AddRoom/Room.model.ts new file mode 100644 index 0000000..59066e0 --- /dev/null +++ b/src/app/core/models/hotelService/AddRoom/Room.model.ts @@ -0,0 +1,73 @@ + + +export class ContractRoom { + room_id: string; + org_id: string; + supplier_id: string; + room_category_name_code: number; + is_living_room: boolean; + living_room_count: number; + living_bed_count: number; + living_bed_type: number; + is_living_bed:boolean + is_bedroom: boolean; + bedroom_count: number; + bed_count: string; + is_bathroom: boolean; + bathroom_count: number; + is_bathtub: boolean; + is_jacuzzi: boolean; + room_size: number; + room_measure_unit: string; + room_images: string; + thumbnail_image: string; + display_room_name: string; + extra_bed_type: number; + hotel_id: string; + hotel_code: number; + room_view_code: number; + room_type_code: number; + room_code: number; + max_adult: number; + max_child: number; + min_total_occupancy: number; + max_total_occupancy: number; + min_adult_age: number; + min_child_age: number; + max_child_age: number; + is_extra_bed_supported: boolean; + max_extra_bed_count: number; + free_child_count: number; + free_child_age_from: number; + free_child_age_to: number; + is_group_rate: boolean; + is_paid_child_age_range: boolean; + room_amenity_codes: string; + revision_nbr: number; + is_deleted: boolean; + is_active: boolean; + created_by: string; + created_on: string; + updated_by: string | null; + updated_on: string | null; + contract_paid_child_age_range: ContractRoomPaidChildAgeRange[]; +} + + +export class ContractRoomPaidChildAgeRange { + contract_paid_child_age_range_id: string; + org_id: string; + supplier_id: string; + room_id: string; + from_age: number; + to_age: number; + sequence: number; + revision_nbr: number; + is_deleted: boolean; + is_active: boolean; + created_by: string; + created_on: string; + updated_by: string | null; + updated_on: string | null; + is_child_range: boolean; +} \ No newline at end of file diff --git a/src/app/core/models/hotelService/OverViewData/RoomsOverView.model.ts b/src/app/core/models/hotelService/OverViewData/RoomsOverView.model.ts new file mode 100644 index 0000000..b0dddae --- /dev/null +++ b/src/app/core/models/hotelService/OverViewData/RoomsOverView.model.ts @@ -0,0 +1,34 @@ +export class OverViewData { + Date: any[]; + RoomDetails : roomsOverViewData[]; +} +export class roomsOverViewData { + room_name: string; + room_id: string; + currency_code: string; + status: string[]; + allocation: AllocationDet[]; + allocation_id: any[]; + net_sold: any[]; + availability: any[]; + RoomContractDetails: ContractDetails[]; +} +export class AllocationDet{ + id:string; + value:any; +} +export class ContractDetails { + contract_name: string; + aria_collapse: boolean; + rate_plan: string; + meal_plan: string; + child_age_range_1: string; + child_age_range_2: string; + min_stay: string[]; + ChildDataRange1: ChildDetailsArr[]; + ChildDataRange2: ChildDetailsArr[]; + AdultData: ChildDetailsArr[]; +} +export class ChildDetailsArr { + value: string[]; +} \ No newline at end of file diff --git a/src/app/core/models/hotelService/Tab-Content/tab-4/Tab-4.model.ts b/src/app/core/models/hotelService/Tab-Content/tab-4/Tab-4.model.ts new file mode 100644 index 0000000..4792bc5 --- /dev/null +++ b/src/app/core/models/hotelService/Tab-Content/tab-4/Tab-4.model.ts @@ -0,0 +1,28 @@ + +export class ViewSeason { + season: ContractSeason; + seasondateRange: SeasonDateRange[]; +} + +export class SeasonDateRange { + + fromDate: string; + toDate: string; +} + + + +export class ContractSeason { + season_id: string; + org_id: string; + supplier_id: string; + hotel_id: string; + hotel_code: string; + season_name: string; + created_by: string; + created_on: string; + updated_by: string | null; + updated_on: string | null; + is_active: boolean; + is_deleted: boolean; +} \ No newline at end of file diff --git a/src/app/core/models/optional-ons/optional-ons.model.ts b/src/app/core/models/optional-ons/optional-ons.model.ts new file mode 100644 index 0000000..7dd25e7 --- /dev/null +++ b/src/app/core/models/optional-ons/optional-ons.model.ts @@ -0,0 +1,43 @@ + + +export class ActivityAddOn { + activity_add_on_id: string | null; + org_id: string | null; + supplier_id: string | null; + activity_id: string | null; + _rate_type: string | null; + currency_code: string | null; + per_service_rate: number; + revision_nbr: number | null; + created_by: string | null; + created_on: string | null; + updated_by: string | null; + updated_on: string | null; + is_active: boolean; + is_deleted: boolean; + adult_rate: number; + senior_rate: number; + youth_rate: number; + child_rate: number; + activityAddOnDetails: ActivityAddOnDetails[]; + activity_addon_details_json: string | null; +} + +export class ActivityAddOnDetails { + activity_add_on_details_id: string; + org_id: string; + supplier_id: string; + activity_id: string; + activity_add_on_id: string; + language_code: string; + add_on_name: string; + add_on_description: string; + add_on_image: string; + revision_nbr: number; + created_by: string; + created_on: string; + updated_by: string; + updated_on: string; + is_active: boolean; + is_deleted: boolean; +} \ No newline at end of file diff --git a/src/app/core/models/user-role-management/user-role.model.ts b/src/app/core/models/user-role-management/user-role.model.ts new file mode 100644 index 0000000..2d88b28 --- /dev/null +++ b/src/app/core/models/user-role-management/user-role.model.ts @@ -0,0 +1,61 @@ + +export class dtoRoleMaster_Root { + roleMaster: dtoRoleMaster; + roleAccessMapping: dtoRoleAccessMapping[]; + json_role_master: string; + json_role_access_mapping: string; +} + + +export class dtoRoleMaster { + role_id: string; + org_id: string; + role_name: string; + reporting_role_id: string; + role_description: string; + role_type: string; + affiliate_id: string; + extranet_vendor_id: string; + is_active: boolean | null; + created_on: string; + created_by: string; + updated_on: string; + updated_by: string; +} + + +export class dtoRoleAccessMapping { + role_access_id: string; + org_id: string; + role_id: string; + project_id: string; + menu_id: string; + permission: string; + is_active: boolean | null; + created_on: string; + created_by: string; + updated_on: string; + updated_by: string; +} + + +export class dtoRoleUserAccessUnmapping { + user_access_un_map_id: string; + org_id: string; + user_id: string; + role_id: string; + project_id: string; + menu_id: string; + permission: string; + is_active: boolean | null; + created_on: string | null; + created_by: string; + updated_on: string | null; + updated_by: string; +} + + +export class dtoRoleUserAccessUnMappingModel { + user_id: string; + user_access_unmapping_list: dtoRoleUserAccessUnmapping[]; +} \ No newline at end of file diff --git a/src/app/core/services/HotelServices/hotel_booking_management.service.ts b/src/app/core/services/HotelServices/hotel_booking_management.service.ts new file mode 100644 index 0000000..dc876c2 --- /dev/null +++ b/src/app/core/services/HotelServices/hotel_booking_management.service.ts @@ -0,0 +1,101 @@ +import { HttpClient } from "@angular/common/http"; +import { Injectable } from "@angular/core"; +import { environment } from "src/environments/environment"; + +@Injectable() +export class HotelBookingManagementService { + + private headers = { 'Content-Type': 'application/json; charset=utf-8' }; + + constructor(private http: HttpClient) { + if(sessionStorage.getItem('userId')){ + this.headers['LoggedInUser'] = sessionStorage.getItem('userId'); + } + } + + // listing page + getAllAgency() { + return this.http.get(environment.APIBaseUrl + '/AgencyDetail/GetAllAffiliates', { headers: this.headers }) + } + getAllCompany() { + return this.http.get(environment.APIBaseUrl + '/CompanyMaster/GetAllCompanyDetails', { headers: this.headers }) + } + getAllEntity() { + return this.http.get(environment.APIBaseUrl + '/EntityMaster/GetAllEntity', { headers: this.headers }) + } + getAllHotelSupplier() { + return this.http.get(environment.APIBaseUrl + '/HotelSupplier/GetAllHotelSupplier', { headers: this.headers }) + } + getAllHotelSupplierV2() { + return this.http.get(environment.APIBaseUrl + '/HotelSupplierV2/GetAllHotelSupplierV2s', { headers: this.headers }) + } + getAllHotelCountry() { + return this.http.get(environment.APIBaseUrl + '/hotel/CountryList/en', { headers: this.headers }) + } + getAllHotelCityByCountry(country_code) { + return this.http.get(environment.APIBaseUrl + '/hotel/CityList/' + country_code+ '/en', { headers: this.headers }) + } + getHotelBookingList(reqData) { + return this.http.post(environment.APIBaseUrl + '/HotelBooking/GetBookingList', reqData, { headers: this.headers }) + } + bookingQualityCheck(trip_tbl_id) { + return this.http.post(environment.APIBaseUrl + '/Booking/UpdateQualityCheck/' + trip_tbl_id, null, { headers: this.headers }) + } + + // View page + getAllCurrency() { + return this.http.get(environment.APIBaseUrl + '/CurrencyMaster/GetAllCurrencies', { headers: this.headers }) + } + getCustomerDetails(trip_id) { + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/GetCustomerDetails/${trip_id}`, { headers: this.headers }) + } + GetItenaryDetails(trip_id) { + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/GetItenaryDetails/${trip_id}`, { headers: this.headers }) + } + getPassengerDetails(trip_id) { + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/GetPassengerDetails/${trip_id}`, { headers: this.headers }) + } + getCostingDetails(trip_id) { + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/GetCostingDetails/${trip_id}`, { headers: this.headers }) + } + getPaymentDetails(trip_id) { + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/GetPaymentDetails/${trip_id}`, { headers: this.headers }) + } + getDocumentDetails(trip_id) { + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/GetDocumentDetails/${trip_id}`, { headers: this.headers }) + } + getNotesDetail(trip_id) { + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/GetNotesDetail/${trip_id}`, { headers: this.headers }) + } + getHotelBookingDetail(booking_id) { + const org_id = sessionStorage.getItem('org_id'); + return this.http.get(`${environment.hotelApiBaseUrl}/hotel/BookingDetails?org_id=${org_id}&booking_id=${booking_id}`, { headers: this.headers }) + } + saveConfirmationNumber(reqData) { + return this.http.post(`${environment.APIBaseUrl}/HotelBooking/SaveConfirmationNumber`, reqData, { headers: this.headers }) + } + saveNotesDetail(reqData){ + return this.http.post(`${environment.APIBaseUrl}/HotelBooking/SaveNotesDetail`, reqData, { headers: this.headers }) + } + printInvoiceDocument(document_number){ + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/SendInvoiceEmail/${document_number}`, { headers: this.headers }) + } + sendInvoiceDocumentMail(document_number, email_id){ + return this.http.get(`${environment.APIBaseUrl}/HotelBooking/SendInvoiceEmail/${document_number}/${email_id}`, { headers: this.headers }) + } + sendItineraryDocumentMail(reqData){ + return this.http.post(`${environment.APIBaseUrl}/HotelBooking/SendItineraryEmail`, reqData, { headers: this.headers }) + } + sendVoucherDocumentMail(reqData){ + return this.http.post(`${environment.APIBaseUrl}/HotelBooking/SendVoucherEmail`, reqData, { headers: this.headers }) + } + UpdateBooking(reqData){ + return this.http.post(`${environment.APIBaseUrl}/HotelBooking/UpdateBooking`, reqData, { headers: this.headers }) + }; + GethotelCityName(reqData){ + return this.http.post(`${environment.hotelApiBaseUrl}/hotel/hotelcitylist`, reqData, { headers: this.headers }) + }; + GetCancelBooking(reqData){ + return this.http.post(`${environment.hotelApiBaseUrl}/hotel/cancelfee`, reqData, { headers: this.headers }) + }; +} diff --git a/src/app/core/services/HotelServices/manage-hotel.service.ts b/src/app/core/services/HotelServices/manage-hotel.service.ts new file mode 100644 index 0000000..807d9aa --- /dev/null +++ b/src/app/core/services/HotelServices/manage-hotel.service.ts @@ -0,0 +1,11 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class ManageHotelService { + + Extranet_Hotel_Id; + Active_tab = 'OverView'; + constructor() { } +} diff --git a/src/app/core/services/PagesService/hotelService/AddRoomService/Add-Room.service.ts b/src/app/core/services/PagesService/hotelService/AddRoomService/Add-Room.service.ts new file mode 100644 index 0000000..cdac817 --- /dev/null +++ b/src/app/core/services/PagesService/hotelService/AddRoomService/Add-Room.service.ts @@ -0,0 +1,54 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { ContractRoom } from 'src/app/core/models/hotelService/AddRoom/Room.model'; +import { environment } from 'src/environments/environment'; +// import { CommonFunctions } from 'src/app/core/common/common-functions'; +// import { environment } from 'src/environments/environment'; + + + + +@Injectable({ + providedIn: 'root' +}) + +export class AddRoomService { + SaveRoom(dataPost: ContractRoom) { + throw new Error('Method not implemented.'); + } + constructor(private http: HttpClient) { } + getAllRoomCategory() { + return this.http.get(environment.APIBaseUrl + "/RoomCategoryName/GetAllRoomCategory") + }; + GetAllHotelAmenity() { + return this.http.get(environment.APIBaseUrl + "/HotelAmenity/GetAllHotelAmenity") + }; + GetAllRoomViewName() { + return this.http.get(environment.APIBaseUrl + "/RoomViewName/GetAllRoomViewName") + }; + GetAllRoomBedType() { + return this.http.get(environment.APIBaseUrl + "/BedTypeMaster/GetAllBedType") + }; + SaveRoomContract(roomDetails) { + return this.http.post(environment.APIBaseUrl + "/RoomContract/SaveContractRoom", roomDetails) + }; + UpdateRoomContract(roomDetails) { + return this.http.post(environment.APIBaseUrl + "/RoomContract/UpdateContractRoom", roomDetails) + }; + saveImage(file) { + return this.http.post(environment.APIBaseUrl + "/FileUpload/SaveFile", file) + }; + getlovtype() { + let formdata = { + "lov_types": [{ "lov_type": "MeasureUnit" }], + "lov_lang": "en" + } + return this.http.post(environment.APIBaseUrl + "/LovMaster/GetLov", formdata) + }; + GetRoomContractById(Id) { + return this.http.get(environment.APIBaseUrl + "/RoomContract/GetContractRoom/" + Id) + }; + + + +} \ No newline at end of file diff --git a/src/app/core/services/PagesService/hotelService/tab-content/tab-3/RoomContract.service.ts b/src/app/core/services/PagesService/hotelService/tab-content/tab-3/RoomContract.service.ts new file mode 100644 index 0000000..2866e16 --- /dev/null +++ b/src/app/core/services/PagesService/hotelService/tab-content/tab-3/RoomContract.service.ts @@ -0,0 +1,25 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { environment } from 'src/environments/environment'; +// import { CommonFunctions } from 'src/app/core/common/common-functions'; +// import { environment } from 'src/environments/environment'; + + + + +@Injectable({ + providedIn: 'root' +}) + +export class RoomContractService { + constructor(private http: HttpClient) { } + + GetAllRoomContract() { + return this.http.get(environment.APIBaseUrl + "/RoomContract/GetAllContractRoom") + }; + + UpdateStatus(form) { + return this.http.post(environment.APIBaseUrl + "/RoomContract/UpdateStatus", form) + }; + +} \ No newline at end of file diff --git a/src/app/core/services/PagesService/hotelService/tab-content/tab-4/tab-4.service.ts b/src/app/core/services/PagesService/hotelService/tab-content/tab-4/tab-4.service.ts new file mode 100644 index 0000000..96a862e --- /dev/null +++ b/src/app/core/services/PagesService/hotelService/tab-content/tab-4/tab-4.service.ts @@ -0,0 +1,32 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { environment } from 'src/environments/environment'; +// import { CommonFunctions } from 'src/app/core/common/common-functions'; +// import { environment } from 'src/environments/environment'; + + + + +@Injectable({ + providedIn: 'root' +}) + +export class SeasonSettingService { + constructor(private http: HttpClient) { } + GetAllSeason() { + return this.http.get(environment.APIBaseUrl + "/SeasonContract/GetAllSeason") + }; + UpdateStatus(formData) { + return this.http.post(environment.APIBaseUrl + "/SeasonContract/UpdateSeasonStatus", formData) + }; + SaveSeason(formData) { + return this.http.post(environment.APIBaseUrl + "/SeasonContract/SaveSeason", formData) + }; + UpdateSeason(formData) { + return this.http.post(environment.APIBaseUrl + "/SeasonContract/UpdateSeason", formData) + }; + GetContractSeasonById(id) { + return this.http.get(environment.APIBaseUrl + "/SeasonContract/GetContractSeasonById/"+ id) + }; + +} \ No newline at end of file diff --git a/src/app/core/services/active-sidebar.service.ts b/src/app/core/services/active-sidebar.service.ts new file mode 100644 index 0000000..6f27d9f --- /dev/null +++ b/src/app/core/services/active-sidebar.service.ts @@ -0,0 +1,46 @@ +import { BreakpointObserver, Breakpoints } from "@angular/cdk/layout"; +import { Injectable } from "@angular/core"; +import { Subject, takeUntil } from "rxjs"; + +@Injectable({ + providedIn: "root", +}) +export class ActiveSidebarService { + activeSide = "IsActive"; + MobileShow = true; + destroyed = new Subject(); + isTouchEvent!: boolean; + constructor( + breakpointObserver: BreakpointObserver, + ) { + breakpointObserver.observe([Breakpoints.XSmall, Breakpoints.Small]) + .pipe(takeUntil(this.destroyed)) + .subscribe((result) => { + if ( + result.breakpoints["(max-width: 599.98px)"] || + result.breakpoints["(min-width: 600px) and (max-width: 959.98px)"] + ) { + this.MobileShow = true; + } else { + this.MobileShow = false; + } + }); + } + SideBar(ele: string) { + // if (this.MobileShow) { + if (this.activeSide == ele) { + this.activeSide = ""; + //a.type == 'mouseenter' ? this.activeSide = "" : this.activeSide = "IsActive"; + } else { + this.activeSide = "IsActive"; + //a.type == 'mouseenter' ? this.activeSide = "IsActive" : this.activeSide = ""; + // } + } + } + //ActiveSideBar(ele) { + // this.activeSide = ""; + //} + //DisActiveSideBar(ele) { + // this.activeSide = "IsActive"; + //} +} diff --git a/src/app/core/services/api.service.ts b/src/app/core/services/api.service.ts new file mode 100644 index 0000000..ad12dcb --- /dev/null +++ b/src/app/core/services/api.service.ts @@ -0,0 +1,123 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { environment } from 'src/environments/environment'; + +@Injectable({ + providedIn: 'root' +}) + +export class API { + constructor(private http: HttpClient) { + } + private headers = { + 'Content-Type': 'application/json; charset=utf-8', + // 'LoggedInUser': sessionStorage.getItem('userId') + }; + // Extranet API Base Url + Post(url, obj) { + return this.http.post(environment.ExtranetAPIBaseUrl + url, obj, + { headers: this.headers } + ); + } + + Put(url, obj) { + return this.http.put(environment.ExtranetAPIBaseUrl + url, obj, + { headers: this.headers } + ); + } + + Delete(url) { + return this.http.delete(environment.ExtranetAPIBaseUrl + url, + { headers: this.headers } + ); + } + + Get(url) { + return this.http.get(environment.ExtranetAPIBaseUrl + url, + { headers: this.headers } + ); + } + // Admin API Base Url + AdminPost(url, obj) { + return this.http.post(environment.APIBaseUrl + url, obj, + { headers: this.headers } + ); + } + + AdminPut(url, obj) { + return this.http.put(environment.APIBaseUrl + url, obj, + { headers: this.headers } + ); + } + + AdminDelete(url) { + return this.http.delete(environment.APIBaseUrl + url, + { headers: this.headers } + ); + } + + AdminGet(url) { + return this.http.get(environment.APIBaseUrl + url, + { headers: this.headers } + ); + } + // admin api go + AdminGoPost(url, obj) { + return this.http.post(environment.AdminAPIGOBaseUrl + url, obj, + { headers: this.headers } + ); + } + + AdminGOPut(url, obj) { + return this.http.put(environment.AdminAPIGOBaseUrl + url, obj, + { headers: this.headers } + ); + } + + AdminGODelete(url) { + return this.http.delete(environment.AdminAPIGOBaseUrl + url, + { headers: this.headers } + ); + } + + AdminGOGet(url) { + return this.http.get(environment.AdminAPIGOBaseUrl + url, + { headers: this.headers } + ); + } + // + PostFile(url, obj) { + return this.http.post(environment.APIBaseUrl + url, obj,); + } + + PostFileExtranet(url, obj){ + return this.http.post(environment.ExtranetAPIBaseUrl + url, obj,); + } + + //Admin API GO + PostGo(url, obj, customHeaders = null) { + let postHeaders = JSON.parse(JSON.stringify(this.headers)) + if (customHeaders != null) { + postHeaders = { ...postHeaders, ...customHeaders } + } + return this.http.post(environment.APIBaseGoUrl + url, obj, + { headers: postHeaders } + ); + } + + GetGo(url) { + return this.http.get(environment.APIBaseGoUrl + url, + { headers: this.headers } + ); + } + + PostFileGo(url, obj) { + return this.http.post(environment.APIBaseGoUrl + url, obj,); + } + getAdjustedLocalTime(): number { + const calculatedTime = sessionStorage.getItem('UGT') || '0'; + const localTime = new Date().getTime(); + return localTime + parseInt(calculatedTime); + } +} + diff --git a/src/app/core/services/breakpoints.services.ts b/src/app/core/services/breakpoints.services.ts new file mode 100644 index 0000000..b52763d --- /dev/null +++ b/src/app/core/services/breakpoints.services.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@angular/core'; +import { BehaviorSubject, Subject, takeUntil } from 'rxjs'; +import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout'; + +@Injectable({ + providedIn: 'root', +}) +export class BreakpointsService { + public IsMobile = new BehaviorSubject(false); + destroyed = new Subject(); + ngOnDestroy() { + this.destroyed.next(); + this.destroyed.complete(); + } + constructor(private breakpointObserver: BreakpointObserver) { + this.checkTest(); + } + + checkTest() { + this.breakpointObserver + .observe([Breakpoints.XSmall, Breakpoints.Small]) + .pipe(takeUntil(this.destroyed)) + .subscribe((result) => { + if ( + result.breakpoints['(max-width: 599.98px)'] || + result.breakpoints['(min-width: 600px) and (max-width: 959.98px)'] + ) { + this.IsMobile.next(true); + } else { + this.IsMobile.next(false); + } + }); + } + + checkMob() { + return this.IsMobile.getValue(); + } +} diff --git a/src/app/core/services/common.service.ts b/src/app/core/services/common.service.ts new file mode 100644 index 0000000..6af6201 --- /dev/null +++ b/src/app/core/services/common.service.ts @@ -0,0 +1,58 @@ +import { Injectable } from "@angular/core"; +import * as CryptoJS from 'crypto-js'; + +export class CommonService{ + static yek = "$uPer@dm1n~dI@z7"; + + private static encryptText(plainText) { + var key = CryptoJS.enc.Utf8.parse(this.yek); + var iv = CryptoJS.enc.Utf8.parse(this.yek); + + var encryptedText = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(plainText), key, + { + keySize: 128 / 8, + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }).toString(); + return encryptedText; + } + + public static decryptText(cipherText) { + var key = CryptoJS.enc.Utf8.parse(this.yek); + var iv = CryptoJS.enc.Utf8.parse(this.yek); + + var decryptedText = CryptoJS.AES.decrypt(cipherText, key, + { + keySize: 128 / 8, + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }).toString(CryptoJS.enc.Utf8); + return decryptedText; + } + public static setSessionStorage(key: string, value) { + sessionStorage.setItem(key, this.encryptText(value)); + } + + public static getSessionStoage(key: string) { + var value = sessionStorage.getItem(key); + if (value) { + return this.decryptText(value); + } else return null; + } + public static resetLocalStoage(key: string) { + localStorage.removeItem(key); + } + public static setLocalStoage(key: string, value) { + value = JSON.stringify(value); + localStorage.setItem(key, this.encryptText(value)); + } + + public static getLocalStoage(key: string) { + var value = localStorage.getItem(key); + if (value) { + return JSON.parse(this.decryptText(value)); + } + } +} \ No newline at end of file diff --git a/src/app/core/services/event-utils.ts b/src/app/core/services/event-utils.ts new file mode 100644 index 0000000..024b115 --- /dev/null +++ b/src/app/core/services/event-utils.ts @@ -0,0 +1,27 @@ + +let eventGuid = 0; +const TODAY_STR = new Date().toISOString().replace(/T.*$/, ''); // YYYY-MM-DD of today + +export const INITIAL_EVENTS = [ + { + id: createEventId(), + title: 'All-day event', + start: TODAY_STR + }, + { + id: createEventId(), + title: 'Timed event', + start: TODAY_STR + 'T00:00:00', + end: TODAY_STR + 'T03:00:00' + }, + { + id: createEventId(), + title: 'Timed event', + start: TODAY_STR + 'T12:00:00', + end: TODAY_STR + 'T15:00:00' + } +]; + +export function createEventId() { + return String(eventGuid++); +} diff --git a/src/app/core/services/events.calender.service.ts b/src/app/core/services/events.calender.service.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/app/core/services/flight-contract.service.ts/flight-contract.service.ts b/src/app/core/services/flight-contract.service.ts/flight-contract.service.ts new file mode 100644 index 0000000..55a9fbb --- /dev/null +++ b/src/app/core/services/flight-contract.service.ts/flight-contract.service.ts @@ -0,0 +1,133 @@ +import { MessageService } from "primeng/api"; +import { Injectable } from "@angular/core"; +import { Title } from "@angular/platform-browser"; +import * as moment from "moment"; +import { FileUpload } from "primeng/fileupload"; +import jsPDF from "jspdf"; +import * as FileSaver from "file-saver"; +import autoTable from 'jspdf-autotable'; +import { API } from "../api.service"; +import { ValidationService } from "../../common/validation.service"; + +@Injectable() +export class FlightContractService { + constructor( + public ApiServ: API, + public validationService: ValidationService, + public titleService: Title + ) { + } + + + ddLoader = { + AirLine: false, + Currency: false, + origin: false, + destination: false, + ToAirport: false, + FormAirport: false, + AirCraft: false, + } + timer; + AirlineList = []; + AirportList = []; + AllAirCraftList = []; + getAirLineBySearch(val) { + if (val.length >= 2) { + this.ddLoader.AirLine = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + let request = { + "langcode": "en", + "query": val + } + this.ApiServ.AdminGoPost(`/MasterSearch/GetAllAirLine`, request).subscribe(res => { + if (res) { + this.AirlineList = res?.Result; + this.ddLoader.AirLine = false; + } + }); + }, 500); + }; + if (!val) { + this.AirlineList = []; + } + }; + + GetAirportList(val, name) { + if (val.length >= 2) { + this.ddLoader[name] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.ApiServ.AdminGOGet(`/Airport/GetList/en/` + val).subscribe(res => { + if (res) { + this.AirportList = res; + this.ddLoader[name] = false; + } + }); + }, 500); + }; + if (!val) { + this.AirlineList = []; + } + }; + getAircraftList(val) { + let repObj = { + aircraft_name: val + }; + if (val.length >= 3) { + this.ddLoader.AirCraft = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.ApiServ.Post(`/MasterSearch/GetAllAircraftType`, repObj).subscribe(res => { + if (res) { + this.AllAirCraftList = res.data; + this.ddLoader.AirCraft = false; + } + }); + }, 500); + } + }; + GetAirportsByAirportCode(data) { + let obj = { + airport_code: data + } + this.ApiServ.AdminGoPost('/Airport/GetAirportsByAirportCode', obj).subscribe(res => { + if (res) { + if (res.Result && res.Result.length > 0) { + this.AirportList = res.Result; + this.AirportList = this.AirportList.map(e => ({ 'ac': e.airport_code, 'ct': e.city_name })); + } + setTimeout(() => { + this.AirportList = []; + }, 500); + } + }); + }; + GetAirlineByAirlineCode(data) { + let obj = { + airline_code: data + } + this.ApiServ.AdminGoPost('/MasterSearch/GetAirlineByAirlineCode', obj).subscribe(res => { + if (res) { + this.AirlineList = res.Result; + setTimeout(() => { + this.AirlineList = []; + }, 500); + } + }); + }; + GetAircraftTypeById(data) { + let obj = { + aircraft_type_id: data + } + this.ApiServ.Post('/MasterSearch/GetAircraftTypeById', obj).subscribe(res => { + if (res) { + this.AllAirCraftList = res.data; + setTimeout(() => { + this.AllAirCraftList = []; + }, 500); + } + }); + }; +} \ No newline at end of file diff --git a/src/app/core/services/node.service.ts b/src/app/core/services/node.service.ts new file mode 100644 index 0000000..9d59bbc --- /dev/null +++ b/src/app/core/services/node.service.ts @@ -0,0 +1,21 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; + +import { TreeNode } from 'primeng/api'; + +@Injectable() +export class NodeService { + constructor(private http: HttpClient) { } + + getFiles() { + return this.http.get('assets/files.json') + .toPromise() + .then(res => res.data); + } + + getLazyFiles() { + return this.http.get('assets/files-lazy.json') + .toPromise() + .then(res => res.data); + } +} \ No newline at end of file diff --git a/src/app/core/services/nodeservice.ts b/src/app/core/services/nodeservice.ts new file mode 100644 index 0000000..1a4211c --- /dev/null +++ b/src/app/core/services/nodeservice.ts @@ -0,0 +1,787 @@ +import { Injectable } from '@angular/core'; + +@Injectable() +export class NodeService { + [x: string]: any; + getTreeNodesData() { + return [ + { + key: '0', + label: 'Documents', + data: 'Documents Folder', + icon: 'pi pi-fw pi-inbox', + children: [ + { + key: '0-0', + label: 'Work', + data: 'Work Folder', + icon: 'pi pi-fw pi-cog', + children: [ + { key: '0-0-0', label: 'Expenses.doc', icon: 'pi pi-fw pi-file', data: 'Expenses Document' }, + { key: '0-0-1', label: 'Resume.doc', icon: 'pi pi-fw pi-file', data: 'Resume Document' } + ] + }, + { + key: '0-1', + label: 'Home', + data: 'Home Folder', + icon: 'pi pi-fw pi-home', + children: [{ key: '0-1-0', label: 'Invoices.txt', icon: 'pi pi-fw pi-file', data: 'Invoices for this month' }] + } + ] + }, + { + key: '1', + label: 'Events', + data: 'Events Folder', + icon: 'pi pi-fw pi-calendar', + children: [ + { key: '1-0', label: 'Meeting', icon: 'pi pi-fw pi-calendar-plus', data: 'Meeting' }, + { key: '1-1', label: 'Product Launch', icon: 'pi pi-fw pi-calendar-plus', data: 'Product Launch' }, + { key: '1-2', label: 'Report Review', icon: 'pi pi-fw pi-calendar-plus', data: 'Report Review' } + ] + }, + { + key: '2', + label: 'Movies', + data: 'Movies Folder', + icon: 'pi pi-fw pi-star-fill', + children: [ + { + key: '2-0', + icon: 'pi pi-fw pi-star-fill', + label: 'Al Pacino', + data: 'Pacino Movies', + children: [ + { key: '2-0-0', label: 'Scarface', icon: 'pi pi-fw pi-video', data: 'Scarface Movie' }, + { key: '2-0-1', label: 'Serpico', icon: 'pi pi-fw pi-video', data: 'Serpico Movie' } + ] + }, + { + key: '2-1', + label: 'Robert De Niro', + icon: 'pi pi-fw pi-star-fill', + data: 'De Niro Movies', + children: [ + { key: '2-1-0', label: 'Goodfellas', icon: 'pi pi-fw pi-video', data: 'Goodfellas Movie' }, + { key: '2-1-1', label: 'Untouchables', icon: 'pi pi-fw pi-video', data: 'Untouchables Movie' } + ] + } + ] + } + ]; + } + + getTreeTableNodesData() { + return [ + { + key: '0', + data: { + name: 'Applications', + view: '100kb', + add: 'Folder' + }, + children: [ + { + key: '0-0', + data: { + name: 'React', + view: '25kb', + add: 'Folder' + }, + children: [ + { + key: '0-0-0', + data: { + name: 'react.app', + view: '10kb', + add: 'Application' + } + }, + { + key: '0-0-1', + data: { + name: 'native.app', + view: '10kb', + add: 'Application' + } + }, + { + key: '0-0-2', + data: { + name: 'mobile.app', + view: '5kb', + add: 'Application' + } + } + ] + }, + { + key: '0-1', + data: { + name: 'editor.app', + view: '25kb', + add: 'Application' + } + }, + { + key: '0-2', + data: { + name: 'settings.app', + view: '50kb', + add: 'Application' + } + } + ] + }, + { + key: '1', + data: { + name: 'Cloud', + view: '20kb', + add: 'Folder' + }, + children: [ + { + key: '1-0', + data: { + name: 'backup-1.zip', + view: '10kb', + add: 'Zip' + } + }, + { + key: '1-1', + data: { + name: 'backup-2.zip', + view: '10kb', + add: 'Zip' + } + } + ] + }, + { + key: '2', + data: { + name: 'Desktop', + view: '150kb', + add: 'Folder' + }, + children: [ + { + key: '2-0', + data: { + name: 'note-meeting.txt', + view: '50kb', + add: 'Text' + } + }, + { + key: '2-1', + data: { + name: 'note-todo.txt', + view: '100kb', + add: 'Text' + } + } + ] + }, + { + key: '3', + data: { + name: 'Documents', + view: '75kb', + add: 'Folder' + }, + children: [ + { + key: '3-0', + data: { + name: 'Work', + view: '55kb', + add: 'Folder' + }, + children: [ + { + key: '3-0-0', + data: { + name: 'Expenses.doc', + view: '30kb', + add: 'Document' + } + }, + { + key: '3-0-1', + data: { + name: 'Resume.doc', + view: '25kb', + add: 'Resume' + } + } + ] + }, + { + key: '3-1', + data: { + name: 'Home', + view: '20kb', + add: 'Folder' + }, + children: [ + { + key: '3-1-0', + data: { + name: 'Invoices', + view: '20kb', + add: 'Text' + } + } + ] + } + ] + }, + { + key: '4', + data: { + name: 'Downloads', + view: '25kb', + add: 'Folder' + }, + children: [ + { + key: '4-0', + data: { + name: 'Spanish', + view: '10kb', + add: 'Folder' + }, + children: [ + { + key: '4-0-0', + data: { + name: 'tutorial-a1.txt', + view: '5kb', + add: 'Text' + } + }, + { + key: '4-0-1', + data: { + name: 'tutorial-a2.txt', + view: '5kb', + add: 'Text' + } + } + ] + }, + { + key: '4-1', + data: { + name: 'Travel', + view: '15kb', + add: 'Text' + }, + children: [ + { + key: '4-1-0', + data: { + name: 'Hotel.pdf', + view: '10kb', + add: 'PDF' + } + }, + { + key: '4-1-1', + data: { + name: 'Flight.pdf', + view: '5kb', + add: 'PDF' + } + } + ] + } + ] + }, + { + key: '5', + data: { + name: 'Main', + view: '50kb', + add: 'Folder' + }, + children: [ + { + key: '5-0', + data: { + name: 'bin', + view: '50kb', + add: 'Link' + } + }, + { + key: '5-1', + data: { + name: 'etc', + view: '100kb', + add: 'Link' + } + }, + { + key: '5-2', + data: { + name: 'var', + view: '100kb', + add: 'Link' + } + } + ] + }, + { + key: '6', + data: { + name: 'Other', + view: '5kb', + add: 'Folder' + }, + children: [ + { + key: '6-0', + data: { + name: 'todo.txt', + view: '3kb', + add: 'Text' + } + }, + { + key: '6-1', + data: { + name: 'logo.png', + view: '2kb', + add: 'Picture' + } + } + ] + }, + { + key: '7', + data: { + name: 'Pictures', + view: '150kb', + add: 'Folder' + }, + children: [ + { + key: '7-0', + data: { + name: 'barcelona.jpg', + view: '90kb', + add: 'Picture' + } + }, + { + key: '7-1', + data: { + name: 'primeng.png', + view: '30kb', + add: 'Picture' + } + }, + { + key: '7-2', + data: { + name: 'prime.jpg', + view: '30kb', + add: 'Picture' + } + } + ] + }, + { + key: '8', + data: { + name: 'Videos', + view: '1500kb', + add: 'Folder' + }, + children: [ + { + key: '8-0', + data: { + name: 'primefaces.mkv', + view: '1000kb', + add: 'Video' + } + }, + { + key: '8-1', + data: { + name: 'intro.avi', + view: '500kb', + add: 'Video' + } + } + ] + } + ]; + } + + getLazyNodesData() { + return [ + { + "label": "Lazy Node 0", + "data": "Node 0", + "expandedIcon": "pi pi-folder-open", + "collapsedIcon": "pi pi-folder", + "leaf": false + }, + { + "label": "Lazy Node 1", + "data": "Node 1", + "expandedIcon": "pi pi-folder-open", + "collapsedIcon": "pi pi-folder", + "leaf": false + }, + { + "label": "Lazy Node 1", + "data": "Node 2", + "expandedIcon": "pi pi-folder-open", + "collapsedIcon": "pi pi-folder", + "leaf": false + } + ] + } + + getFileSystemNodesData() { + return [ + { + "data":{ + "name":"Applications", + "view":"200mb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"Angular", + "view":"25mb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"angular.app", + "view":"10mb", + "add":"Application" + } + }, + { + "data":{ + "name":"cli.app", + "view":"10mb", + "add":"Application" + } + }, + { + "data":{ + "name":"mobile.app", + "view":"5mb", + "add":"Application" + } + } + ] + }, + { + "data":{ + "name":"editor.app", + "view":"25mb", + "add":"Application" + } + }, + { + "data":{ + "name":"settings.app", + "view":"50mb", + "add":"Application" + } + } + ] + }, + { + "data":{ + "name":"Cloud", + "view":"20mb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"backup-1.zip", + "view":"10mb", + "add":"Zip" + } + }, + { + "data":{ + "name":"backup-2.zip", + "view":"10mb", + "add":"Zip" + } + } + ] + }, + { + "data": { + "name":"Desktop", + "view":"150kb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"note-meeting.txt", + "view":"50kb", + "add":"Text" + } + }, + { + "data":{ + "name":"note-todo.txt", + "view":"100kb", + "add":"Text" + } + } + ] + }, + { + "data":{ + "name":"Documents", + "view":"75kb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"Work", + "view":"55kb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"Expenses.doc", + "view":"30kb", + "add":"Document" + } + }, + { + "data":{ + "name":"Resume.doc", + "view":"25kb", + "add":"Resume" + } + } + ] + }, + { + "data":{ + "name":"Home", + "view":"20kb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"Invoices", + "view":"20kb", + "add":"Text" + } + } + ] + } + ] + }, + { + "data": { + "name":"Downloads", + "view":"25mb", + "add":"Folder" + }, + "children":[ + { + "data": { + "name":"Spanish", + "view":"10mb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"tutorial-a1.txt", + "view":"5mb", + "add":"Text" + } + }, + { + "data":{ + "name":"tutorial-a2.txt", + "view":"5mb", + "add":"Text" + } + } + ] + }, + { + "data":{ + "name":"Travel", + "view":"15mb", + "add":"Text" + }, + "children":[ + { + "data":{ + "name":"Hotel.pdf", + "view":"10mb", + "add":"PDF" + } + }, + { + "data":{ + "name":"Flight.pdf", + "view":"5mb", + "add":"PDF" + } + } + ] + } + ] + }, + { + "data": { + "name":"Main", + "view":"50mb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"bin", + "view":"50kb", + "add":"Link" + } + }, + { + "data":{ + "name":"etc", + "view":"100kb", + "add":"Link" + } + }, + { + "data":{ + "name":"var", + "view":"100kb", + "add":"Link" + } + } + ] + }, + { + "data":{ + "name":"Other", + "view":"5mb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"todo.txt", + "view":"3mb", + "add":"Text" + } + }, + { + "data":{ + "name":"logo.png", + "view":"2mb", + "add":"Picture" + } + } + ] + }, + { + "data":{ + "name":"Pictures", + "view":"150kb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"barcelona.jpg", + "view":"90kb", + "add":"Picture" + } + }, + { + "data":{ + "name":"primeng.png", + "view":"30kb", + "add":"Picture" + } + }, + { + "data":{ + "name":"prime.jpg", + "view":"30kb", + "add":"Picture" + } + } + ] + }, + { + "data":{ + "name":"Videos", + "view":"1500mb", + "add":"Folder" + }, + "children":[ + { + "data":{ + "name":"primefaces.mkv", + "view":"1000mb", + "add":"Video" + } + }, + { + "data":{ + "name":"intro.avi", + "view":"500mb", + "add":"Video" + } + } + ] + } + ] + } + + getTreeTableNodes() { + return Promise.resolve(this.getTreeTableNodesData()); + } + + getTreeNodes() { + return Promise.resolve(this.getTreeNodesData()); + } + + getFiles() { + return Promise.resolve(this.getTreeNodesData()); + } + + getLazyFiles() { + return Promise.resolve(this.getLazyNodesData()); + } + + getFilesystem() { + return Promise.resolve(this.getFileSystemNodesData()); + } + +}; \ No newline at end of file diff --git a/src/app/core/services/product.service.ts b/src/app/core/services/product.service.ts new file mode 100644 index 0000000..95c7aac --- /dev/null +++ b/src/app/core/services/product.service.ts @@ -0,0 +1,113 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; + +import { Product } from './product'; + +@Injectable() +export class ProductService { + + status: string[] = ['OUTOFSTOCK', 'INSTOCK', 'LOWSTOCK']; + + productNames: string[] = [ + "Bamboo Watch", + "Black Watch", + "Blue Band", + "Blue T-Shirt", + "Bracelet", + "Brown Purse", + "Chakra Bracelet", + "Galaxy Earrings", + "Game Controller", + "Gaming Set", + "Gold Phone Case", + "Green Earbuds", + "Green T-Shirt", + "Grey T-Shirt", + "Headphones", + "Light Green T-Shirt", + "Lime Band", + "Mini Speakers", + "Painted Phone Case", + "Pink Band", + "Pink Purse", + "Purple Band", + "Purple Gemstone Necklace", + "Purple T-Shirt", + "Shoes", + "Sneakers", + "Teal T-Shirt", + "Yellow Earbuds", + "Yoga Mat", + "Yoga Set", + ]; + + constructor(private http: HttpClient) { } + + getProductsSmall() { + return this.http.get('assets\products.json') + .toPromise() + .then(res => res.data) + .then(data => { return data; }); + } + + getProducts() { + return this.http.get('assets/products.json') + .toPromise() + .then(res => res.data) + .then(data => { return data; }); + } + + getProductsWithOrdersSmall() { + return this.http.get('assets/products-orders-small.json') + .toPromise() + .then(res => res.data) + .then(data => { return data; }); + } + + generatePrduct(): Product { + const product: Product = { + id: this.generateId(), + name: this.generateName(), + description: "Product Description", + price: this.generatePrice(), + quantity: this.generateQuantity(), + category: "Product Category", + inventoryStatus: this.generateStatus(), + rating: this.generateRating() + }; + + // product.image = product.name.toLocaleLowerCase().split(/[ ,]+/).join('-')+".jpg";; + return product; + } + + generateId() { + let text = ""; + let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + + for (var i = 0; i < 5; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + } + + return text; + } + + generateName() { + return this.productNames[Math.floor(Math.random() * Math.floor(30))]; + } + + generatePrice() { + return Math.floor(Math.random() * Math.floor(299)+1); + } + + generateQuantity() { + return Math.floor(Math.random() * Math.floor(75)+1); + } + + generateStatus() { + return this.status[Math.floor(Math.random() * Math.floor(3))]; + } + + generateRating() { + return Math.floor(Math.random() * Math.floor(5)+1); + } +} \ No newline at end of file diff --git a/src/app/core/services/product.ts b/src/app/core/services/product.ts new file mode 100644 index 0000000..9d7b4e8 --- /dev/null +++ b/src/app/core/services/product.ts @@ -0,0 +1,12 @@ +export interface Product { + id?:string; + code?:string; + name?:string; + description?:string; + price?:number; + quantity?:number; + inventoryStatus?:string; + category?:string; + image?:string; + rating?:number; +} \ No newline at end of file diff --git a/src/app/core/services/sso.service.ts b/src/app/core/services/sso.service.ts new file mode 100644 index 0000000..28167f9 --- /dev/null +++ b/src/app/core/services/sso.service.ts @@ -0,0 +1,109 @@ +import { HttpClient, HttpHeaders } from "@angular/common/http"; +import { Injectable } from "@angular/core"; +import { Router } from "@angular/router"; +import { environment } from "src/environments/environment"; +import { CommonService } from "./common.service"; +import { of } from "rxjs"; +import { LoginModel, SSOLoginModel } from "../models/common-model/Sign-in.model"; +import { API } from "./api.service"; +import { securityFunctions } from "../common/security"; +import { CommonFunctionService } from "../common/common-function.service"; +import * as moment from "moment"; + +@Injectable() +export class SSOService { + sso: SSOLoginModel = new SSOLoginModel(); + constructor(private http: HttpClient, private router: Router, private apiServ: API, private commonService: CommonFunctionService) { } + validateSSOLogin(key, loginUserId?) { + sessionStorage.removeItem('LoginUserData'); + this.http.get("https://pro.ip-api.com/json/?fields=query,countryCode,lat,lon,city,proxy&&key=JZDsrdeBzIM0yyN").subscribe(data => { + if (data) { + let obj = { + city: data['city'], + countryCode: data['countryCode'], + lat: data['lat'], + lon: data['lon'], + proxy: data['proxy'], + iP: data['query'], + }; + sessionStorage.setItem('IP', JSON.stringify(obj)); + let loginModel = new LoginModel(); + if (key) { + let req_obj = { + key: encodeURIComponent(key), + city: obj.city, + countryCode: obj.countryCode, + lat: obj.lat, + lon: obj.lon, + proxy: obj.proxy, + iP: obj.iP, + }; + this.apiServ.AdminPost('/KeyGenerate/VendorSSOKey', req_obj).subscribe({ + next: res => { + if (res && res.resp) { + let data = null; + if (loginUserId) { + if (loginUserId.includes(" ")) { + data = loginUserId.replace(/ /g, "+"); + } else { + data = loginUserId; + } + } + let loginId = loginUserId ? securityFunctions.decryptText(data) : null; + // set before jwt token so other api work proper + sessionStorage.setItem('JwtToken', res.respObj.JwtToken); + sessionStorage.setItem('RefreshToken', res.respObj.RefreshToken); + sessionStorage.setItem('JwtTokenExpiry', res.respObj.JwtTokenExpiry); + securityFunctions.setSessionStorage('LoginUserData', JSON.stringify(res.respObj.userLogin)); + let date = new Date(moment(res.respObj.userLogin.last_login).format("YYYY MM DD hh:mm:ss") + " UTC"); + let lastLogin = moment(date.toString()).format("hh:mm:ss, DD MMM YYYY"); + sessionStorage.setItem('lastLogin', lastLogin); + sessionStorage.setItem('userName', res.respObj.userLogin.first_name); + this.commonService.FetchExtranetVendorMaster(res.respObj.userLogin.extranet_vendor_id, false).subscribe(data => { + if (data) { + securityFunctions.setSessionStorage('VData', JSON.stringify(data.Result[0])); + } + }); + this.router.navigate(['/']) + this.commonService.StartTimer(); + } else { + this.router.navigate(['/Auth/Login']); + } + }, + error: err => { + this.router.navigate(['/Auth/Login']); + } + }); + } else { + this.router.navigate(['/Auth/Login']); + } + } + }); + + } + + // GetUserdata(userid) { + // if (userid) { + // return this.http.get(environment.adminAPIUrl + "/UserAccount/GetUserDetail/" + userid) + // } else { + // return of('continue'); + // } + // } + UserIpDetails; + GetIpAddress() { + this.http.get("https://pro.ip-api.com/json/?fields=query,countryCode,lat,lon,city,proxy&&key=JZDsrdeBzIM0yyN").subscribe(res => { + if (res) { + this.UserIpDetails = res; + let obj = { + city: res['city'], + countryCode: res['countryCode'], + lat: res['lat'], + lon: res['lon'], + proxy: res['proxy'], + iP: res['query'], + } + sessionStorage.setItem('IP', JSON.stringify(obj)); + } + }) + }; +} \ No newline at end of file diff --git a/src/app/core/shared/intercept-loader/intercept-loader.component.html b/src/app/core/shared/intercept-loader/intercept-loader.component.html new file mode 100644 index 0000000..e0894e0 --- /dev/null +++ b/src/app/core/shared/intercept-loader/intercept-loader.component.html @@ -0,0 +1,14 @@ +
+ +
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/app/core/shared/intercept-loader/intercept-loader.component.ts b/src/app/core/shared/intercept-loader/intercept-loader.component.ts new file mode 100644 index 0000000..111ec7e --- /dev/null +++ b/src/app/core/shared/intercept-loader/intercept-loader.component.ts @@ -0,0 +1,23 @@ +import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { LoaderService } from 'src/app/core/common/loader.service'; + +@Component({ + selector: 'app-loader', + templateUrl: './intercept-loader.component.html', +}) +export class LoaderComponent implements OnInit { + + loading: boolean; + + constructor(private loaderService: LoaderService, private cd: ChangeDetectorRef) { + + + } + + ngOnInit() { + this.loaderService.isLoading.subscribe((v) => { + this.loading = v; + this.cd.detectChanges(); + }); + } +} diff --git a/src/app/core/shared/shared.module.ts b/src/app/core/shared/shared.module.ts new file mode 100644 index 0000000..fcf4ed7 --- /dev/null +++ b/src/app/core/shared/shared.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + + + +@NgModule({ + declarations: [ + ], + imports: [ + CommonModule + ] +}) +export class SharedModule { } diff --git a/src/app/layouts/base/base.component.html b/src/app/layouts/base/base.component.html new file mode 100644 index 0000000..7cdf612 --- /dev/null +++ b/src/app/layouts/base/base.component.html @@ -0,0 +1,19 @@ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/src/app/layouts/base/base.component.ts b/src/app/layouts/base/base.component.ts new file mode 100644 index 0000000..fd657b3 --- /dev/null +++ b/src/app/layouts/base/base.component.ts @@ -0,0 +1,34 @@ +import { Component, ElementRef, OnDestroy, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { ActiveSidebarService } from 'src/app/core/services/active-sidebar.service'; + +@Component({ + templateUrl: './base.component.html', + selector: 'app-base', +}) +export class BaseComponent { + constructor(public ChcekSidebar: ActiveSidebarService) {} + + @ViewChild('headerElement') headerElement!: ElementRef; + headerHeight: number = 0; + resizeObserver!: ResizeObserver; + ngAfterViewInit() { + this.resizeObserver = new ResizeObserver(entries => { + for (let entry of entries) { + if (entry.target === this.headerElement.nativeElement) { + this.headerHeight = entry.contentRect.height; + } + } + }); + + if (this.headerElement && this.headerElement.nativeElement) { + this.resizeObserver.observe(this.headerElement.nativeElement); + } + } + + ngOnDestroy() { + if (this.resizeObserver && this.headerElement && this.headerElement.nativeElement) { + this.resizeObserver.unobserve(this.headerElement.nativeElement); + } + } +} diff --git a/src/app/layouts/intercept-loader/loader/loader.component.html b/src/app/layouts/intercept-loader/loader/loader.component.html new file mode 100644 index 0000000..43df8df --- /dev/null +++ b/src/app/layouts/intercept-loader/loader/loader.component.html @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/src/app/layouts/intercept-loader/loader/loader.component.ts b/src/app/layouts/intercept-loader/loader/loader.component.ts new file mode 100644 index 0000000..7cb7b95 --- /dev/null +++ b/src/app/layouts/intercept-loader/loader/loader.component.ts @@ -0,0 +1,22 @@ +import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { LoaderService } from 'src/app/core/common/loader.service'; + +@Component({ + selector: 'app-loader', + templateUrl: './loader.component.html', +}) +export class LoaderComponent implements OnInit { + + loading: boolean; + + constructor(private loaderService: LoaderService, private cd: ChangeDetectorRef) { + + + } + ngOnInit() { + this.loaderService.isLoading.subscribe((v) => { + this.loading = v; + this.cd.detectChanges(); + }); + } +} diff --git a/src/app/layouts/pages-routing.module.ts b/src/app/layouts/pages-routing.module.ts new file mode 100644 index 0000000..ebb0cf4 --- /dev/null +++ b/src/app/layouts/pages-routing.module.ts @@ -0,0 +1,68 @@ +// Angular +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +// Components +import { AuthGuard } from '../core/guard/auth.guard'; +import { BaseComponent } from './base/base.component'; +import { unauthorizedComponent } from './unauthorized/unauthorized.component'; +// Auth + +const routes: Routes = [ + { + path: '', + canActivate: [AuthGuard], + component: BaseComponent, + children: [ + { + path: "Unauthorized", + component: unauthorizedComponent, + }, + { + path: 'BookingManagement', + loadChildren: () => + import('../modules/booking-management/booking-management.module').then( + (m) => m.BookingManagementModule + ), + }, + { + path: 'Services', + loadChildren: () => + import('../modules/services/services.module').then((m) => m.ServicesModule), + }, + { + path: 'UserConfiguration', + loadChildren: () => + import('../modules/user-configuration/user-configuration.module').then((m) => m.UserConfigurationModule), + }, + { + path: 'ActivityConfiguration', + loadChildren: () => + import('../modules/services/activity-config/activity-config.module').then((m) => m.ActivityConfigModule), + }, + // { + // path: 'Error/403', + // data: { + // type: 'error-v6', + // code: 403, + // title: '403... Access forbidden', + // desc: "Looks like you don't have permission to access for requested page.
Please, contact administrator", + // }, + // }, + // { + // path: 'Error/404', + // data: { + // type: 'error-v4', + // }, + // }, + // { path: 'Error/:type' }, + { path: '', redirectTo: '', pathMatch: 'full' }, + { path: '**', redirectTo: 'Error/404', pathMatch: 'full' }, + ], + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class PagesRoutingModule { } diff --git a/src/app/layouts/theme.module.ts b/src/app/layouts/theme.module.ts new file mode 100644 index 0000000..5b6715e --- /dev/null +++ b/src/app/layouts/theme.module.ts @@ -0,0 +1,51 @@ + +// Angular +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from '@angular/router'; +// NgBootstrap +// Translation +import { BaseComponent } from './base/base.component'; +import { PagesRoutingModule } from './pages-routing.module'; +import { FooterComponent } from '../modules/common/footer/footer.component'; +import { HeaderComponent } from '../modules/common/header/header.component'; +//Angular Material +import { MatExpansionModule } from '@angular/material/expansion'; +import { AuthGuard } from '../core/guard/auth.guard'; +import { SideBarComponent } from '../modules/common/sidebar/sidebar.component'; +import { PanelMenuModule } from 'primeng/panelmenu'; +import { MatButtonModule } from '@angular/material/button'; +import { MatMenuModule } from '@angular/material/menu'; +import { unauthorizedComponent } from './unauthorized/unauthorized.component'; +import { CustomSidebarComponent } from '../modules/common/custom-sidebar/custom-sidebar.component'; +import { CustomSidebarItemComponent } from '../modules/common/custom-sidebar/custom-sidebar-item/custom-sidebar-item.component'; + +@NgModule({ + declarations: [ + BaseComponent, + FooterComponent, + HeaderComponent, + SideBarComponent, + unauthorizedComponent, + CustomSidebarComponent, + CustomSidebarItemComponent, + ], + imports: [ + CommonModule, + RouterModule, + PagesRoutingModule, + + // material module + MatExpansionModule, + MatButtonModule, + MatMenuModule, + // material module + + // prime ng + PanelMenuModule + ], + exports: [], + providers: [], +}) +export class ThemeModule { } + diff --git a/src/app/layouts/unauthorized/unauthorized.component.html b/src/app/layouts/unauthorized/unauthorized.component.html new file mode 100644 index 0000000..0cbf86f --- /dev/null +++ b/src/app/layouts/unauthorized/unauthorized.component.html @@ -0,0 +1,59 @@ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

4Ø3

+

Sorry! You are not authorized to view this page.

+
Please contact your administrator
+
+
+
\ No newline at end of file diff --git a/src/app/layouts/unauthorized/unauthorized.component.ts b/src/app/layouts/unauthorized/unauthorized.component.ts new file mode 100644 index 0000000..60736ab --- /dev/null +++ b/src/app/layouts/unauthorized/unauthorized.component.ts @@ -0,0 +1,16 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; + +@Component({ + selector: 'app-Unauthorized', + templateUrl: './unauthorized.component.html', +}) +export class unauthorizedComponent implements OnInit { + + constructor(private _commonSer: CommonFunctionService) { } + + ngOnInit(): void { + this._commonSer.CheckTokenExpireTime(false) + } + +} diff --git a/src/app/modules/auth/auth.component.html b/src/app/modules/auth/auth.component.html new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/auth/auth.component.ts b/src/app/modules/auth/auth.component.ts new file mode 100644 index 0000000..002b40b --- /dev/null +++ b/src/app/modules/auth/auth.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-auth', + templateUrl: './auth.component.html', +}) +export class AuthComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/auth/auth.module.ts b/src/app/modules/auth/auth.module.ts new file mode 100644 index 0000000..ce32f06 --- /dev/null +++ b/src/app/modules/auth/auth.module.ts @@ -0,0 +1,63 @@ +import { CommonModule } from '@angular/common'; +import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { RouterModule, Routes } from '@angular/router'; +import { MessageService } from 'primeng/api'; +import { PasswordModule } from 'primeng/password'; +import { ToastModule } from 'primeng/toast'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { LoginComponent } from './login/login.component'; +import { InterceptLoader } from 'src/app/core/common/intercept-loader.service'; +import { ForgetPasswordComponent } from './forget-password/forget-password.component'; +import { VerifyEmailComponent } from './verify-email/verify-email.component'; +import { NgOtpInputModule } from 'ng-otp-input'; +import { SingleSignOnComponent } from './single-sign-on/single-sign-on.component'; +import { SSOService } from 'src/app/core/services/sso.service'; +import { ButtonModule } from 'primeng/button'; + +const routes: Routes = [ + { + path: 'Login', + component: LoginComponent + }, + { + path: 'Forget-Password', + component: ForgetPasswordComponent + }, + { + path: 'verify-email', + component: VerifyEmailComponent + }, + { + path: 'SSOLogin', + component: SingleSignOnComponent + }, + { path: '', redirectTo: 'Login', pathMatch: 'full' }, +]; + +@NgModule({ + declarations: [ + LoginComponent, + ForgetPasswordComponent, + VerifyEmailComponent, + SingleSignOnComponent, + ], + imports: [ + ButtonModule, + ToastModule, + CommonModule, + PasswordModule, + NgOtpInputModule, + HttpClientModule, + FormsModule, + ReactiveFormsModule, + MatCheckboxModule, + RouterModule.forChild(routes), + ], + providers: [MessageService, ValidationService, + SSOService, + { provide: HTTP_INTERCEPTORS, useClass: InterceptLoader, multi: true }] +}) +export class AuthModule { } diff --git a/src/app/modules/auth/forget-password/forget-password.component.html b/src/app/modules/auth/forget-password/forget-password.component.html new file mode 100644 index 0000000..4b4595b --- /dev/null +++ b/src/app/modules/auth/forget-password/forget-password.component.html @@ -0,0 +1,89 @@ +
+
+ +
+
+
+

Reset Your Password

+ Enter your new password and then re-enter it for confirmation. +
+
+ Create your password +
+ + + +
+ + Please enter password + + Please check the password criteria +
+
+
    +
  • One + lowercase letter
  • +
  • One + uppercase + letter
  • +
  • + One number
  • +
+
    +
  • + One + special character
  • +
  • 8 + characters minimum
  • +
+
+
+ Confirm new password + +
+ + + +
+ Please + enter confirm password +
+
+ +
+
+
+
+
+
+ Image +

Thank you.

+

{{showMsgValid.Message}}

+

You can close this page.

+
+
+
+
+
+ \ No newline at end of file diff --git a/src/app/modules/auth/forget-password/forget-password.component.ts b/src/app/modules/auth/forget-password/forget-password.component.ts new file mode 100644 index 0000000..3a229b0 --- /dev/null +++ b/src/app/modules/auth/forget-password/forget-password.component.ts @@ -0,0 +1,88 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { securityFunctions } from 'src/app/core/common/security'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-forget-password', + templateUrl: './forget-password.component.html', +}) +export class ForgetPasswordComponent implements OnInit { + + + constructor( + private router: Router, + public fb: FormBuilder, + public validationService: ValidationService, + public ApiServ: API, + private route: ActivatedRoute, + public commonService: CommonFunctionService + + ) { } + showPass = false; + confirmPass = false; + ResetPswdForm: FormGroup; + + ngOnInit(): void { + this.ResetPswdForm = this.fb.group({ + Password: this.validationService.passwordV2, + confirm_password: this.validationService.required, + EncryptedData: [''], + }); + this.route.queryParams.subscribe((key_obj) => { + if (key_obj) { + this.ResetPswdForm.get('EncryptedData').setValue(key_obj['key']); + this.checkResetPassAllow(key_obj['key']) + } + }); + } + ResetPassword() { + if (this.ResetPswdForm.status == 'INVALID') { + this.validationService.showValidationsMsg(this.ResetPswdForm); + return; + } + let reset_pswd_obj_val = this.ResetPswdForm.getRawValue(); + if (reset_pswd_obj_val.Password != reset_pswd_obj_val.confirm_password) { + this.commonService.showMessage(false, 'Your password does not match with confirm password') + return; + } + let data = { + Password: reset_pswd_obj_val.Password, + EncryptedData: reset_pswd_obj_val.EncryptedData, + }; + let Object = { + key: securityFunctions.encryptRSA(securityFunctions.rsa_public_key, JSON.stringify(data)), + }; + this.ApiServ.AdminGoPost('/ExtranetUserMaster/UpdatePassword', Object).subscribe(res => { + if (res.resp) { + this.commonService.showMessage(true, 'Your password has been changed successfully.') + } + else { + this.commonService.showMessage(res['Resp'], res['Message']) + } + setTimeout(() => { + res.Resp ? this.router.navigate(['/Auth/Login']) : ''; + }, 500); + }) + } + btnClick() { + this.router.navigateByUrl("Auth/Login"); + }; + + showMsgValid; + checkResetPassAllow(dataObj) { + this.ApiServ.AdminGOGet("/ExtranetUserMaster/IsLinkValid/" + dataObj + '/true').subscribe(res => { + if (res) { + this.showMsgValid = res + } + }) + } + onKeyUp(event: KeyboardEvent) { + if (event.keyCode === 13) { // If Enter key is pressed + this.ResetPassword(); + } + } +} diff --git a/src/app/modules/auth/login/login.component.html b/src/app/modules/auth/login/login.component.html new file mode 100644 index 0000000..b7e8a04 --- /dev/null +++ b/src/app/modules/auth/login/login.component.html @@ -0,0 +1,239 @@ +
+
+
+ + + +
+ +
+
+

Sign In

+

Please sign in to continue

+
+
+
+
+
+ Email +
+ + + + +
+ Please + enter email + Please + enter valid email +
+
+
+
+
+ Password +
+ + + + + +
+ Please + enter password +
+
+
+
+ +
+ {{errorMessage}} +
+
+ +
+
+
+
+ +
+
+ Image +

For your security

+

Please verify your identification by clicking on the verification link send on your mail which is + valid for 5 minutes.

+
+
+ +
+ +
+

OTP Verification

+

Code sent to {{Email}}

+
+ +
+ Resend code in 00:{{timeLeft >= 0 && timeLeft <= 9?'0' + + timeLeft : timeLeft}} + +
+

Didn't receive an OTP?

+ Please try again to login +
+
+ {{errorMessage}} +
+
+ +
+
+
+ +
+ +
+

Forget Your Password

+
+
+ Reset your password using your email +
+ + + + +
+
+ Please enter + email + Please enter + valid email +
+ +
+

If you don't remember the email address you used to create your account,please + Contact us + +

+
+
+
+
+ +
+ \ No newline at end of file diff --git a/src/app/modules/auth/login/login.component.ts b/src/app/modules/auth/login/login.component.ts new file mode 100644 index 0000000..57e6991 --- /dev/null +++ b/src/app/modules/auth/login/login.component.ts @@ -0,0 +1,578 @@ +import { HttpClient, HttpHeaders } from '@angular/common/http'; +import { Component, OnInit, Renderer2 } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { Title } from '@angular/platform-browser'; +import { Router } from '@angular/router'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; +import { environment } from 'src/environments/environment'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { securityFunctions } from 'src/app/core/common/security'; +import { CookieService } from 'ngx-cookie-service'; +import { LoginModel, OTPModel } from 'src/app/core/models/common-model/Sign-in.model'; +import { NgOtpInputConfig } from 'ng-otp-input'; +@Component({ + selector: 'app-login', + templateUrl: './login.component.html', +}) +export class LoginComponent implements OnInit { + + constructor( + private router: Router, + public ApiServ: API, + public commonService: CommonFunctionService, + public titleService: Title, + public fb: FormBuilder, + public validationService: ValidationService, + private http: HttpClient, + private cookieService: CookieService, + private renderer: Renderer2, + ) { } + SignInForm: FormGroup; + ResetPswdForm: FormGroup; + ShowUserVerificationBox = false; + showPass: boolean = false; + userInterval; + errorMessage = ''; + OTPSection = false; + ForgetPassword = false; + Email = ''; + UserIpDetails; + // Timer + resendBtn; + timerBtn; + timeLeft: number; + interval; + NewPaas = false; + comfirmPass = false; + ngOnInit(): void { + sessionStorage.removeItem('excd'); + securityFunctions.resetSessionStoage('lastLogin') + securityFunctions.resetSessionStoage('LoginUserData') + securityFunctions.resetSessionStoage('VData') + securityFunctions.resetSessionStoage('userName') + securityFunctions.resetSessionStoage('JwtToken') + securityFunctions.resetSessionStoage('RefreshToken') + securityFunctions.resetSessionStoage('JwtTokenExpiry') + securityFunctions.resetSessionStoage('menu') + this.SignInForm = this.fb.group({ + EmailID: this.validationService.email, + Password: this.validationService.required, + OTP: this.validationService.required, + forgetPassEmail: this.validationService.email + }); + this.IsPassWordChange = false; + this.GetIpAddress(); + this.changePasswordCreate(); + }; + SetupPage() { + this.getLogo() + } + orgLogo + getLogo() { + const favicon = this.renderer.selectRootElement('link[rel="icon"]', true); + this.ApiServ.AdminGet('/ForgotPassword/GetOrgLogo').subscribe((res) => { + if (res != null) if (res["logo"] != null) { + this.orgLogo = res["logo"]; + sessionStorage.setItem("logo", JSON.stringify(res)); + this.titleService.setTitle('Inventory Management | ' + res.org_name) + document.documentElement.style.setProperty('--primary-theme', res['primary_color']); + document.documentElement.style.setProperty('--secondary-theme', res['secondary_color']); + this.renderer.setAttribute(favicon, 'href', res['favicon'] ? res['favicon'] : './assets/images/TMC.svg'); + } else { + this.orgLogo = "https://cdn-aos.b-cdn.net/Static/Email/TMC.svg"; + } + }) + } + onKeyUp(event) { + if (event.keyCode == 13 && !this.disableSignInButton) { + this.SignIn(); + } + + } + viewPass() { + this.showPass = !this.showPass; + } + // config OTP + config: NgOtpInputConfig = { + allowNumbersOnly: true, + length: 4, + isPasswordInput: false, + disableAutoFocus: true, + placeholder: '●', + }; + + userId = ''; + disableSignInButton = false; + SignIn() { + if (this.SignInForm.get('EmailID').status == "INVALID" || this.SignInForm.get('Password').status == "INVALID") { + this.validationService.showValidationsMsg(this.SignInForm.get('EmailID')); + this.validationService.showValidationsMsg(this.SignInForm.get('Password')); + return; + } + this.disableSignInButton = true; + clearInterval(this.userInterval); + let val = this.SignInForm.getRawValue(); + let postData = new LoginModel(); + postData.EmailID = val.EmailID; + postData.Password = val.Password; + postData.domain = document.location.host; + // postData.domain = 'extranet.aos-dev.com'; + postData.ProjectId = '2405170833594899108'; + postData.Browser = this.getBrowserName(); + postData.City = this.UserIpDetails.city; + postData.CountryCode = this.UserIpDetails.countryCode; + postData.IP = this.UserIpDetails.query; + postData.Lon = this.UserIpDetails.lon; + postData.Lat = this.UserIpDetails.lat; + postData.Proxy = this.UserIpDetails.proxy; + postData.Platform = this.getPlatform(); + postData.MachineId = this.cookieService.check('MacId') ? this.cookieService.get('MacId') : '' + postData.time = (this.ApiServ.getAdjustedLocalTime() * 10000 + 621355968000000000).toString() + localStorage.setItem('UserEmail', val.EmailID); + let obj = { + key: securityFunctions.encryptRSA(securityFunctions.rsa_public_key, JSON.stringify(postData)), + }; + // let domain = 'extranet.aos-dev.com' + // // let domain = document.location.host; + // let domainName = domain.replace(/^(https?:\/\/)?/, ''); + // let domain_time = domainName + '~' + new Date().getTime(); + // let key = securityFunctions.rsa_public_key; + // let encrypted_string = securityFunctions.encryptRSA(key, domain_time).toString(); + // const headers = new HttpHeaders({ + // 'token': encrypted_string, + // }); + // const options = { headers: headers }; + this.ApiServ.AdminPost('/ExtranetLogin/ValidateLogin', obj).subscribe((res) => { + if (res !== null) { // Check if res is not null + this.disableSignInButton = false + this.CheckUserStatusForLogin(res, true); + } else { + this.disableSignInButton = false + this.router.navigateByUrl("Auth/Login"); + } + }, error => { + this.disableSignInButton = false + this.router.navigateByUrl("Auth/Login"); + }); + }; + + + // verify + CheckUserVerification(key_resp) { + let req = { + key: key_resp + } + // let domain = document.location.host + // let domainName = domain.replace(/^(https?:\/\/)?/, ''); + // let domain_time = domainName + '~' + new Date().getTime(); + // let key = securityFunctions.rsa_public_key; + // let encrypted_string = securityFunctions.encryptRSA(key, domain_time).toString(); + // const headers = new HttpHeaders({ + // // 'Referer': window.location.origin, // Assuming you want to send the current origin as Referer + // 'token': encrypted_string + // }); + // const options = { headers: headers }; + this.ApiServ.AdminPost('/UserMachine/CheckUserVerified', req).subscribe(res => { + if (res) { + if (res.Status) { + clearInterval(this.userInterval); + if (res.VerificationStatus == 'APPROVED') { + this.SignIn(); + } else if (res.VerificationStatus == 'REJECT') { + this.ShowUserVerificationBox = false; + this.OTPSection = false; + this.errorMessage = 'Access Rejected'; + } + } else { + if (res.Message == 'Key Expired.') { + clearInterval(this.userInterval); + this.ShowUserVerificationBox = false; + this.errorMessage = 'Key Expired'; + } + } + } + }) + } + + loginPage() { + this.ShowUserVerificationBox = false; + this.OTPSection = false; + this.ForgetPassword = false; + } + + // OTP set + onOtpChange(otp) { + this.SignInForm.get('OTP').setValue(otp); + // if (otp.keyCode == 13 ) { + // this.Verify(); + // } + } + // Common verify + CheckUserStatusForLogin(res, MFACheck) { + if (res.Status) { + this.userId = res.ResponseObject.user_id; + if (!res.ResponseObject.change_default_password) { + const expirationDate = new Date(); + expirationDate.setFullYear(expirationDate.getFullYear() + 1); + res.MachineId && res.MachineId != 'null' ? this.cookieService.set('MacId', res.MachineId, expirationDate) : ''; + if (MFACheck && res.ResponseObject.IsMFAApplicable) { + if (res.ResponseObject.IsMFAApplicable) { + this.timerBtn = true; + this.resendBtn = false; + this.OTPSection = true; + this.errorMessage = ''; + this.timeLeft = 60; + this.startTimer(); + this.Email = localStorage.getItem('UserEmail'); + return + } + } + else { + if (MFACheck) { + if (!res.IsVerified) { + let time = (this.ApiServ.getAdjustedLocalTime() * 10000 + 621355968000000000).toString(); + var url_content = res.ResponseObject.user_id + "-" + res.MachineId.replace(/-/g, "~") + "-" + time; + let key = securityFunctions.EncryptReq(url_content) + this.ShowUserVerificationBox = true; + this.OTPSection = false; + this.userInterval = setInterval(() => { + this.CheckUserVerification(key); + }, 6000); + let verificationTimeout = 5 * 60 * 1000; + setTimeout(() => { + clearInterval(this.userInterval); + }, verificationTimeout); + return; + } + else { + this.SetSessionForLogin(res); + } + } else { + this.SetSessionForLogin(res); + this.commonService.showMessage(res['ResponseObject'], res['Message']); + } + }; + // this.getMenus().subscribe(res => { + // if (res) { + // // sessionStorage.setItem('menu', JSON.stringify(res)) + // // this.IsOpenDefaultUrl(res); + // } + // }) + } else { + this.IsPassWordChange = true; + return + } + } else { + // !res.Status ? this.loginPage() : ''; + if (res.Message == 'token details not saved') { + this.loginPage() + } + this.errorMessage = res.Message + } + } + + SetSessionForLogin(res) { + clearInterval(this.userInterval); + let date = new Date(moment(res.ResponseObject.last_login).format("YYYY MM DD hh:mm:ss") + " UTC"); + let lastLogin = moment(date.toString()).format("hh:mm:ss, DD MMM YYYY"); + securityFunctions.setSessionStorage('LoginUserData', JSON.stringify(res.ResponseObject)); + sessionStorage.getItem('JwtToken') ? '' : sessionStorage.setItem('JwtToken', res.JwtToken); + sessionStorage.getItem('RefreshToken') ? '' : sessionStorage.setItem('RefreshToken', res.RefreshToken); + sessionStorage.getItem('JwtTokenExpiry') ? '' : sessionStorage.setItem('JwtTokenExpiry', res.JwtTokenExpiry); + this.commonService.FetchExtranetVendorMaster(res.ResponseObject.extranet_vendor_id, false).subscribe(data => { + if (data) { + securityFunctions.setSessionStorage('VData', JSON.stringify(data.Result[0])); + } + }); + sessionStorage.setItem('userName', res.ResponseObject.first_name); + sessionStorage.setItem('org_id', res.ResponseObject.org_id); + sessionStorage.setItem('lastLogin', lastLogin); + // sessionStorage.setItem('IscancelPNR', res.ResponseObject.IsCancelPnr); + // sessionStorage.setItem('Is_Void', res.ResponseObject.IsAllowVoidTicket); + // sessionStorage.setItem('TpinApplicable', res.TpinApplicable); + // sessionStorage.setItem('T_Activated', res.TpinActivated); + // sessionStorage.setItem('T_Expired', res.TpinExpired); + this.ShowUserVerificationBox = false; + this.OTPSection = false; + this.router.navigateByUrl("/"); + this.commonService.StartTimer(); + } + // MFA + startTimer() { + this.interval = setInterval(() => { + if (this.timeLeft > 0) { + this.timeLeft--; + } + if (this.timeLeft == 0) { + clearInterval(this.interval); + this.resendBtn = true; + this.timerBtn = false; + } + }, 1000); + } + + ReSendOTP() { + this.SendOTP(); + this.timerBtn = false; + this.resendBtn = false; + this.timeLeft = -1; + }; + SendOTP() { + this.ApiServ.AdminGet('/OTP/ResendOTP/' + this.userId).subscribe( + (data) => { + if (data) { + this.commonService.showMessage(data['resp'], data['respMsg']); + } + } + ); + }; + getMenus() { + return this.http.get(environment.APIBaseUrl + '/MenuMasterNew/GetAllMenuByUserId/' + sessionStorage.getItem('userId') + '/2405170833594899108') + } + Verify() { + if (this.SignInForm.get('OTP').status == "INVALID") { + this.errorMessage = 'Please enter valid OTP' + return; + } + let val = this.SignInForm.getRawValue(); + let postData = new OTPModel(); + postData.oTP = val.OTP; + postData.userId = this.userId; + postData.browser = this.getBrowserName(); + postData.city = this.UserIpDetails.city; + postData.countryCode = this.UserIpDetails.countryCode; + postData.iP = this.UserIpDetails.query; + postData.lon = this.UserIpDetails.lon; + postData.lat = this.UserIpDetails.lat; + postData.proxy = this.UserIpDetails.proxy; + postData.ProjectId = '2405170833594899108'; + postData.platform = this.getPlatform(); + postData.macId = this.cookieService.check('MacId') ? this.cookieService.get('MacId') : ''; + this.ApiServ.AdminPost('/OTP/VerifyOTP', postData).subscribe(res => { + if (res) { + this.CheckUserStatusForLogin(res, false); + } else { + this.router.navigateByUrl("Auth/Login"); + } + }) + }; + // forget Password + SendMail() { + if (this.SignInForm.get('forgetPassEmail').status == "INVALID") { + this.validationService.showValidationsMsg(this.SignInForm.get('forgetPassEmail')); + return; + } + let val = this.SignInForm.get('forgetPassEmail').value; + let request = { + email: val, + domain: window.location.origin, + time: (this.ApiServ.getAdjustedLocalTime()).toString() + }; + let obj = { + key: securityFunctions.encryptRSA(securityFunctions.rsa_public_key, JSON.stringify(request)), + }; + this.ApiServ.AdminGoPost('/ExtranetUserMaster/ValidateEmail', obj).subscribe( + (data) => { + if (data) { + this.commonService.showMessage(data['Resp'], data['Message']); + } + } + ); + }; + // get user details + getPlatform() { + var platform = ""; + const userAgent = window.navigator.userAgent.toLowerCase(); + if (/android/i.test(userAgent)) { + platform = 'Android device'; + } else if (/iphone|ipad|ipod/i.test(userAgent)) { + platform = 'iOS device'; + } else if (/windows phone/i.test(userAgent)) { + platform = 'Windows phone'; + } else if (/win/i.test(userAgent)) { + platform = 'Windows desktop'; + } else if (/mac/i.test(userAgent)) { + platform = 'Mac desktop'; + } else if (/linux/i.test(userAgent)) { + platform = 'Linux desktop'; + } else { + platform = 'Unknown device'; + } + return platform; + } + // getBrowser() { + // var browserName = ''; + // var userAgent = navigator.userAgent; + + // if (userAgent.indexOf('Firefox') > -1) { + // browserName = 'Mozilla Firefox'; + // } else if (userAgent.indexOf('Opera') > -1 || userAgent.indexOf('OPR') > -1) { + // browserName = 'Opera'; + // } else if (userAgent.indexOf('Trident') > -1) { + // browserName = 'Microsoft Internet Explorer'; + // } else if (userAgent.indexOf('Edge') > -1) { + // browserName = 'Microsoft Edge'; + // } else if (userAgent.indexOf('Chrome') > -1) { + // browserName = 'Google Chrome'; + // } else if (userAgent.indexOf('Safari') > -1) { + // browserName = 'Apple Safari'; + // } + + // return browserName; + // } + + getBrowserName(): string { + const userAgent = navigator.userAgent; + if (userAgent.includes("Chrome")) { + return "Google Chrome"; + } else if (userAgent.includes("Firefox")) { + return "Mozilla Firefox"; + } else if (userAgent.includes("Safari") && !userAgent.includes("Chrome")) { + return "Apple Safari"; + } else if (userAgent.includes("Edge")) { + return "Microsoft Edge"; + } else if (userAgent.includes("OPR") || userAgent.includes("Opera")) { + return "Opera"; + } else if (userAgent.includes("MSIE") || userAgent.includes("Trident/")) { + return "Internet Explorer"; + } else { + return "Unknown Browser"; + } + } + + // Example usage: + GetIpAddress() { + this.http.get("https://pro.ip-api.com/json/?fields=query,countryCode,lat,lon,city,proxy&&key=JZDsrdeBzIM0yyN").subscribe(res => { + if (res) { + this.UserIpDetails = res; + let obj = { + city: res['city'], + countryCode: res['countryCode'], + lat: res['lat'], + lon: res['lon'], + proxy: res['proxy'], + iP: res['query'], + }; + this.SetupPage(); + sessionStorage.setItem('IP', JSON.stringify(obj)); + } + }) + }; + + // common function + addRemoveValid(name, check) { + if (check) { + this.SignInForm.get(name).addValidators([Validators.required]); + } else { + this.SignInForm.get(name).clearValidators(); + } + this.SignInForm.get(name).updateValueAndValidity(); + this.SignInForm.get(name).markAsUntouched(); + }; + + // Tpin + // CheckTpinAllowOrNot(response) { + // if (response.TpinApplicable) { + // if (!response.TpinActivated || response.TpinExpired) { + // const now = new Date(); + // const formattedDate = now.toISOString().slice(0, 19).replace('T', ' '); + // let keyVal = securityFunctions.EncryptReq(response.ResponseObject.user_id + '~' + formattedDate + '~' + (response.TpinExpired ? 'expired' : 'create')).trim() + // this.router.navigate(['/Login/TPIN'], { queryParams: { key: keyVal } }); + // return false + // } + // } + // return true + // } + + password_criteria_obj = { + is_lowerCase: false, + is_Uppercase: false, + is_Capital_case: false, + is_numbers: false, + is_special_characters: false, + is_length: false + }; + IsPassWordChange = false; + changePasswordCreate() { + this.password_criteria_obj = { + is_lowerCase: false, + is_Uppercase: false, + is_Capital_case: false, + is_numbers: false, + is_special_characters: false, + is_length: false + }; + this.ResetPswdForm = this.fb.group({ + Password: this.validationService.passwordV2, + confirm_password: this.validationService.required, + }); + } + password_criteria(password_Value) { + password_Value.length >= 8 ? this.password_criteria_obj.is_length = true : this.password_criteria_obj.is_length = false; + password_Value.match(this.validationService.regExps.lower_case) ? this.password_criteria_obj.is_lowerCase = true : this.password_criteria_obj.is_lowerCase = false; + password_Value.match(this.validationService.regExps.Capital_case) ? this.password_criteria_obj.is_Uppercase = true : this.password_criteria_obj.is_Uppercase = false; + password_Value.match(this.validationService.regExps.numbers) ? this.password_criteria_obj.is_numbers = true : this.password_criteria_obj.is_numbers = false; + password_Value.match(this.validationService.regExps.special_characters) ? this.password_criteria_obj.is_special_characters = true : this.password_criteria_obj.is_special_characters = false; + }; + + // ResetPassword() { + // if (this.ResetPswdForm.status == 'INVALID') { + // this.validationService.showValidationsMsg(this.ResetPswdForm); + // return; + // } + // let reset_pswd_obj_val = this.ResetPswdForm.getRawValue(); + // if (reset_pswd_obj_val.Password != reset_pswd_obj_val.confirm_password) { + // this.commonService.showMessage(false, 'Your password does not match with confirm password') + // return; + // } + // let PostData = { + // "user_id": this.userId, + // "password": reset_pswd_obj_val.Password, + // "change_default_password": false + // } + // let encryptRSAData = { + // key: securityFunctions.encryptRSA(securityFunctions.rsa_public_key, JSON.stringify(PostData)), + // }; + // this.http.post(environment.APIBaseUrl + '/StaffMaster/ResetStaffPasswordHome', encryptRSAData).subscribe(res => { + // if (res.resp) { + // this.commonService.showMessage(true, 'Your password has been changed successfully.'); + // this.IsPassWordChange = false; + // } + // else { + // this.commonService.showMessage(res.resp, res.respMsg); + // } + // }) + // } + + + // + // IsOpenDefaultUrl(data) { + // let agency = data.find(e => e.menu_id == '2306211409428416327'); + // let flight_booking = data.find(e => e.menu_id == '2307251023313127095'); + // let hotel_booking = data.find(e => e.menu_id == '2307251027232645472'); + // let flight_transaction = data.find(e => e.menu_id == '2307251045530701040'); + // let lead_management = data.find(e => e.menu_id == '2307251305094097395'); + // if (agency) this.navigateMenuLink(agency); + // else if (flight_booking) this.navigateMenuLink(flight_booking); + // else if (hotel_booking) this.navigateMenuLink(hotel_booking); + // else if (lead_management) this.navigateMenuLink(lead_management); + // else if (flight_transaction) this.navigateMenuLink(flight_transaction); + // else this.router.navigateByUrl("/Home/Dashboard"); + // } + navigateMenuLink(menu) { + let url = '/' + menu.ui_controller + '/' + menu.ui_action; + if (url) { + sessionStorage.setItem('selMenu', url); + window.location.href = window.location.origin + url; + } + }; + + onKeyup(event: KeyboardEvent) { + if (event.keyCode === 13) { // If Enter key is pressed + this.SendMail(); + } + } + +} diff --git a/src/app/modules/auth/single-sign-on/single-sign-on.component.html b/src/app/modules/auth/single-sign-on/single-sign-on.component.html new file mode 100644 index 0000000..959175f --- /dev/null +++ b/src/app/modules/auth/single-sign-on/single-sign-on.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/modules/auth/single-sign-on/single-sign-on.component.ts b/src/app/modules/auth/single-sign-on/single-sign-on.component.ts new file mode 100644 index 0000000..31e04d6 --- /dev/null +++ b/src/app/modules/auth/single-sign-on/single-sign-on.component.ts @@ -0,0 +1,26 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { SSOService } from 'src/app/core/services/sso.service'; + +@Component({ + selector: 'app-single-sign-on', + templateUrl: './single-sign-on.component.html', +}) +export class SingleSignOnComponent implements OnInit { + IPData; + constructor( + private route: ActivatedRoute, + private ssoService: SSOService, + ) { + this.route.queryParams.subscribe((params) => { + ssoService.validateSSOLogin(params['key'], params['LoginUserId']); + if (params['langcode']) { + sessionStorage.setItem('LangCode', params['langcode']); + } + }); + }; + ngOnInit(): void { + + } + +} diff --git a/src/app/modules/auth/verify-email/verify-email.component.html b/src/app/modules/auth/verify-email/verify-email.component.html new file mode 100644 index 0000000..7b91dd6 --- /dev/null +++ b/src/app/modules/auth/verify-email/verify-email.component.html @@ -0,0 +1,34 @@ +
+
+
+ Image +

Thank you.

+

Sign-in attempt was approved.

+

You can close this page.

+
+
+
+
+ Image +

Thank you.

+

Your account has been deactivated.

+

You can close this page.

+
+
+
+
+ Image +

Thank you.

+

Sign-in attempt was denied.

+

You can close this page.

+
+
+
+
+ Image +

The link you followed has expired.

+

Please try to login again.

+

You can close this page.

+
+
+
\ No newline at end of file diff --git a/src/app/modules/auth/verify-email/verify-email.component.ts b/src/app/modules/auth/verify-email/verify-email.component.ts new file mode 100644 index 0000000..1cea634 --- /dev/null +++ b/src/app/modules/auth/verify-email/verify-email.component.ts @@ -0,0 +1,53 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-verify-email', + templateUrl: './verify-email.component.html', +}) +export class VerifyEmailComponent implements OnInit { + + IPData; + constructor( + private route: ActivatedRoute, + private ApiServ: API, + public commonService: CommonFunctionService, + ) { } + ShowApprovalCard = false; + ShowRejectedCard = false; + ShowDeactivateCard = false; + ShowExpiredCard = false; + ngOnInit() { + this.ShowApprovalCard = false; + this.ShowRejectedCard = false; + this.ShowDeactivateCard = false; + this.ShowExpiredCard = false; + this.route.queryParams.subscribe((params) => { + this.VerifyUserEmail(params['key']); + }); + } + + + + VerifyUserEmail(key_resp) { + let obj = { + key: key_resp, + }; + this.ApiServ.AdminPost('/UserMachine/VerifyMachineEmail', obj).subscribe( + (d) => { + if (d && d.Status) { + if (d.VerificationStatus == 'APPROVED') this.ShowApprovalCard = true; + else if (d.VerificationStatus == 'REJECT') this.ShowRejectedCard = true; + else this.ShowDeactivateCard = true; + } else { + if (!d.Status && d.Message == 'Key Expired') { + this.ShowExpiredCard = true; + } + } + } + ); + }; + +} diff --git a/src/app/modules/booking-management/booking-management.component.html b/src/app/modules/booking-management/booking-management.component.html new file mode 100644 index 0000000..a085aaf --- /dev/null +++ b/src/app/modules/booking-management/booking-management.component.html @@ -0,0 +1 @@ +

booking-management works!

diff --git a/src/app/modules/booking-management/booking-management.component.ts b/src/app/modules/booking-management/booking-management.component.ts new file mode 100644 index 0000000..ffad177 --- /dev/null +++ b/src/app/modules/booking-management/booking-management.component.ts @@ -0,0 +1,11 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-booking-management', + templateUrl: './booking-management.component.html', +}) +export class BookingManagementComponent implements OnInit { + constructor() {} + + ngOnInit(): void {} +} diff --git a/src/app/modules/booking-management/booking-management.module.ts b/src/app/modules/booking-management/booking-management.module.ts new file mode 100644 index 0000000..0713af5 --- /dev/null +++ b/src/app/modules/booking-management/booking-management.module.ts @@ -0,0 +1,33 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { BookingManagementComponent } from './booking-management.component'; +import { ExperienceBookingComponent } from './experience-booking/experience-booking.component'; + +const routes: Routes = [ + { + path: 'HotelBooking', + loadChildren: () => + import('./hotel-booking/hotel-booking.module').then( + (m) => m.HotelBookingModule + ), + }, + { + path: 'ExperienceBooking', + loadChildren: () => + import('./experience-booking/experience-booking.module').then( + (m) => m.ExperienceBookingModule + ), + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'search', + }, +]; + +@NgModule({ + declarations: [BookingManagementComponent, ExperienceBookingComponent], + imports: [CommonModule, RouterModule.forChild(routes)], +}) +export class BookingManagementModule {} diff --git a/src/app/modules/booking-management/experience-booking/experience-booking-search/experience-booking-search.component.html b/src/app/modules/booking-management/experience-booking/experience-booking-search/experience-booking-search.component.html new file mode 100644 index 0000000..935304b --- /dev/null +++ b/src/app/modules/booking-management/experience-booking/experience-booking-search/experience-booking-search.component.html @@ -0,0 +1 @@ +

Experience-booking-search works!

diff --git a/src/app/modules/booking-management/experience-booking/experience-booking-search/experience-booking-search.component.ts b/src/app/modules/booking-management/experience-booking/experience-booking-search/experience-booking-search.component.ts new file mode 100644 index 0000000..eb9bd72 --- /dev/null +++ b/src/app/modules/booking-management/experience-booking/experience-booking-search/experience-booking-search.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-Experience-booking-search', + templateUrl: './experience-booking-search.component.html', +}) +export class ExperienceBookingSearchComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/booking-management/experience-booking/experience-booking.component.html b/src/app/modules/booking-management/experience-booking/experience-booking.component.html new file mode 100644 index 0000000..736899f --- /dev/null +++ b/src/app/modules/booking-management/experience-booking/experience-booking.component.html @@ -0,0 +1 @@ +

Experience-booking works!

diff --git a/src/app/modules/booking-management/experience-booking/experience-booking.component.ts b/src/app/modules/booking-management/experience-booking/experience-booking.component.ts new file mode 100644 index 0000000..11dd16f --- /dev/null +++ b/src/app/modules/booking-management/experience-booking/experience-booking.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-Experience-booking', + templateUrl: './experience-booking.component.html', +}) +export class ExperienceBookingComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/booking-management/experience-booking/experience-booking.module.ts b/src/app/modules/booking-management/experience-booking/experience-booking.module.ts new file mode 100644 index 0000000..ad67c9a --- /dev/null +++ b/src/app/modules/booking-management/experience-booking/experience-booking.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { ExperienceBookingSearchComponent } from './experience-booking-search/experience-booking-search.component'; + +const routes: Routes = [ + { + path: 'Search', + component: ExperienceBookingSearchComponent, + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'Search', + }, +]; + +@NgModule({ + declarations: [ExperienceBookingSearchComponent], + imports: [CommonModule, RouterModule.forChild(routes)], +}) +export class ExperienceBookingModule {} diff --git a/src/app/modules/booking-management/hotel-booking/hotel-booking-search/hotel-booking-search.component.html b/src/app/modules/booking-management/hotel-booking/hotel-booking-search/hotel-booking-search.component.html new file mode 100644 index 0000000..37aa38a --- /dev/null +++ b/src/app/modules/booking-management/hotel-booking/hotel-booking-search/hotel-booking-search.component.html @@ -0,0 +1,672 @@ +
+
+
+

Hotel Booking

+
+
+
+
+
+
+
+ Trip ID + +
+
+
+
+ Booking ID + +
+
+
+
+ Company + + +
+
+
+

Company

+
+ +
+
+
+ +
+ +
Company
+
+
+
+
+
+
+
+ Branch + + +
+
+
+

Branch

+
+ +
+
+
+ +
+ +
Branch
+
+
+
+
+
+
+
+ Hotel Name + +
+
+
+
+ Country + + +
+
+
+

Country

+
+ +
+
+
+ +
+ +
Country
+
+ +
+
+
+
+
+
+ City + + +
+
+
+

City

+
+ +
+
+
+ +
+ +
City
+
+ +
+
+
+
+
+
+ Star Rating + + +
+
+
+

Star Rating

+
+ +
+
+
+ +
+ +
Star Rating
+
+
+
+
+
+
+
+ Guest Name + +
+
+
+
+ Contact Number + +
+
+
+
+ Booking Status + + +
+
+
+

Booking Status

+
+ +
+
+
+ +
+ +
Booking Status
+
+
+
+
+
+
+
+ Invoice Status + + +
+
+
+

Invoice Status

+
+ +
+
+
+ +
+ +
Invoice Status
+
+
+
+
+
+ +
+
+ Confirmation No. + +
+
+
+
+
+ Date Type +
+ + +
+
+
+

Date Type

+
+ +
+
+
+ +
+ +
Payment Status
+
+
+
+
+
+
+
+ From Date + + +
+
+
+

Date

+
+ +
+
+
+
+
+
+
+
+ To Date + + +
+
+
+

Date

+
+ +
+
+
+
+
+
+
+
+
+ Under Free Cancellation +
+
+
+
+
+
+ + +
+
+
+ + + + + + + + + +
+ + + + +
+
+
+
+ + + + Trip ID + + + + Booking ID + + + + Hotel Name + + + + Country + + + + City + + + + Booking Date + + + + Check In Date + + + + Check Out Date + + + + No Of Nights + + + + No Of Rooms + + + + Room Name + + + + Lead Guest + + + + Lead Nationality + + + + Lead Mobile Number + + + + + Confirmation No + + + + Vendor Booking Amount + + + + Booking Status + + + + GUID + + + + Action + + + + + + {{HotelBooking.trip_id}} + {{HotelBooking.booking_id}} + {{HotelBooking.hotel_name}} + {{HotelBooking.hotel_country}} + {{HotelBooking.hotel_city}} + {{HotelBooking.booking_date}} + {{HotelBooking.checkin_date}} + {{HotelBooking.checkout_date}} + {{HotelBooking.no_of_nights}} + {{HotelBooking.no_of_rooms}} + {{HotelBooking.room_names_custom }} + {{HotelBooking.lead_guest}} + {{HotelBooking.guest_nationality_code}} + {{HotelBooking.guest_mobile_no}} + + {{HotelBooking.hotel_confirmation_number}} + {{HotelBooking.total}} + {{map_booking_status(HotelBooking.status_id, HotelBooking.payment_status)}} + {{HotelBooking.booking_guid}} + +
+ + + + + +
+ + +
+ + + + No data found + + + +
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/src/app/modules/booking-management/hotel-booking/hotel-booking-search/hotel-booking-search.component.ts b/src/app/modules/booking-management/hotel-booking/hotel-booking-search/hotel-booking-search.component.ts new file mode 100644 index 0000000..7ec2f71 --- /dev/null +++ b/src/app/modules/booking-management/hotel-booking/hotel-booking-search/hotel-booking-search.component.ts @@ -0,0 +1,560 @@ +import { Component, NgModule, OnInit, ViewChild } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; +import { HotelBookingManagementService } from 'src/app/core/services/HotelServices/hotel_booking_management.service'; +import { Product } from 'src/app/core/services/product'; +import { securityFunctions } from 'src/app/core/common/security'; + +@Component({ + selector: 'hotel-booking-search', + templateUrl: './hotel-booking-search.component.html', +}) +export class HotelBookingSearchComponent implements OnInit { + analyticsData; + cols: any[]; + exportColumns; + products: Product[]; + HotelBookingFiltersForm: FormGroup; + confirmationForm: FormGroup; + selectedProducts: Product[]; + Agencylist; + Companylist; + Entitylist; + Countrylist; + Citylist; + AssignUserList=[]; + AssignSupportList=[]; + AssignUser=[]; + AssignSupport=[]; + AssignUserSearch=[]; + User_Type; + User_Name; + User_Id = [{user_id:'',user_name:'Assign to me'}]; + User_Id_sup = [{user_id:'',user_name:'Assign to me'}]; + HotelSupplierlist; + HotelBookingList; + @ViewChild('dt') myTable; + To_Date_Start; + AllCurrency; + isOpenAddConfirmationNumberModal: boolean = false; + AgencyType = [ + { key: "B2C", value: "B2C" }, + { key: "B2B", value: "B2B" } + ]; + Date_Type = [ + 'Booking Date', + 'Check In', + 'Check Out', + 'Cancellation Deadline' + ] + StarRating = [ + { key: "0", value: "0 Star" }, + { key: "1", value: "1 Star" }, + { key: "2", value: "2 Star" }, + { key: "3", value: "3 Star" }, + { key: "4", value: "4 Star" }, + { key: "5", value: "5 Star" } + ]; + BookingStatus = [ + { key:"0", value:"In Progress"}, + { key:"1", value:"Pending"}, + { key:"3", value:"Confirmed"}, + { key:"4", value:"Cancelled"}, + { key:"6", value:"Reserved"} + ]; + PaymentStatus = [ + { key: "PENDING", value: "Pending" }, + { key: "FAILED", value: "Failed" }, + { key: "PAID", value: "Paid" }, + { key: "PARTLYPAID", value: "Partly Paid" }, + { key: "PAID(AUTHORIZED)", value: "Paid (Authorized)" }, + ]; + InvoiceStatus = [ + { key: "INVOICED", value: "Invoiced" }, + { key: "INVOICEFAILED", value: "Invoice Failed" }, + { key: "INVOICEPENDING", value: "Invoice Pending" }, + { key: "INVOICEVOID", value: "Invoice Void" }, + ]; + + constructor( + private router: Router, + private formBuilder: FormBuilder, + private apiserv: API, + private hotelBkgMgmtService: HotelBookingManagementService, + private fb: FormBuilder, + public commonserv: CommonFunctionService + ) { } + ngOnInit(): void { + // this.apiserv.setTitle('Hotel Booking'); + this.cols = [ + { field: 'assigned_user_name', header: 'Assign User' }, + { field: 'assigned_user_name_2', header: 'Assign Support' }, + { field: 'trip_id', header: 'Trip Id' }, + { field: 'booking_id', header: 'Booking Id' }, + { field: 'payment_transaction_id', header: 'Payment Transaction Id' }, + { field: 'hotel_name', header: 'Hotel Name' }, + { field: 'hotel_country', header: 'Country' }, + { field: 'hotel_city', header: 'City' }, + { field: 'new_booking_date', header: 'Booking Date' }, + { field: 'checkin_date', header: 'Check In Date' }, + { field: 'checkout_date', header: 'Check Out Date' }, + { field: 'no_of_nights', header: 'No Of Nights' }, + { field: 'no_of_rooms', header: 'No Of Rooms' }, + { field: 'room_names_custom', header: 'Room Name' }, + { field: 'lead_guest', header: 'Lead Guest' }, + { field: 'guest_nationality_code', header: 'Lead Nationality' }, + { field: 'guest_mobile_no', header: 'Lead Mobile Number' }, + { field: 'guest_email_address', header: 'Lead Email Address ' }, + { field: 'supplier_name', header: 'Supplier' }, + { field: 'supplier_ref_no', header: 'Supplier Ref no.' }, + { field: 'agency_name', header: 'Agency' }, + { field: 'agency_type', header: 'Agency Type' }, + { field: 'booking_by', header: 'Booking By' }, + { field: 'quality_check', header: 'Quality Check' }, + { field: 'payment_status_custom', header: 'Payment Status' }, + { field: 'promo_code', header: 'Promo Code' }, + { field: 'payment_mode_custom', header: 'Payment Mode' }, + { field: 'total', header: 'Total Booking Amount' }, + { field: 'booking_status_custom', header: 'Booking Status' }, + { field: 'thirdparty_invoice_number', header: 'Accounting Invoice No.' }, + { field: 'thirdparty_invoice_status', header: 'AC Invoice No.' }, + { field: "NotesStr", header: "notes" }, + ]; + this.exportColumns = this.cols.map(col => ({ + title: col.header, + dataKey: col.field + })); + this.User_Type = sessionStorage.getItem('userType'); + this.User_Name = sessionStorage.getItem('userName'); + this.User_Id[0]['user_id'] = sessionStorage.getItem('userId'); + this.User_Id_sup[0]['user_id'] = sessionStorage.getItem('userId'); + this.formInitialize(); + this.getAllCurrency(); + this.getCompanyList(); + this.getEntityList(); + this.getHotelSupplierListV2(); + this.getHotelCountryList(); + this.setDefaultDate(); + } + formInitialize() { + this.HotelBookingFiltersForm = this.formBuilder.group({ + fltr_trip_id: [''], + fltr_booking_id: [''], + fltr_payment_transaction_id: [''], + fltr_company: [], + fltr_branch: [], + fltr_agency: [], + fltr_agency_type: [], + fltr_hotel_name: [''], + fltr_country: [], + fltr_city: [], + fltr_star_rating: [], + fltr_supplier: [], + fltr_supplier_ref_no: [''], + fltr_guest_name: [''], + fltr_guest_contact_no: [''], + fltr_guest_email: [''], + fltr_booking_status: [], + fltr_payment_status: [], + fltr_invoice_status: [], + fltr_date: [null], + from_Date: [''], + To_Date: [''], + promo_code: [''], + assigned_user: [''], + under_cancel: [false], + is_promo_code_applied: [false], + fail_cancel: [false], + }); + } + + getCompanyList() { + this.hotelBkgMgmtService.getAllCompany().subscribe((res) => { + if (res) { + this.Companylist = res; + console.log(this.Companylist); + } + }); + } + getHotelCountryList() { + this.hotelBkgMgmtService.getAllHotelCountry().subscribe((res) => { + if (res) { + this.Countrylist = res; + console.log(this.Countrylist); + } + }); + } + getHotelCityList(country_code) { + this.Citylist = null; + this.hotelBkgMgmtService.getAllHotelCityByCountry(country_code).subscribe((res) => { + if (res) { + this.Citylist = res; + } + }); + } + getEntityList() { + this.hotelBkgMgmtService.getAllEntity().subscribe((res) => { + if (res) { + this.Entitylist = res; + } + }); + } + + getAllCurrency() { + this.hotelBkgMgmtService.getAllCurrency().subscribe((res) => { + if (res) { + this.AllCurrency = res; + } + }); + } + getHotelSupplierList() { + this.hotelBkgMgmtService.getAllHotelSupplier().subscribe((res) => { + if (res) { + this.HotelSupplierlist = res; + } + }); + } + getHotelSupplierListV2() { + this.hotelBkgMgmtService.getAllHotelSupplierV2().subscribe((res) => { + if (res) { + this.HotelSupplierlist = res; + } + }); + } + getFormatedDate(obj) { + if (obj != null && obj != '' && obj) { + return moment(obj).format("DD MMM YYYY"); + } else { + return ""; + } + } + /** + * @Description setting the min date for To Date calender + * @param Date From Date + */ + + applyToDate(date) { + this.To_Date_Start = date + } + + search_bookings() { + let form_data = this.HotelBookingFiltersForm.value; + let VData = securityFunctions.getSessionStorage('VData') ? JSON.parse(securityFunctions.getSessionStorage('VData')) : ''; + let reqData = { + user_time_zone: this.commonserv.GetTimeZoneGMT(), + trip_id: form_data.fltr_trip_id, + booking_id: form_data.fltr_booking_id, + payment_transaction_id: form_data.fltr_payment_transaction_id, + agency_id: form_data.fltr_agency, + agency_type: form_data.fltr_agency_type, + user_id: "", + company_id: form_data.fltr_company, + entity_id: form_data.fltr_branch, + hotel_name: form_data.fltr_hotel_name, + country: form_data.fltr_country, + city: form_data.fltr_city, + star_rating: form_data.fltr_star_rating, + vendor_id: VData ? VData.extranet_vendor_id : '', + supplier: '', + supplier_ref_no: form_data.fltr_supplier_ref_no, + guest_name: form_data.fltr_guest_name, + contact: form_data.fltr_guest_contact_no, + email: form_data.fltr_guest_email, + promo_code: form_data.promo_code, + assigned_user: form_data.assigned_user?form_data.assigned_user:'', + is_promo_code_applied: form_data.is_promo_code_applied ? form_data.is_promo_code_applied.toString() : '', + fail_cancel: form_data.fail_cancel, + booking_status: form_data.fltr_booking_status, + payment_status: form_data.fltr_payment_status === 'PAID(AUTHORIZED)' ? 'PAID' : form_data.fltr_payment_status, + invoice_status: form_data.fltr_invoice_status, + booking_from_date: '', + booking_to_date: '', + + check_in_from_date: '', + check_in_to_date: '', + + check_out_from_date: '', + check_out_to_date: '', + + cancellation_deadline_from : '', + cancellation_deadline_to : '', + under_cancel: form_data.under_cancel, + is_authorized: form_data.fltr_payment_status === 'PAID(AUTHORIZED)' ? '1' : '0' + }; + if (form_data.fltr_date == 'Booking Date') { + reqData.booking_from_date = this.getFormatedDate(form_data.from_Date); + reqData.booking_to_date = this.getFormatedDate(form_data.To_Date) + } + else if (form_data.fltr_date == 'Check In') { + reqData.check_in_from_date = this.getFormatedDate(form_data.from_Date); + reqData.check_in_to_date = this.getFormatedDate(form_data.To_Date); + } + else if (form_data.fltr_date == 'Check Out') { + reqData.check_out_from_date = this.getFormatedDate(form_data.from_Date); + reqData.check_out_to_date = this.getFormatedDate(form_data.To_Date); + } + else if (form_data.fltr_date == 'Cancellation Deadline') { + reqData.cancellation_deadline_from = this.getFormatedDate(form_data.from_Date); + reqData.cancellation_deadline_to = this.getFormatedDate(form_data.To_Date); + } + + this.hotelBkgMgmtService.getHotelBookingList(reqData).subscribe((res) => { + if (res) { + this.myTable.first = 0; + this.HotelBookingList = res.map((x,i) => { + let obj_currency = this.AllCurrency.filter(g => g.currency_code == x.currency); + let amountFormat = obj_currency && obj_currency.length > 0 ? obj_currency[0].amount_format : '#,###,###,###.##'; + let decimalSeperator = obj_currency && obj_currency.length > 0 ? obj_currency[0].decimal_seperator : '.'; + x['total'] = x.supplier_currency + ' ' + this.commonserv.amountFormater(x.supplier_total_amount, amountFormat, decimalSeperator); + x['custom_booking_date'] = x.booking_date; + x['room_names_custom'] = x.room_names ? x.room_names.replaceAll(' <-> ',', ') : x.room_names; + x["NotesStr"] = x.notes ? x.notes.join(',') : ""; + x['new_booking_date'] = moment(x.booking_date).format('DD MMM YYYY, HH:mm:ss'); + x['custom_booking_date'] = x.booking_date; + x.booking_date = this.commonserv.UtcToLocaleTime(x.booking_date, 'DD MMM YYYY, HH:mm:ss'); + x['custom_checkin_date'] = x.checkin_date + x.checkin_date = moment(x.checkin_date).format('DD MMM YYYY'); + x['custom_checkout_date'] = x.checkout_date + x.checkout_date = moment(x.checkout_date).format('DD MMM YYYY'); + x['booking_status_custom'] = this.map_booking_status(x.status_id, x.payment_status); + x['payment_status_custom'] = this.map_payment_status(x.payment_status, x.is_authorised); + x['payment_mode_custom'] = x.payment_mode; + x["Index"] = i; + if(x.assigned_user){ + x.assigned_user == this.User_Id[0]['user_id']? this.User_Id[0]['user_name'] = this.User_Name :this.AssignUserList[i] = [{user_id:x.assigned_user,user_name:x.assigned_user_name}]; + } + if(x.assigned_user_2){ + x.assigned_user_2 == this.User_Id_sup[0]['user_id']? this.User_Id_sup[0]['user_name'] = this.User_Name :this.AssignSupportList[i] = [{user_id:x.assigned_user_2,user_name:x.assigned_user_name_2}]; + } + this.AssignUser[i] = x.assigned_user?x.assigned_user:null; + this.AssignSupport[i] = x.assigned_user_2?x.assigned_user_2:null; + return x; + }); + console.log(this.HotelBookingList); + } + }); + + } + map_payment_status(status, is_authorised) { + if (status != null && status != "") { + switch (status) { + case "PAID": { + return is_authorised ? 'Paid (Authorized)' : 'Paid'; + } + case "PENDING": { + return 'Pending'; + } + case "FAILED": { + return 'Failed'; + } + case "PARTLYPAID": { + return 'Partly Paid'; + } + default : { + return 'Not Attempt'; + } + } + } else { + return 'Not Attempt'; + } + } + map_payment_mode(mode) { + if (mode != null && mode != "") { + switch (mode) { + case "WALLET": { + return 'Wallet'; + } + case "CREDIT": { + return 'Credit'; + } + case "PAYATAGENCY": { + return 'Pay at Agency'; + } + case "PAYMENTGATEWAY": { + return 'Payment Gateway'; + } + case "PAYMENTGETWAY": { + return 'Payment Gateway'; + } + default : { + return '-'; + } + } + } else { + return '-'; + } + } + map_booking_status(booking_status, payment_status) { + if (booking_status != null) { + if (booking_status == 3) { + return 'Confirmed'; + } + else if (booking_status == 4) { + return 'Cancelled'; + } + else if(booking_status == 6) { + return 'Reserved'; + } + else if ((booking_status == 0 || booking_status == 2) && payment_status != null) { + return 'Pending'; + } + else { + return 'In Progress'; + } + } else { + return 'In Progress'; + } + } + search_form_reset() { + this.formInitialize(); + this.Citylist = null; + } + select_booking(trip_id) { + let obj = { + id: trip_id + } + const url = this.router.serializeUrl( + this.router.createUrlTree(['/BookingManagement/HotelBooking/View'], { queryParams: obj }) + ); + window.open(url, '_blank'); + } + quality_check(trip_tbl_id) { + this.hotelBkgMgmtService.bookingQualityCheck(trip_tbl_id).subscribe((res) => { + if (res) { + this.search_bookings(); + console.log(res); + } + }); + } + onCountrySelect(e) { + this.HotelBookingFiltersForm.get('fltr_city').setValue(null); + e ? this.getHotelCityList(e.country_code) : this.Citylist = null; + } + + GetAssignUser(event,index){ + let Obj={ + user_type:this.User_Type, + keyword:event.target.value + } + if(event.target.value.length>=3){ + this.apiserv.PostGo('/BookingManagement/GetOrgUserSearchDetails',Obj).subscribe(data=>{ + this.AssignUserList[index] = data.Result + this.AssignSupportList[index] = data.Result + }) + } + } + GetAssignUserValue(event){ + let Obj={ + user_type:this.User_Type, + keyword:event.target.value + } + if(event.target.value.length>=3){ + this.apiserv.PostGo('/BookingManagement/GetOrgUserSearchDetails',Obj).subscribe(data=>{ + this.AssignUserSearch = data.Result + }) + } + } + Save_User(trip_id,Value,i,update_type){ + let Obj = { + trip_id:trip_id, + user_id:Value?Value:'', + user_type:this.User_Type, + update_type: update_type + } + if(!Value){ + if(update_type == '1') { + this.AssignUser[i] = null; + } else { + this.AssignSupport[i] = null; + } + }else if(Value == this.User_Id[0]['user_id'] && update_type == '1'){ + this.User_Id[0]['user_name'] = this.User_Name; + } else if(Value == this.User_Id_sup[0]['user_id'] && update_type == '2'){ + this.User_Id_sup[0]['user_name'] = this.User_Name; + } + this.apiserv.PostGo('/BookingManagement/AssignTripToOrgUser',Obj).subscribe(data=>{ + // this.AssignUserList = data.Result + this.commonserv.showMessage(data['Resp'],data['Message']) + }) + } + GetDatabyAgencyType() { + this.HotelBookingFiltersForm.get('fltr_agency').setValue(null); + } + + // Set Default for the from date & to date + setDefaultDate(){ + this.HotelBookingFiltersForm.get("fltr_date").setValue("Booking Date"); + let from_date = new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000); + let to_date = new Date(); + this.HotelBookingFiltersForm.get("from_Date").setValue(from_date); + this.HotelBookingFiltersForm.get("To_Date").setValue(to_date); + } + initConfirmationForm(itinerary_data) { + let obj = { + booking_id: itinerary_data != null && itinerary_data.booking_id != null && itinerary_data.booking_id != '' ? itinerary_data.booking_id : "", + // hotel_confirmation_number: itinerary_data != null && itinerary_data.hotel_confirmation_number != null && itinerary_data.hotel_confirmation_number != '' ? itinerary_data.hotel_confirmation_number.split(',') : [], + hotel_confirmation_number_date: itinerary_data != null && itinerary_data.hotel_confirmation_number_date != null && itinerary_data.hotel_confirmation_number_date != '' ? new Date(itinerary_data.hotel_confirmation_number_date) : new Date(), + hotel_confirmation_staff_name: itinerary_data != null && itinerary_data.hotel_confirmation_staff_name != null && itinerary_data.hotel_confirmation_staff_name != '' ? itinerary_data.hotel_confirmation_staff_name : "", + hotel_confirmation_staff_remarks: itinerary_data != null && itinerary_data.hotel_confirmation_staff_remarks != null && itinerary_data.hotel_confirmation_staff_remarks != '' ? itinerary_data.hotel_confirmation_staff_remarks : "", + supplier_confirmation_number: itinerary_data != null && itinerary_data.supplier_confirmation_number != null && itinerary_data.supplier_confirmation_number != '' ? itinerary_data.supplier_confirmation_number : "" + } + this.confirmationForm = this.fb.group({ + booking_id: [obj.booking_id], + // hotel_confirmation_number: [obj.hotel_confirmation_number], + hotel_confirmation_number:this.fb.array([]), + supplier_confirmation_number:[obj.supplier_confirmation_number], + hotel_confirmation_number_date: [obj.hotel_confirmation_number_date], + hotel_confirmation_staff_name: [obj.hotel_confirmation_staff_name], + hotel_confirmation_staff_remarks: [obj.hotel_confirmation_staff_remarks], + }); + let formarray = this.confirmationForm.controls['hotel_confirmation_number'] as FormArray; + if(itinerary_data?.room_list.length > 0){ + itinerary_data.room_list.forEach(data=>{ + formarray.push( + this.fb.group({ + room_name:data.room_name, + room_id:data.hotel_room_id, + confirmation_no:data.hotel_confirmation_number, + }) + ) + }) + } + } + + openConfirmationNumberModal( itinerary_data) { + this.initConfirmationForm(itinerary_data); + this.isOpenAddConfirmationNumberModal = true; + } + + saveConfirmationNumber() { + let obj = this.confirmationForm.value; + let postdata = { + booking_id:obj.booking_id, + supplier_confirmation_number:obj.supplier_confirmation_number, + hotel_confirmation_number_date:obj.hotel_confirmation_number_date, + hotel_confirmation_staff_name:obj.hotel_confirmation_staff_name, + hotel_confirmation_staff_remarks:obj.hotel_confirmation_staff_remarks, + hotel_rooms:[] + } + let hotel_confirm_number = []; + obj.hotel_confirmation_number.forEach(data=>{ + hotel_confirm_number.push( + { + hotel_room_id:data.room_id, + hotel_confirmation_number:data.confirmation_no + } + ); + }) + postdata.hotel_rooms = hotel_confirm_number; + this.hotelBkgMgmtService.saveConfirmationNumber(postdata).subscribe((data) => { + if(data?.resp){ + this.isOpenAddConfirmationNumberModal = false; + this.search_bookings(); + } + }); + } + +} diff --git a/src/app/modules/booking-management/hotel-booking/hotel-booking-view/hotel-booking-view.component.html b/src/app/modules/booking-management/hotel-booking/hotel-booking-view/hotel-booking-view.component.html new file mode 100644 index 0000000..5896f59 --- /dev/null +++ b/src/app/modules/booking-management/hotel-booking/hotel-booking-view/hotel-booking-view.component.html @@ -0,0 +1,594 @@ + +
+
+
+

Booking Details

+
+
+
+
+
+
+
Trip ID
+

{{ booking_customer_data.trip_id }}

+
+
+
Booking Date
+

{{ booking_customer_data.booking_date }}

+
+
+
+
+
Customer ID
+

{{ booking_customer_data.customer_id }}

+
+
+
Cutomer Contact
+

{{ booking_customer_data.customer_contact }}

+
+
+
Customer Email
+

{{ booking_customer_data.customer_email }}

+
+
+
Customer Profile Status
+

+ + {{booking_customer_data.customer_profile_status?'Active':'Deactive'}} + +

+
+
+
Lead Guest
+

{{ booking_customer_data.lead_guest }}

+
+
+
+
+
+
+ + + +
+
+
+
+
+
Hotel Name
+

{{ itinerary.hotel_name }} ({{ itinerary.hotel_star_category }} Star) , {{itinerary.default_hotel_name}} +

+
+
+
Hotel Address
+

{{ itinerary.hotel_address }} , {{itinerary.default_hotel_address}}

+
+
+
City Name
+

{{cityList[i].cityName}}

+
+
+
Country Name
+

{{cityList[i].country}}

+
+
+
Check In
+

{{ itinerary.checkin_date | date: "dd MMM yyyy" }}

+
+
+
Check Out
+

{{ itinerary.checkout_date | date: "dd MMM yyyy" }}

+
+
+
No of Nights
+

{{ itinerary.no_of_nights }}

+
+
+
No of Rooms
+

{{ itinerary.no_of_rooms }}

+
+
+
+
+
Booking ID
+

{{ itinerary.booking_id }}

+
+
+
Booking Status
+

{{ map_booking_status( itinerary.status_id, itinerary.payment_status ) }} {{itinerary.status_id == '6' && itinerary.fail_cancel ? '('+ 'Auto Cancellation Failed'+')' :''}}

+
+
+
Confirmation Number
+

{{itinerary.hotel_confirmation_number}}

+ + + Add + Edit + + +
+
+
Vendor Total Amount
+

{{itinerary.supplier_currency}} {{itinerary.supplier_total_amount}}

+
+
+
Total Original Booking Rate
+

{{itinerary.supplier_currency}} {{itinerary.supplier_total_amount}}

+
+
+
Total Vendor Cancellation Rate
+

{{itinerary.supplier_cancellation_currency}} {{itinerary.supplier_cancellation_amount}}

+
+ +
+
Session ID
+

{{ itinerary.booking_guid }}

+
+
+
Latitude | Longitude
+
+

{{itinerary.lan +' '}}

+
|
+

{{''+itinerary.lon}}

+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
Room No.Room NameConfirmation NumberMeal TypeGuestStatus
{{ i + 1 }}{{ room.room_name }}{{ room.room_supplier_confirmation_number }}{{ room.meal_plan }} {{ room.adt }} Adult, {{ room.chd }} Child + {{ map_room_status(room.room_booking_status) }}
+
+
+
+

Itinerary Data not found

+
+
+
+ + +
+
+
+
+
+
Booking ID
+

{{ bkg.booking_id }}

+
+
+
Booking Status
+

{{ map_booking_status(bkg.status_id, bkg.payment_status) }}

+
+
+
Booking Date
+

{{ bkg.booking_date }}

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
Room No.Room NameMeal TypeGuestGuest NameGuest Nationality
{{ i + 1 }} + {{ room.room_name }} + {{ room.meal_plan }} {{ room.adt }} Adult, {{ room.chd }} Child + +
+ {{ guest.guest_name }} + TBA + ({{ guest.guest_age }} years) +
+
{{itinerary_tab_data ? itinerary_tab_data[0].guest_nationality : ''}}
+
+
+ + + + + + + + + {{ bkg.special_request }}N/A + + +
Special Request:-
+
+
+
+
+

Passenger Data not found

+
+
+ + +
+
+
+
+
+
Trip Id
+

{{ costing_tab_data.trip_id }}

+
+
+
Booking Id
+

{{ bkg.booking_id }}

+
+ +
+
Contract Name
+

{{ bkg.Contract }}

+
+
+
Offer Details:
+

{{ bkg.Offer }}

+
+
+
Supplements:
+

{{ bkg.Supplement }}

+
+
+
+ +
+
Currency
+

{{ bkg.supplier_currency }}

+
+
+
Vendor Total
+

{{ bkg.supplier_amount }}

+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
Room No.RoomMeal TypeGuest CountLead GuestConfirmation Number
{{i+1}}{{Room_Details.room_name}}{{Room_Details.meal_plan}}{{ Room_Details.adt }} Adult, {{ Room_Details.chd }} Child{{Room_Details.lead_guest}}{{Room_Details.hotel_confirmation_number}} + + {{ Room_Details.hotel_confirmation_number ? 'Edit' : 'Add'}} + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date{{Date}}Total
Price{{Price}}{{Room_Details.Room_Allocation_Data.total}}
Allocation{{allocation}}-
Booked{{booked}}-
Available after booking{{book_avail}}-
+
+
+
+
+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Sr NoNoteNote ByNoted On
{{ i + 1 }}{{ note.note }}{{ note.note_by }}{{ note.noted_on }}
+ No data found +
+
+
+
+
+ + + + + + + + + + +
+ +
+
+
+
+ {{ c_p_room.room_name }} +
+
+
Supplier Cancellation Policy
+
+
  • From {{ can_p.from_date }} to {{ can_p.to_date }} charge of + {{ can_p.currency == '%' ? + can_p.amount + can_p.currency : can_p.currency + ' ' +can_p.amount }} + {{can_p.amount + ' ' +can_p.currency}} +
  • +
    +
    +

    {{can_p.text}}

    +
    +
    +
    +
    +
    Cancellation Policy Timezone: {{selectedItinerary && selectedItinerary.length > 0 ? selectedItinerary[0].timezone : ''}} {{cityList ? '(' + cityList[0].cityName + ')' : ''}}
    + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + +
    +
    + Invoice Number + + Please + enter invoice number +
    +
    + + + +
    + \ No newline at end of file diff --git a/src/app/modules/booking-management/hotel-booking/hotel-booking-view/hotel-booking-view.component.ts b/src/app/modules/booking-management/hotel-booking/hotel-booking-view/hotel-booking-view.component.ts new file mode 100644 index 0000000..931f708 --- /dev/null +++ b/src/app/modules/booking-management/hotel-booking/hotel-booking-view/hotel-booking-view.component.ts @@ -0,0 +1,1243 @@ +import { Component, ElementRef, OnInit, ViewChild } from "@angular/core"; +import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from "@angular/forms"; +import { ActivatedRoute, Router } from "@angular/router"; +import * as _ from 'lodash'; +import * as moment from "moment"; +import { MessageService, PrimeNGConfig } from 'primeng/api'; +import { forkJoin } from "rxjs"; +import { CommonFunctionService } from "src/app/core/common/common-function.service"; +import { ValidationService } from "src/app/core/common/validation.service"; +import { HotelBookingManagementService } from "src/app/core/services/HotelServices/hotel_booking_management.service"; +import { API } from "src/app/core/services/api.service"; + +@Component({ + selector: 'app-hotel-booking-view', + templateUrl: './hotel-booking-view.component.html', +}) +export class HotelBookingViewComponent { + dialogStatus = []; + isOpenAddNote: boolean = false; + VendorInvoiceForm:FormGroup; + isOpenCancellationPolicyModal: boolean = false; + isOpenAddConfirmationNumberModal: boolean = false; + isOpenAddVendorInvoiceNumberModal: boolean = false; + isOpenAddInvoiceNumberModal: boolean = false; + openInvoiceNumberModal() { + this.isOpenAddInvoiceNumberModal = true; + } + trip_id = ''; + active_tab; + AllCurrency; + addConfirmationNumber + AssignUserList; + User_Name; + User_Id = [{ user_id: '', user_name: 'Assign to me' }]; + AssignUser; + User_Type; + value: Date; + AllLanguage; + WhatsApp_Support; + agency_decimal_definer = '2'; + supplier_decimal_definer = '2'; + modalReference; + hotelBookingResp; + hotelItenaryResp; + hotelRoomDetail; + hotelGuestDetail; + hotelRoomGuestDetail; + hotelPassengerResp; + hotelCostingResp; + hotelPaymentResp; + hotelPaymentList; + hotelTotalAmount; + hotelNotesResp; + bookingId; + supplierNightlyRate = []; + hotelDocumentResp; + hotelSupplierCancellationPolicy; + hotelAgentCancellationPolicy; + hotelPassSupplierCancellationPolicy; + hotelPassAgentCancellationPolicy; + title = "appBootstrap"; + @ViewChild("NotesText") NotesInp: ElementRef; + closeResult: string = ""; + confirmationForm: FormGroup; + updateAccountingForm: FormGroup; + ConfirmationNo; + ConfirmationDate; + ConfirmationStaffName; + ConfirmationStaffRemarks; + agencyPolicyCharge; + supplierPolicyCharge; + bookingHistory: boolean = false; + bookingDetails: boolean = false; + ReleaseModal: boolean = false; + UpdateInStatus: boolean = false; + UpdAccountPayStatus: boolean = false; + rateBreakup: boolean = false; + CancellationDetails = null; + is_roomwise_policy: boolean = false; + checkBookingCancel = false; + CancellationRemarks = ''; + Cancellation_Agent_Amont = 0; + Cancellation_Supp_Amont = 0; + //SAGAR + currency_list = null; + booking_customer_data = null; + itinerary_tab_data = null; + guest_tab_data = null; + costing_tab_data = null; + payment_tab_data = null; + document_tab_data = null; + note_tab_data = null; + verification_tab_data = null; + veri_tab_data_mid = null; + selected__mail_document_type = ""; + mailForm: FormGroup; + StatusGroup: FormGroup; + hotelBookingForm: FormGroup; + notesform: FormGroup; + updateAccountingPayForm: FormGroup; + BookingStatus = [ + { key: 0, value: "In Progress" }, + { key: 1, value: "Pending" }, + { key: 3, value: "Confirmed" }, + { key: 4, value: "Cancelled" }, + { key: 6, value: "Reserved" } + ]; + thirdPartyInvoiceStatus = [ + {name: 'In Process' ,value: 'In Process'}, + {name: 'Pending' ,value: 'Pending'}, + {name: 'Success' ,value: 'Success'}, + {name: 'Failed' ,value: 'Failed'} + ] + paymentStatusList = [ + {name: 'Paid' ,value: 'PAID'}, + {name: 'Partly Paid' ,value: 'PARTLYPAID'}, + ] + paymentModeList = [ + {name: 'Payment Gateway', value: 'PAYMENTGATEWAY'}, + {name: 'Wallet Adjustment', value: 'WALLET'}, + {name: 'Accounting System Ledger', value: 'ACCONTING'}, + ] + tab_data_status = { itinerary: "loading", passenger: "loading", costing: "loading", payment: "loading", document: "loading" }; + features; + AllPaymentData; + constructor( + private router: Router, + private route: ActivatedRoute, + private fb: FormBuilder, + public APIServ: HotelBookingManagementService, + private ApiServ: API, + private messageService: MessageService, + public validationServ: ValidationService, + private primengConfig: PrimeNGConfig, + public commonserv: CommonFunctionService, + ) { + this.route.queryParams.subscribe(params => { + this.trip_id = params['id']; + }); + } + + // private getDismissReason(reason: any): string { + // if (reason === ModalDismissReasons.ESC) { + // return "by pressing ESC"; + // } else if (reason === ModalDismissReasons.BACKDROP_CLICK) { + // return "by clicking on a backdrop"; + // } else { + // return `with: ${reason}`; + // } + // } + ngOnInit(): void { + // this.ApiServ.setTitle('Hotel Booking'); + this.getFeatures('2308111245266426287'); + this.initFormsGroup(); + this.GetAllData(); + this.initConfirmationForm(null); + this.primengConfig.ripple = true; + this.User_Type = sessionStorage.getItem('userType'); + this.User_Name = sessionStorage.getItem('userName'); + this.User_Id[0]['user_id'] = sessionStorage.getItem('userId'); + } + + GetAllData(){ + forkJoin( + this.getCurrencyList(), + this.APIServ.getAllCurrency(), + this.getPageHeadersDetails(), + this.GetAllLAng(), + ).subscribe(res=>{ + if(res?.length > 0){ + this.AllCurrency = res[0]; + this.currency_list = res[1]; + if (res[2]) { + this.booking_customer_data = res[2]; + this.booking_customer_data.booking_date = this.booking_customer_data.booking_date ? this.commonserv.UtcToLocaleTime(this.booking_customer_data.booking_date, 'DD MMM YYYY, HH:mm:ss') : null; + this.booking_customer_data.customer_contact = this.booking_customer_data.customer_contact != null && this.booking_customer_data.customer_contact.trim() != '' ? (this.booking_customer_data.customer_contact.charAt(0) == '+' || this.booking_customer_data.customer_contact.charAt(0) == '-' ? this.booking_customer_data.customer_contact : '+' + this.booking_customer_data.customer_contact) : ''; + this.AssignUser = this.booking_customer_data.assigned_user_name?this.booking_customer_data.assigned_user_name:null; + } + this.AllLanguage = res[3]; + this.getItineraryTabDetails(); + } + }) + } + + initFormsGroup() { + this.StatusGroup = this.fb.group({ + statusArr: this.fb.array([]) + }); + + this.hotelBookingForm = this.fb.group({ + reasonOfNote: this.validationServ.required + }); + this.notesform = this.fb.group({ + Note: this.validationServ.required + }); + this.updateAccountingForm = this.fb.group({ + acc_invoice_status: this.validationServ.required, + acc_invoice_number: this.validationServ.required, + acc_ref_number: this.validationServ.required + }); + + this.updateAccountingPayForm = this.fb.group({ + booking_id: this.validationServ.required, + payment_status: this.validationServ.required, + payment_mode: this.validationServ.required, + currency: [""], + pending_amt: [0], + amount: this.validationServ.required, + receipt_no: this.validationServ.required, + remark: this.validationServ.required, + }); + this.VendorInvoiceForm = this.fb.group({ + vendor_invoice_number : this.validationServ.required + }); + }; + + get statusArr() { + return this.StatusGroup.get('statusArr') as FormArray; + }; + + showStatusDialog(ind) { + this.dialogStatus[ind] = true; + } + + CreateStatusGroup(data) { + if (data.length > 0 && data) { + data.forEach((e, i) => { + this.dialogStatus[i] = false; + this.statusArr.push(this.fb.group({ + status: [e.status_id, Validators.required] + })); + }); + }; + }; + + + tabClick(e) { + console.log(e); + switch (e.index) { + case 0: { + this.active_tab = e.index; + this.getItineraryTabDetails(); + break; + } + case 1: { + this.active_tab = e.index; + this.getPassengerTabDetails(); + break; + } + case 2: { + this.active_tab = e.index; + this.getCostingTabDetails(); + break; + } + case 3: { + this.active_tab = e.index; + this.getBookingNoteDetails(); + break; + } + case 4: { + this.getDocumentTabDetails(); + break; + } + case 5: { + this.getBookingNoteDetails(); + break; + } + case 6: { + this.getHBookingDetails(); + break; + } + } + } + getPageHeadersDetails() { + this.booking_customer_data = null; + return this.APIServ.getCustomerDetails(this.trip_id) + } + getItineraryTabDetails() { + this.tab_data_status.itinerary = "loading"; + this.itinerary_tab_data = null; + this.APIServ.GetItenaryDetails(this.trip_id).subscribe((data: any) => { + if (data) { + this.CreateStatusGroup(data); + this.itinerary_tab_data = data; + this.WhatsApp_Support = data[0] ? data[0].is_whatsapp_notify : false;//added is whatapp check of agency + if (this.itinerary_tab_data[0].payment_mode) { + this.updateAccountingPayForm.get('payment_mode').setValue(this.itinerary_tab_data[0].payment_mode); + } + if (this.itinerary_tab_data.assigned_user) { + this.itinerary_tab_data.assigned_user == this.User_Id[0]['user_id'] ? this.User_Id[0]['user_name'] = this.User_Name : this.itinerary_tab_data = [{ user_id: this.itinerary_tab_data.assigned_user, user_name: this.itinerary_tab_data.assigned_user_name }] + } + let hotelCities = []; + if (this.itinerary_tab_data.length > 0 && this.itinerary_tab_data) { + this.itinerary_tab_data.forEach(e => { + e.reserved_timeline_local = e.reserved_timeline_local ? this.commonserv.UtcToLocaleTime(e.reserved_timeline_local, 'DD MMM YYYY, HH:mm:ss') : e.reserved_timeline_local; + let onlyTime = e.user_timezone ? e.user_timezone.replace('UTC', '') : ''; + let obj_supplier_currency = this.currency_list.find(x => x.currency_code == e['supplier_currency']); + let supplier_decimal_definer = obj_supplier_currency ? obj_supplier_currency.currency_deci_definer : '2'; + e['supplier_total_amount'] = e['supplier_total_amount'] ? this.commonserv.amountDefiner(e['supplier_total_amount'],supplier_decimal_definer) : e['supplier_total_amount']; + if (onlyTime) { + let time = onlyTime.replace(')', ' Local Time)'); + e.user_timezone = time; + } + if (e.hotel_city_code) { + hotelCities.push(e.hotel_city_code); + }; + e['lan'] = null; + e['lon'] = null; + e['Ip'] = null; + if (e?.booking_user_lat_lon) { + let booking_user_IP_details = JSON.parse(e.booking_user_lat_lon); + e['lan'] = booking_user_IP_details ? booking_user_IP_details?.lat : null + e['lon'] = booking_user_IP_details ? booking_user_IP_details?.lon : null + e['Ip'] = booking_user_IP_details ? booking_user_IP_details?.query : null + }; + }) + } + if (hotelCities.length > 0 && hotelCities) { + this.GetSpecifiCitydetail(hotelCities); + } + this.tab_data_status.itinerary = "success"; + } else { + this.tab_data_status.itinerary = "failed"; + } + }, (error) => { + this.tab_data_status.itinerary = "failed"; + }); + } + cityList = null; + /** + * @author Abdul Razzak + * to get Specific city list + * @param val city code + */ + GetSpecifiCitydetail(val) { + let obj = { + cityCodes: val, + }; + this.APIServ.GethotelCityName(obj).subscribe((data) => { + if (data) { + this.cityList = data; + } else { + this.cityList = null; + } + }); + } + + mapHotelBkgDeadline(data) { + let agent_cancellation_policy = data.cancellation_policy.filter(x => x.from_type == 'agent').sort(function (a, b) { return a.sequence_no - b.sequence_no }); + let dateTimeArray = []; + if (agent_cancellation_policy && agent_cancellation_policy.length > 0) { + agent_cancellation_policy.forEach(cp => { + let date = cp.deadline_date_from != null && cp.deadline_date_from != '' ? this.commonserv.UtcToLocaleTime(cp.deadline_date_from, 'DD MMM YYYY') : ''; + let time = cp.deadline_time_from != null && cp.deadline_time_from != '' ? this.commonserv.UtcToLocaleTime(cp.deadline_time_from, 'hh:mm A') : ''; + let datetime = date && date != '' ? `${date} ${time}` : '' + if (datetime && datetime != null) { + dateTimeArray.push(datetime); + } + }); + + let $this = this; + dateTimeArray = dateTimeArray.sort(function (a, b) { return parseInt($this.commonserv.UtcToLocaleTime(a, 'YYYYMMDDHHmm')) - parseInt($this.commonserv.UtcToLocaleTime(b, 'YYYYMMDDHHmm')) }); + } + return dateTimeArray && dateTimeArray.length > 0 ? dateTimeArray[0] : ''; + } + + getPassengerTabDetails() { + this.tab_data_status.passenger = "loading"; + this.guest_tab_data = null; + this.APIServ.getPassengerDetails(this.trip_id).subscribe((data: any) => { + if (data) { + this.guest_tab_data = data; + this.guest_tab_data.map(li => { + li.booking_date = this.commonserv.UtcToLocaleTime(li.booking_date, 'DD MMM YYYY, HH:mm:ss') + }) + this.tab_data_status.passenger = "success"; + } else { + this.tab_data_status.passenger = "failed"; + } + }, (error) => { + this.tab_data_status.passenger = "failed"; + }); + } + getCostingTabDetails() { + this.tab_data_status.costing = "loading"; + this.costing_tab_data = null; + this.APIServ.getCostingDetails(this.trip_id).subscribe((data: any) => { + if (data) { + let booking_list = []; + data.map(bkg => { + let Supplements = []; + let contract_name = []; + let Offers = []; + let room_name = []; + let booking_count = 1; + let obj_agency_currency = this.currency_list.find(x => x.currency_code == bkg.currency); + let agency_decimal_definer = obj_agency_currency ? obj_agency_currency.currency_deci_definer : '2'; + let obj_supplier_currency = this.currency_list.find(x => x.currency_code == bkg.room_rate_list[0].supplier_currency); + let supplier_decimal_definer = obj_supplier_currency ? obj_supplier_currency.currency_deci_definer : '2'; + + bkg.room_rate_list.map(room_rate_det=>{ + room_rate_det['Date']=[]; + room_rate_det['Price']=[]; + room_rate_det['Allocation']=[]; + room_rate_det['Booked']=[]; + room_rate_det['Available_after_booking']=[]; + room_rate_det['total'] = 0; + let nightly_rate = room_rate_det.nightly_rate ? JSON.parse(room_rate_det.nightly_rate) : undefined; + if(room_rate_det.contract_name){ + contract_name.push(room_rate_det.contract_name); + } + let Supplement_obj = room_rate_det.supplements ? JSON.parse(room_rate_det.supplements) : undefined; + if(Supplement_obj){ + Supplement_obj[0].forEach(supp_data=>{ + Supplements.push(supp_data.Description); + }) + } + let Offer_Obj = room_rate_det.offers ? JSON.parse(room_rate_det.offers) : undefined; + if(Offer_Obj?.length > 0){ + Offer_Obj.forEach(e=>{ + Offers.push(e.offer_name); + }) + } + if(nightly_rate){ + room_name.push(room_rate_det.room_name); + if(room_name.includes(room_rate_det.room_name)){ + let filter_data = room_name.filter(e=>e == room_rate_det.room_name); + booking_count = filter_data.length; + } + nightly_rate.forEach(night_rate=>{ + let booked = bkg.room_list?.[0].room_booking_status == '3' ? (parseInt(night_rate.booked ) + booking_count) : night_rate.booked; + let price_obj = night_rate.PriceDetails.find(e=>e.PriceDetailType == 'BasePrice') + room_rate_det.Date.push(night_rate.date); + room_rate_det.Allocation.push(night_rate.allocation); + room_rate_det.Booked.push(booked); + room_rate_det.Price.push(price_obj.PriceInSourceCurrency); + room_rate_det.Available_after_booking.push(night_rate.allocation != 'FREESALE' ? (night_rate.allocation - booked) : night_rate.allocation); + room_rate_det.total += price_obj.PriceInSourceCurrency; + }); + room_rate_det.total = this.commonserv.amountDefiner(room_rate_det.total,supplier_decimal_definer) + } + }) + let room_details_arr = []; + bkg.room_list.forEach((room_det,i)=>{ + room_det['hotel_confirmation_number'] = room_det.hotel_confirmation_number; + room_det['booking_id'] = bkg.booking_id; + room_det['lead_guest'] = this.booking_customer_data.lead_guest; + room_det['hotel_confirmation_number_date'] = bkg.hotel_confirmation_number_date; + room_det['hotel_confirmation_staff_name'] = bkg.hotel_confirmation_staff_name; + room_det['hotel_confirmation_staff_remarks'] = bkg.hotel_confirmation_staff_remarks; + room_det['supplier_confirmation_number'] = bkg.supplier_confirmation_number; + room_det['Room_Allocation_Data'] = bkg.room_rate_list[i]; + room_details_arr.push(room_det); + }) + Offers = [...new Set(Offers)]; + let obj_booking = { + booking_id: bkg.booking_id, + invoice_no: bkg.vendor_invoice_number, + agency_currency: bkg.currency, + supplier_currency: bkg.room_rate_list[0].supplier_currency, + supplier_name: bkg.supplier_name, + supplier_amount: this.commonserv.amountDefiner(bkg.supplier_total_amount, supplier_decimal_definer), + total_amount: this.commonserv.amountDefiner(bkg.agent_total_amount, agency_decimal_definer), + rate_list_total_amount: this.commonserv.amountDefiner(bkg.agent_total_amount_without_buffer, agency_decimal_definer), + invoice_number: bkg.invoice_number, + Supplement: Supplements.join(', '), + Contract: contract_name.join(', '), + Offer: Offers.join(', '), + adjustment: this.commonserv.amountDefiner(bkg.buffer, agency_decimal_definer), + commercial_plan: bkg.commercial_plan, + adt: bkg.adt, + chd: bkg.chd, + promo_name: bkg.promo_code, + redeemed_points: bkg.redeemed_points, + loyalty_point_discount: bkg.loyalty_point_discount, + promo_amt: this.commonserv.amountDefiner(bkg.promo_total_discount, agency_decimal_definer), + hold_amount: this.commonserv.amountDefiner(bkg.hold_amount, agency_decimal_definer), + room_details_list:room_details_arr + } + booking_list.push(obj_booking); + }); + let obj_agency_currency = this.currency_list.find(x => x.currency_code == data[0].currency); + let agency_decimal_definer = obj_agency_currency ? obj_agency_currency.currency_deci_definer : '2'; + let obj_costing_tab = { + trip_id: data[0].trip_id, + coupon_code: "", + coupon_discount: this.commonserv.amountDefiner(0, agency_decimal_definer), + currency: data[0].currency, + payment_gateway: data[0].payment_gateway_name, + pg_fee: this.commonserv.amountDefiner(data[0].pg_fee, agency_decimal_definer), + thirdparty_invoice_number: data[0].thirdparty_invoice_number, + thirdparty_invoice_status: data[0].thirdparty_invoice_status, + thirdparty_reference_number: data[0].thirdparty_reference_number, + booking_list: booking_list, + } + this.costing_tab_data = obj_costing_tab; + this.tab_data_status.costing = this.costing_tab_data ? "success" : "failed"; + console.log(this.costing_tab_data); + } else { + this.tab_data_status.costing = "failed"; + } + }, (error) => { + this.tab_data_status.costing = "failed"; + }); + } + getPaymentTabDetails() { + this.tab_data_status.payment = "loading"; + this.payment_tab_data = null; + this.APIServ.getPaymentDetails(this.trip_id).subscribe((data: any) => { + if (data) { + this.payment_tab_data = data; + if (this.payment_tab_data) { + let obj_agency_currency = this.currency_list.find(x => x.currency_code == this.payment_tab_data.booking_list[0].invoice_currency); + this.agency_decimal_definer = obj_agency_currency ? obj_agency_currency.currency_deci_definer : '2'; + + this.payment_tab_data.total_amount = this.commonserv.amountDefiner(this.payment_tab_data.total_amount, this.agency_decimal_definer); + this.payment_tab_data.total_paid_amount = this.commonserv.amountDefiner(this.payment_tab_data.total_paid_amount, this.agency_decimal_definer); + this.payment_tab_data.total_pending_amount = this.commonserv.amountDefiner(this.payment_tab_data.total_pending_amount, this.agency_decimal_definer); + + this.updateAccountingPayForm.get('currency').setValue(this.payment_tab_data.booking_list[0].invoice_currency); + this.updateAccountingPayForm.get('booking_id').setValue(this.payment_tab_data.booking_list[0].booking_id); + this.updateAccountingPayForm.get('pending_amt').setValue(this.payment_tab_data.total_pending_amount); + + if (this.payment_tab_data.booking_list) { + this.payment_tab_data.booking_list.map(x => { + x.invoice_number = x.invoice_number != null && x.invoice_number != '' ? x.invoice_number : 'Pending'; + x.payment_gateway_name = x.payment_gateway_name != null && x.payment_gateway_name != '' ? x.payment_gateway_name : 'NA'; + x.transaction_number = x.transaction_number != null && x.transaction_number != '' ? x.transaction_number : 'NA'; + x.invoice_date_and_time = x.invoice_date_and_time != null ? this.commonserv.UtcToLocaleTime(x.invoice_date_and_time, 'DD MMM YYYY, HH:mm:ss') : 'NA'; + x.invoice_due_date = x.invoice_due_date != null ? this.commonserv.UtcToLocaleTime(x.invoice_due_date, 'DD MMM YYYY, HH:mm:ss') : 'NA'; + x.invoice_paid_amount = this.commonserv.amountDefiner(x.invoice_paid_amount, this.agency_decimal_definer); + x.amount = this.commonserv.amountDefiner(x.amount, this.agency_decimal_definer); + }); + } + } + this.tab_data_status.payment = "success"; + } else { + this.tab_data_status.payment = "failed"; + } + }, (error) => { + this.tab_data_status.payment = "failed"; + }); + } + getDocumentTabDetails() { + this.tab_data_status.document = "loading"; + this.document_tab_data = null; + this.APIServ.getDocumentDetails(this.trip_id).subscribe((data: any) => { + if (data) { + this.document_tab_data = data.filter(x => x.document_number != null && x.document_number != ''); + this.document_tab_data.map(li => { + li.issue_date = this.commonserv.UtcToLocaleTime(li.issue_date, 'DD MMM YYYY, HH:mm:ss') + }) + this.tab_data_status.document = this.document_tab_data ? "success" : "failed"; + } else { + this.tab_data_status.document = "failed"; + } + }, (error) => { + this.tab_data_status.document = "failed"; + }); + } + getBookingNoteDetails() { + this.note_tab_data = null; + this.APIServ.getNotesDetail(this.trip_id).subscribe((data) => { + if (data) { + this.note_tab_data = data; + this.note_tab_data.map(li => { + li.noted_on = this.commonserv.UtcToLocaleTime(li.noted_on, 'DD MMM YYYY, HH:mm:ss') + }) + } + }, (error) => { + }); + } + + getHBookingDetails() { + this.APIServ.getHotelBookingDetail(this.itinerary_tab_data[0].booking_id).subscribe((data) => { + if (!data || !Array.isArray(data) || data.length < 2) { + console.error('Invalid data format:', data); + return; + } + let SuppData = data.filter(li => li.type == 'Supplier')[0] + let AgencyData = data.filter(li => li.type == 'Agency')[0] + const extractRoomData = (roomData) => { + return roomData.rooms.reduce((acc, room) => { + acc.room_names.push(room.roomName); + acc.board_types.push(room.boardType); + acc.guests.push(room.guests); + acc.lead_guest.push(room.leadGuest); + return acc; + }, { + room_names: [], + board_types: [], + guests: [], + lead_guest: [] + }); + }; + + const verificationTabData = extractRoomData(SuppData); + const verificationTabDataMid = extractRoomData(AgencyData); + this.verification_tab_data = { + ...SuppData, + ...verificationTabData + }; + + this.veri_tab_data_mid = { + ...AgencyData, + ...verificationTabDataMid + }; + + const setCancellationCharge = (data) => { + switch (data.cancelType) { + case 'Night': + data.SupCanclCharge = `${data.cancellationCharge} Night`; + data.AgencyCanclCharge = `${data.agentCancellationCharge} Night`; + break; + case 'Percentage': + data.SupCanclCharge = `${data.cancellationCharge} %`; + data.AgencyCanclCharge = `${data.agentCancellationCharge} %`; + break; + case 'Flat': + data.SupCanclCharge = `${data.currency} ${data.cancellationCharge}`; + data.AgencyCanclCharge = `${data.agencyCurrency} ${data.agentCancellationCharge}`; + break; + default: + break; + } + }; + + setCancellationCharge(this.veri_tab_data_mid); + setCancellationCharge(this.verification_tab_data); + if (this.AllCurrency && this.AllCurrency.length > 0 && this.veri_tab_data_mid.currency) { + let obj_currency = this.AllCurrency.find(x => x.currency_code == this.veri_tab_data_mid.currency); + let agnecy_currency = this.AllCurrency.find(x => x.currency_code == this.veri_tab_data_mid.agencyCurrency); + + let amount_format = obj_currency ? obj_currency.amount_format : ""; + let decimal_seperator = obj_currency ? obj_currency.decimal_seperator : ""; + let agnecy_amount_format = obj_currency ? agnecy_currency.amount_format : ""; + let agnecy_decimal_seperator = obj_currency ? agnecy_currency.decimal_seperator : ""; + this.veri_tab_data_mid.supplierAmount = this.commonserv.amountFormater(this.veri_tab_data_mid.supplierAmount, agnecy_amount_format, agnecy_decimal_seperator) + this.veri_tab_data_mid.bookingAmount = this.commonserv.amountFormater(this.veri_tab_data_mid.bookingAmount, agnecy_amount_format, agnecy_decimal_seperator) + this.verification_tab_data.supplierAmount = this.commonserv.amountFormater(this.verification_tab_data.supplierAmount, amount_format, decimal_seperator) + this.verification_tab_data.bookingAmount = this.commonserv.amountFormater(this.verification_tab_data.bookingAmount, amount_format, decimal_seperator) + + } + this.veri_tab_data_mid.isBoardH = JSON.stringify(verificationTabData.board_types) != JSON.stringify(verificationTabDataMid.board_types); + this.veri_tab_data_mid.isRoomH = JSON.stringify(verificationTabData.room_names) != JSON.stringify(verificationTabDataMid.room_names); + this.veri_tab_data_mid.isGuestH = JSON.stringify(verificationTabData.guests) != JSON.stringify(verificationTabDataMid.guests); + this.veri_tab_data_mid.isLeadGH = JSON.stringify(verificationTabData.lead_guest) != JSON.stringify(verificationTabDataMid.lead_guest); + this.veri_tab_data_mid.isSupCanc = new Date(this.verification_tab_data.cancellationDeadline?.hotelCancellationDeadline)?.getTime() < new Date(this.veri_tab_data_mid.cancellationDeadline?.hotelCancellationDeadline)?.getTime(); + this.veri_tab_data_mid.isAgenCanc = new Date(this.verification_tab_data.cancellationDeadline?.utcCancellationDeadline)?.getTime() < new Date(this.veri_tab_data_mid.cancellationDeadline?.utcCancellationDeadline)?.getTime(); + this.veri_tab_data_mid.isInDateH = moment(this.verification_tab_data.checkInDate).format('dd MMM YYYY') != moment(this.veri_tab_data_mid.checkInDate).format('dd MMM YYYY'); + this.veri_tab_data_mid.isOutDateH = moment(this.verification_tab_data.checkOutDate).format('dd MMM YYYY') != moment(this.veri_tab_data_mid.checkOutDate).format('dd MMM YYYY'); + }, (error) => { + console.error('Error fetching hotel booking details:', error); + }); + } + + getCurrencyList(){ + return this.ApiServ.AdminGet("/CurrencyMaster/GetAllCurrencies") + } + + initConfirmationForm(itinerary_data) { + let obj = { + booking_id: itinerary_data != null && itinerary_data.booking_id != null && itinerary_data.booking_id != '' ? itinerary_data.booking_id : "", + // hotel_confirmation_number: itinerary_data != null && itinerary_data.hotel_confirmation_number != null && itinerary_data.hotel_confirmation_number != '' ? itinerary_data.hotel_confirmation_number.split(',') : [], + hotel_confirmation_number_date: itinerary_data != null && itinerary_data.hotel_confirmation_number_date != null && itinerary_data.hotel_confirmation_number_date != '' ? new Date(itinerary_data.hotel_confirmation_number_date) : new Date(), + hotel_confirmation_staff_name: itinerary_data != null && itinerary_data.hotel_confirmation_staff_name != null && itinerary_data.hotel_confirmation_staff_name != '' ? itinerary_data.hotel_confirmation_staff_name : "", + hotel_confirmation_staff_remarks: itinerary_data != null && itinerary_data.hotel_confirmation_staff_remarks != null && itinerary_data.hotel_confirmation_staff_remarks != '' ? itinerary_data.hotel_confirmation_staff_remarks : "", + supplier_confirmation_number: itinerary_data != null && itinerary_data.supplier_confirmation_number != null && itinerary_data.supplier_confirmation_number != '' ? itinerary_data.supplier_confirmation_number : "" + } + this.confirmationForm = this.fb.group({ + booking_id: [obj.booking_id], + // hotel_confirmation_number: [obj.hotel_confirmation_number], + hotel_confirmation_number:this.fb.array([]), + supplier_confirmation_number:[obj.supplier_confirmation_number], + hotel_confirmation_number_date: [obj.hotel_confirmation_number_date], + hotel_confirmation_staff_name: [obj.hotel_confirmation_staff_name], + hotel_confirmation_staff_remarks: [obj.hotel_confirmation_staff_remarks], + }); + let formarray = this.confirmationForm.controls['hotel_confirmation_number'] as FormArray; + if(itinerary_data?.room_list?.length > 0){ + itinerary_data.room_list.forEach(data=>{ + formarray.push( + this.fb.group({ + room_name:data.room_name, + room_id:data.hotel_room_id, + confirmation_no:data.hotel_confirmation_number, + }) + ) + }) + }else if(itinerary_data){ + formarray.push( + this.fb.group({ + room_name:itinerary_data.room_name, + room_id:itinerary_data.hotel_room_id, + confirmation_no:itinerary_data.hotel_confirmation_number, + }) + ) + } + } + + // open(content: any) { + // this.modalReference = this.modalService + // .open(content, { ariaLabelledBy: "" }) + // .result.then( + // (result) => { + // this.closeResult = `Closed with: ${result}`; + // }, + // (reason) => { + // this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; + // } + // ); + // } + openConfirmationNumberModal(content: any, itinerary_data) { + this.initConfirmationForm(itinerary_data); + this.isOpenAddConfirmationNumberModal = true; + } + openVendorInvoiceNumberModal(id,invoice) { + this.isOpenAddVendorInvoiceNumberModal = true; + this.VendorInvoiceForm = this.fb.group({ + booking_id:id, + vendor_invoice_number:[invoice,Validators.compose([Validators.required])] + }) + } + saveConfirmationNumber() { + let obj = this.confirmationForm.value; + let postdata = { + booking_id:obj.booking_id, + supplier_confirmation_number:obj.supplier_confirmation_number, + hotel_confirmation_number_date:obj.hotel_confirmation_number_date, + hotel_confirmation_staff_name:obj.hotel_confirmation_staff_name, + hotel_confirmation_staff_remarks:obj.hotel_confirmation_staff_remarks, + hotel_rooms:[] + } + let hotel_confirm_number = []; + obj.hotel_confirmation_number.forEach(data=>{ + hotel_confirm_number.push( + { + hotel_room_id:data.room_id, + hotel_confirmation_number:data.confirmation_no + } + ); + }) + postdata.hotel_rooms = hotel_confirm_number; + this.APIServ.saveConfirmationNumber(postdata).subscribe((data) => { + if(data?.resp){ + this.isOpenAddConfirmationNumberModal = false; + if(this.active_tab == 2){ + this.getCostingTabDetails(); + }else { + this.getItineraryTabDetails(); + } + } + }); + } + saveNotes() { + if (this.notesform.status == 'INVALID') { + this.validationServ.showValidationsMsg(this.notesform); + return; + } + let obj = { + booking_refrence_number: this.trip_id, + booking_notes_free_text: this.notesform.get('Note').value, + }; + this.APIServ.saveNotesDetail(obj).subscribe((data) => { + if (data) { + this.getBookingNoteDetails(); + this.commonserv.showMessage(data["resp"], data["respMsg"]); + // this.modalService.dismissAll(); + } else { + this.commonserv.showMessage(data["resp"], data["respMsg"]); + } + this.isOpenAddNote = false; + }); + } + + getPriceDetailType(breakupDetails, priceType) { + try { + let price = breakupDetails.PriceDetails.filter( + (el) => el.PriceDetailType == priceType + )[0].Price; + return price; + } catch { + return 0; + } + } + + + map_booking_status(booking_status, payment_status) { + if (booking_status != null) { + if (booking_status == 3) { + return 'Confirmed'; + } + else if (booking_status == 4) { + return 'Cancelled'; + } + else if ((booking_status == 0 || booking_status == 2) && payment_status != null) { + return 'Pending'; + } + else if (booking_status == 6) { + return 'Reserved'; + } + else { + return 'In Progress'; + } + } else { + return 'In Progress'; + } + } + map_room_status(status) { + if (status != null) { + switch (status) { + case '0': { + return 'In Progress'; + } + case '2': { + return 'Failed'; + } + case '3': { + return 'Confirmed'; + } + case '4': { + return 'Cancelled'; + } + case '6': { + return 'Reserved'; + } + default: { + return 'In Progress'; + } + } + } else { + return 'In Progress'; + } + } + map_payment_status(status, is_authorised) { + if (status != null && status != "") { + switch (status) { + case "PAID": { + return is_authorised ? 'Paid (Authorized)' : 'Paid'; + } + case "PENDING": { + return 'Pending'; + } + case "FAILED": { + return 'Failed'; + } + case "PARTLYPAID": { + return 'Partly Paid'; + } + default :{ + return 'Not Attempt'; + } + } + } else { + return 'Not Attempt'; + } + } + + // + // + // + displayModal: boolean; + + displayBasic: boolean; + + displayBasic2: boolean; + + bookingIdIndex = 0; + + displayMaximizable: boolean; + + displayPosition: boolean; + + position: string; + + isOpenSendEmailModal: boolean = false; + isOpenAddBookingCancelModal: boolean = false; + selectedItinerary = []; + showModalDialog() { + this.displayModal = true; + } + bookingHistoryModal() { + this.bookingHistory = true; + } + bookingIdModal() { + this.bookingDetails = true; + } + ReleaseModalBtn(ind) { + this.ReleaseModal = true; + this.bookingIdIndex = ind; + } + closeModalBtn() { + this.ReleaseModal = false; + } + closeAccountPayStatusBtn() { + this.UpdAccountPayStatus = false; + } + closeUpdateAccountingInvoice() { + this.UpdateInStatus = false; +} + UpdateAccountingInvoice() { + this.UpdateInStatus = true; + } + UpdAccountPayStatusBtn() { + this.UpdAccountPayStatus = true; + } + rateBreakupModal(obj_booking) { + let obj = []; + if (obj_booking.room_rate_list != null) { + obj_booking.room_rate_list.map(room => { + obj.push({ + room_name: room.room_name, + nightly_rate: room.nightly_rate != null ? this.mapNightlyRate(JSON.parse(room.nightly_rate)) : null + }); + }); + } + this.supplierNightlyRate = obj; + console.log(this.supplierNightlyRate); + this.rateBreakup = true; + } + mapNightlyRate(nightly_rate) { + let obj = []; + nightly_rate.map(rate => { + let obj_base_price = rate.PriceDetails.find(x => x.PriceDetailType == 'BasePrice'); + let obj_agency_currency = this.currency_list.find(x => x.currency_code == obj_base_price.Currency); + let agency_decimal_definer = obj_agency_currency ? obj_agency_currency.currency_deci_definer : '2'; + + let obj_supplier_currency = this.currency_list.find(x => x.currency_code == obj_base_price.SourceCurrency); + let supplier_decimal_definer = obj_supplier_currency ? obj_supplier_currency.currency_deci_definer : '2'; + obj.push({ + date: rate.date, + supplier_currency: obj_base_price.SourceCurrency, + supplier_amount: this.commonserv.amountDefiner(obj_base_price.PriceInSourceCurrency, supplier_decimal_definer), + roe: this.commonserv.amountDefiner(obj_base_price.ExchangeRate, agency_decimal_definer), + agency_currency: obj_base_price.Currency, + base_price: this.commonserv.amountDefiner(this.getPriceDetailType(rate, "BasePrice"), agency_decimal_definer), + markup_surcharge_amount: this.commonserv.amountDefiner(this.getPriceDetailType(rate, "Surcharge"), agency_decimal_definer), + // discount_surcharge_amount: this.commonserv.amountDefiner(rate.discount_surcharge_amount, agency_decimal_definer), + markup_amount: this.commonserv.amountDefiner(((this.getPriceDetailType(rate, "Markup") * 10000000) + (this.getPriceDetailType(rate, "AdditionalMarkUpPrice") * 10000000)) / 10000000, agency_decimal_definer), + transaction_fee: this.commonserv.amountDefiner(this.getPriceDetailType(rate, "TransactionFee"), agency_decimal_definer), + discount: this.commonserv.amountDefiner(this.getPriceDetailType(rate, "Discount"), agency_decimal_definer), + input_tax: this.commonserv.amountDefiner(this.getPriceDetailType(rate, "InputTax"), agency_decimal_definer), + output_tax: this.commonserv.amountDefiner(this.getPriceDetailType(rate, "OutputTax"), agency_decimal_definer), + total: this.commonserv.amountDefiner(rate.net, agency_decimal_definer), + }); + }); + return obj; + } + showBasicDialog() { + this.displayBasic = true; + } + + showBasicDialog2() { + this.displayBasic2 = true; + } + + showMaximizableDialog() { + this.displayMaximizable = true; + } + + showPositionDialog(position: string) { + this.position = position; + this.displayPosition = true; + } + back_to_listing() { + this.router.navigate(['/BookingManagement/HotelBooking/Search']); + } + // add required validtion + // updated by Abdul Razzak on 13 mar 2024 + //updated by Arfat Qureshi on 18 mar 2024, added language and whatsapp property in send mail pop up + openSendEmailModal(document_number, document_type) { + this.mailForm = this.fb.group({ + document_number: [document_number], + document_type: [document_type], + email_id: this.validationServ.email, + languageId: document_type == 'Itinerary' ? this.validationServ.required : '', + is_wapp : false + }); + //set the default email Id of user in the send mail field + if(this.booking_customer_data){ + this.mailForm.get('email_id').setValue(this.booking_customer_data['guest_email_address']); + } + this.selected__mail_document_type = document_type; + this.isOpenSendEmailModal = true; + } + openSendAddNote() { + this.isOpenAddNote = true; + this.notesform.reset(); + this.notesform.markAsUntouched(); + } + OpenCancellationPolicyModal(itinerary, isOpen) { + try { + console.log(itinerary); + let cancellation_policy = itinerary.cancellation_policy; + //let cancellation_policy = [{ "from_type": "supplier", "room_name": "Double room ? Disability access", "cancellation_policy_text": null, "sequence_no": 2, "deadline_date_from": "2022-09-21", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-25", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 100, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398246022", "no_of_rooms": 1 }, { "from_type": "supplier", "room_name": "DOUBLE STANDARD", "cancellation_policy_text": null, "sequence_no": 2, "deadline_date_from": "2022-09-21", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-25", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 100, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398247445", "no_of_rooms": 1 }, { "from_type": "agent", "room_name": "DOUBLE STANDARD", "cancellation_policy_text": null, "sequence_no": 2, "deadline_date_from": "2022-09-21", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-25", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 100, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398247445", "no_of_rooms": 1 }, { "from_type": "supplier", "room_name": "DOUBLE STANDARD", "cancellation_policy_text": null, "sequence_no": 2, "deadline_date_from": "2022-09-21", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-25", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 100, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398248361", "no_of_rooms": 1 }, { "from_type": "agent", "room_name": "Double room ? Disability access", "cancellation_policy_text": null, "sequence_no": 2, "deadline_date_from": "2022-09-21", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-25", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 100, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398246022", "no_of_rooms": 1 }, { "from_type": "supplier", "room_name": "Double room ? Disability access", "cancellation_policy_text": null, "sequence_no": 1, "deadline_date_from": "2022-08-22", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-21", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 0, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398246022", "no_of_rooms": 1 }, { "from_type": "agent", "room_name": "DOUBLE STANDARD", "cancellation_policy_text": null, "sequence_no": 2, "deadline_date_from": "2022-09-21", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-25", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 100, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398248361", "no_of_rooms": 1 }, { "from_type": "agent", "room_name": "DOUBLE STANDARD", "cancellation_policy_text": null, "sequence_no": 1, "deadline_date_from": "2022-08-22", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-21", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 0, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398248361", "no_of_rooms": 1 }, { "from_type": "agent", "room_name": "Double room ? Disability access", "cancellation_policy_text": null, "sequence_no": 1, "deadline_date_from": "2022-08-22", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-21", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 0, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398246022", "no_of_rooms": 1 }, { "from_type": "supplier", "room_name": "DOUBLE STANDARD", "cancellation_policy_text": null, "sequence_no": 1, "deadline_date_from": "2022-08-22", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-21", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 0, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398248361", "no_of_rooms": 1 }, { "from_type": "supplier", "room_name": "DOUBLE STANDARD", "cancellation_policy_text": null, "sequence_no": 1, "deadline_date_from": "2022-08-22", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-21", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 0, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398247445", "no_of_rooms": 1 }, { "from_type": "agent", "room_name": "DOUBLE STANDARD", "cancellation_policy_text": null, "sequence_no": 1, "deadline_date_from": "2022-08-22", "deadline_time_from": "00:00:00", "deadline_date_to": "2022-09-21", "deadline_time_to": "00:00:00", "currency": "USD", "amount": 0, "is_roomwise_policy": true, "format_type": "Flat", "hotel_room_details_id": "2208231504398247445", "no_of_rooms": 1 }]; + //let cancellation_policy = [{"from_type":"supplier","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":1,"deadline_date_from":"2022-08-22","deadline_time_from":null,"deadline_date_to":"2022-08-29","deadline_time_to":null,"currency":"USD","amount":0,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218409642","no_of_rooms":1},{"from_type":"supplier","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":1,"deadline_date_from":"2022-08-22","deadline_time_from":null,"deadline_date_to":"2022-08-29","deadline_time_to":null,"currency":"USD","amount":0,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218410665","no_of_rooms":1},{"from_type":"agent","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":2,"deadline_date_from":"2022-08-29","deadline_time_from":null,"deadline_date_to":"2022-09-13","deadline_time_to":null,"currency":"USD","amount":100,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218409642","no_of_rooms":1},{"from_type":"supplier","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":2,"deadline_date_from":"2022-08-29","deadline_time_from":null,"deadline_date_to":"2022-09-13","deadline_time_to":null,"currency":"USD","amount":100,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218409642","no_of_rooms":1},{"from_type":"supplier","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":2,"deadline_date_from":"2022-08-29","deadline_time_from":null,"deadline_date_to":"2022-09-13","deadline_time_to":null,"currency":"USD","amount":100,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218408033","no_of_rooms":1},{"from_type":"agent","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":1,"deadline_date_from":"2022-08-22","deadline_time_from":null,"deadline_date_to":"2022-08-29","deadline_time_to":null,"currency":"USD","amount":0,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218410665","no_of_rooms":1},{"from_type":"agent","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":1,"deadline_date_from":"2022-08-22","deadline_time_from":null,"deadline_date_to":"2022-08-29","deadline_time_to":null,"currency":"USD","amount":0,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218409642","no_of_rooms":1},{"from_type":"agent","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":2,"deadline_date_from":"2022-08-29","deadline_time_from":null,"deadline_date_to":"2022-09-13","deadline_time_to":null,"currency":"USD","amount":100,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218408033","no_of_rooms":1},{"from_type":"agent","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":1,"deadline_date_from":"2022-08-22","deadline_time_from":null,"deadline_date_to":"2022-08-29","deadline_time_to":null,"currency":"USD","amount":0,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218408033","no_of_rooms":1},{"from_type":"supplier","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":1,"deadline_date_from":"2022-08-22","deadline_time_from":null,"deadline_date_to":"2022-08-29","deadline_time_to":null,"currency":"USD","amount":0,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218408033","no_of_rooms":1},{"from_type":"supplier","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":2,"deadline_date_from":"2022-08-29","deadline_time_from":null,"deadline_date_to":"2022-09-13","deadline_time_to":null,"currency":"USD","amount":100,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218410665","no_of_rooms":1},{"from_type":"agent","room_name":"Standard Double Room,1 King Bed","cancellation_policy_text":null,"sequence_no":2,"deadline_date_from":"2022-08-29","deadline_time_from":null,"deadline_date_to":"2022-09-13","deadline_time_to":null,"currency":"USD","amount":100,"is_roomwise_policy":false,"format_type":"Percentage","hotel_room_details_id":"2208231413218410665","no_of_rooms":1}]; + console.log(cancellation_policy); + let room_list = []; + if (cancellation_policy) { + if (cancellation_policy.some(x => x.is_roomwise_policy)) { + this.is_roomwise_policy = true; + let room_group_list = _.groupBy(cancellation_policy, function (d) { return d.hotel_room_details_id; }); + for (let item in room_group_list) { + let selected_room = room_group_list[item]; + + let agent_cancellation_policy = selected_room.filter(x => x.from_type == 'agent').sort(function (a, b) { return a.sequence_no - b.sequence_no }); + let supplier_cancellation_policy = selected_room.filter(x => x.from_type == 'supplier').sort(function (a, b) { return a.sequence_no - b.sequence_no }); + + for (let index = 0; index < selected_room[0].no_of_rooms; index++) { + room_list.push({ + room_name: selected_room[0].room_name, + timezone: cancellation_policy[0].timezone, + agent_cancellation_policy: this.mapCancellationPolicy(agent_cancellation_policy), + supplier_cancellation_policy: this.mapCancellationPolicy(supplier_cancellation_policy) + }); + } + } + } else { + this.is_roomwise_policy = false; + let room_group_list = _.groupBy(cancellation_policy, function (d) { return d.hotel_room_details_id; }); + for (let item in room_group_list) { + let selected_room = room_group_list[item]; + let agent_cancellation_policy = selected_room.filter(x => x.from_type == 'agent').sort(function (a, b) { return a.sequence_no - b.sequence_no }); + let supplier_cancellation_policy = selected_room.filter(x => x.from_type == 'supplier').sort(function (a, b) { return a.sequence_no - b.sequence_no }); + room_list.push({ + room_name: cancellation_policy[0].room_name, + timezone: cancellation_policy[0].timezone, + agent_cancellation_policy: this.mapCancellationPolicy(agent_cancellation_policy), + supplier_cancellation_policy: this.mapCancellationPolicy(supplier_cancellation_policy) + }); + break; + } + } + } + this.selectedItinerary = room_list; + } catch { + this.selectedItinerary = []; + } + isOpen ? this.isOpenCancellationPolicyModal = true : ''; + } + mapCancellationPolicy(cancellation_policy) { + let resp = []; + cancellation_policy.map(item => { + if (item.format_type == 'Percentage' || item.format_type == 'Flat' || item.format_type == 'Night' || item.format_type == 'Nights') { + let obj_currency = item.format_type == 'Flat' && item.currency != null && item.currency != '' ? this.currency_list.find(x => x.currency_code == item.currency) : null; + let decimal_definer = obj_currency ? obj_currency.currency_deci_definer : '2'; + resp.push({ + from_date: (item.format_type == 'Percentage' || item.format_type == 'Flat' || item.format_type == 'Night' || item.format_type == 'Nights') && item.deadline_date_from != null && item.deadline_date_from != '' ? moment(item.deadline_date_from).format('DD MMM YYYY hh:mm A') : '', + to_date: (item.format_type == 'Percentage' || item.format_type == 'Flat' || item.format_type == 'Night' || item.format_type == 'Nights') && item.deadline_date_to != null && item.deadline_date_to != '' ? moment(item.deadline_date_to).format('DD MMM YYYY hh:mm A') : '', + from_time: (item.format_type == 'Percentage' || item.format_type == 'Flat'|| item.format_type == 'Night' || item.format_type == 'Nights') ? this.commonserv.UtcToLocaleTime(item.deadline_time_from,'hh:mm a') : '', + to_time: (item.format_type == 'Percentage' || item.format_type == 'Flat' || item.format_type == 'Night' || item.format_type == 'Nights') ? this.commonserv.UtcToLocaleTime(item.deadline_time_to, 'hh:mm a') : '', + text: item.cancellation_policy_text, + format_type: item.format_type, + timezone: item.timezone, + currency: this.getFormatType(item), + amount: item.format_type == 'Flat' ? this.commonserv.amountDefiner(item.amount, decimal_definer) : parseInt(item.amount) + }); + } else { + resp.push({ + from_date: '', + to_date: '', + from_time: '', + to_time: '', + text: item.cancellation_policy_text, + format_type: 'Text', + currency: '', + amount: '' + }); + } + }); + + return { + format_type: cancellation_policy[0].format_type, + policy: resp, + } + } + IsEmailLoader = false; + + getFormatType(item) { + let type = ''; + if(item.format_type == 'Flat') { + type = item.currency; + }else if(item.format_type == 'Percentage') { + type = '%'; + }else if(item.format_type == 'Night' || item.format_type == 'Nights') { + let night = parseInt(item.amount); + if(night > 1) type = 'Nights'; + else type = 'Night'; + } + return type; + } + // updated by Abdul Razzak on 13 mar 2024 + sendDocumentMail() { + this.IsEmailLoader = true; + let formData = this.mailForm.value; + + if (this.mailForm.status == 'INVALID') { + this.validationServ.showValidationsMsg(this.mailForm); + this.IsEmailLoader = false; + return; + } + let url = ''; + if (formData.document_type == 'Itinerary') { + let itineraryReqObj = { + "BookingRefNo": this.trip_id, + "CustomEmail": formData.email_id, + "isB2B": false, + "autoTrigger": false, + "languageId": formData.languageId + }; + this.APIServ.sendItineraryDocumentMail(itineraryReqObj).subscribe((data: any) => { + if (data) { + this.IsEmailLoader = false; + if (data.resp) { + this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Itinerary sent to your mail id' }); + this.isOpenSendEmailModal = false; + } else { + this.messageService.add({ severity: 'error', summary: 'Failed', detail: 'Internal server error' }); + } + } + }, (error) => { + this.IsEmailLoader = false; + this.messageService.add({ severity: 'error', summary: 'Failed', detail: 'Internal server error' }); + this.isOpenSendEmailModal = false; + }); + } else if (formData.document_type == 'Invoice') { + this.APIServ.sendInvoiceDocumentMail(formData.document_number, formData.email_id).subscribe((data: any) => { + if (data) { + this.IsEmailLoader = false; + if (data.resp) { + this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Invoice sent to your mail id' }); + this.isOpenSendEmailModal = false; + } else { + this.IsEmailLoader = false; + this.messageService.add({ severity: 'error', summary: 'Failed', detail: 'Internal server error' }); + } + } + }, (error) => { + this.IsEmailLoader = false; + this.messageService.add({ severity: 'error', summary: 'Failed', detail: 'Internal server error' }); + this.isOpenSendEmailModal = false; + }); + } else if (formData.document_type == 'Voucher') { + let ReqObj = { + "BookingRefNo": this.trip_id, + "CustomEmail": formData.email_id, + "isB2B": false, + "autoTrigger": false, + "languageId": formData.languageId + }; + this.APIServ.sendVoucherDocumentMail(ReqObj).subscribe((data: any) => { + if (data) { + this.IsEmailLoader = false; + if (data.resp) { + this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Voucher sent to your mail id' }); + this.isOpenSendEmailModal = false; + } else { + this.messageService.add({ severity: 'error', summary: 'Failed', detail: 'Internal server error' }); + } + } + }, (error) => { + this.IsEmailLoader = false; + this.messageService.add({ severity: 'error', summary: 'Failed', detail: 'Internal server error' }); + this.isOpenSendEmailModal = false; + }); + } + + } + + + updateStatus(BookingId, ind) { + if (this.statusArr.controls[ind].status == 'INVALID') { + this.validationServ.showValidationsMsg(this.statusArr.controls[ind]); + return; + }; + let val = this.StatusGroup.get('statusArr').value; + let hotelBookingModify = { + booking_id: BookingId, + status_id: val[ind].status + }; + this.APIServ.UpdateBooking(hotelBookingModify).subscribe((res) => { + if (res) { + this.messageService.add({ + severity: res['resp'] ? 'success' : 'error', + detail: res['respMsg'], + }); + this.dialogStatus[ind] = false; + this.getItineraryTabDetails(); + } + }); + }; + + closeCancelDialog() { + this.checkBookingCancel = false; + this.isOpenAddBookingCancelModal = false; + } + + //Standalone features + featureList = { + FC_64 :false, + FC_81 :false, + FC_85 :false, + } + getFeatures(pageId) { + this.ApiServ.AdminGet("/MenuMasterNew/GetAllFeatureCode/2110180851430030870/" + pageId).subscribe(res => { + this.features = res; + if (this.features && this.features.length > 0) { + this.features.forEach(e => { + if (this.featureList[e.feature_code] === false) this.featureList[e.feature_code] = true; + }); + }; + }) + } + + checkFeature(f_Code) { + return this.features.some(z => z.feature_code == f_Code); + } + + //Created by Arfat Qureshi Get all langugae by OrgId + GetAllLAng(){ + return this.ApiServ.AdminGet('/LanguageMapping/GetLanguagesByOrgId') + } + SaveInvoiceNumber(){ + if(this.VendorInvoiceForm.status == 'VALID'){ + let val = this.VendorInvoiceForm.getRawValue(); + let obj = { + booking_id: val.booking_id, + vendor_invoice_number: val.vendor_invoice_number, + }; + this.ApiServ.AdminGoPost('/Invoice/UpdateInvoiceVendor',obj).subscribe(data=>{ + if(data){ + this.commonserv.showMessage(data['Resp'],data['Message']); + if(data.Resp){ + this.isOpenAddVendorInvoiceNumberModal = false; + this.getCostingTabDetails(); + } + } + }) + }else { + this.VendorInvoiceForm.markAsTouched(); + } + } +} diff --git a/src/app/modules/booking-management/hotel-booking/hotel-booking.component.html b/src/app/modules/booking-management/hotel-booking/hotel-booking.component.html new file mode 100644 index 0000000..4541678 --- /dev/null +++ b/src/app/modules/booking-management/hotel-booking/hotel-booking.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/modules/booking-management/hotel-booking/hotel-booking.component.ts b/src/app/modules/booking-management/hotel-booking/hotel-booking.component.ts new file mode 100644 index 0000000..c35bbde --- /dev/null +++ b/src/app/modules/booking-management/hotel-booking/hotel-booking.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-hotel-booking', + templateUrl: './hotel-booking.component.html', +}) +export class HotelBookingComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/booking-management/hotel-booking/hotel-booking.module.ts b/src/app/modules/booking-management/hotel-booking/hotel-booking.module.ts new file mode 100644 index 0000000..0f05846 --- /dev/null +++ b/src/app/modules/booking-management/hotel-booking/hotel-booking.module.ts @@ -0,0 +1,73 @@ +import { InputMaskModule } from 'primeng/inputmask'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatTabsModule } from '@angular/material/tabs'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { CalendarModule } from 'primeng/calendar'; +import { DialogModule } from 'primeng/dialog'; +import { TableModule } from "primeng/table"; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { InputTextModule } from "primeng/inputtext"; +import { RippleModule } from 'primeng/ripple'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from "primeng/toolbar"; +import { ConfirmationService, MessageService } from 'primeng/api'; +import { HotelBookingSearchComponent } from './hotel-booking-search/hotel-booking-search.component'; +import { HotelBookingComponent } from './hotel-booking.component'; +import { InputNumberModule } from 'primeng/inputnumber'; +import { TreeModule } from 'primeng/tree'; +import { RatingModule } from 'primeng/rating'; +import { HotelBookingViewComponent } from './hotel-booking-view/hotel-booking-view.component'; +import { TabViewModule } from 'primeng/tabview'; +import { MatButtonModule } from '@angular/material/button'; +import { HotelBookingManagementService } from 'src/app/core/services/HotelServices/hotel_booking_management.service'; +// +const routes: Routes = [ + { + path: 'Search', + component: HotelBookingSearchComponent, + }, + { + path: 'View', + component: HotelBookingViewComponent, + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'Search', + }, +]; +@NgModule({ + declarations: [HotelBookingComponent, HotelBookingSearchComponent,HotelBookingViewComponent], + imports: [ + CommonModule, + NgSelectModule, + FormsModule, + ReactiveFormsModule, + CalendarModule, + InputTextModule, + InputNumberModule, + TreeModule, + RatingModule, + ButtonModule, + ToolbarModule, + InputMaskModule, + MatCheckboxModule, + TableModule, + // angular material + DialogModule, + RippleModule, + ToastModule, + TabViewModule, + MatMenuModule, + MatTabsModule, + MatButtonModule, + RouterModule.forChild(routes), + ], + providers: [ MessageService, ConfirmationService, HotelBookingManagementService], +}) +export class HotelBookingModule {} diff --git a/src/app/modules/common/custom-sidebar/custom-sidebar-item/custom-sidebar-item.component.html b/src/app/modules/common/custom-sidebar/custom-sidebar-item/custom-sidebar-item.component.html new file mode 100644 index 0000000..7dd7b74 --- /dev/null +++ b/src/app/modules/common/custom-sidebar/custom-sidebar-item/custom-sidebar-item.component.html @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/src/app/modules/common/custom-sidebar/custom-sidebar-item/custom-sidebar-item.component.ts b/src/app/modules/common/custom-sidebar/custom-sidebar-item/custom-sidebar-item.component.ts new file mode 100644 index 0000000..23faab3 --- /dev/null +++ b/src/app/modules/common/custom-sidebar/custom-sidebar-item/custom-sidebar-item.component.ts @@ -0,0 +1,38 @@ +import { trigger, state, style, transition, animate } from '@angular/animations'; +import { Component, Input } from '@angular/core'; +import { ActiveSidebarService } from 'src/app/core/services/active-sidebar.service'; + +@Component({ + selector: 'custom-sidebar-item', + templateUrl: './custom-sidebar-item.component.html', + animations: [ + trigger('submenuAnimation', [ + state('closed', style({ + height: '0px', + opacity: 0, + overflow: 'hidden', + })), + state('open', style({ + height: '*', + opacity: 1, + overflow: 'hidden', + })), + transition('closed => open', [ + animate('300ms ease-in-out') + ]), + transition('open => closed', [ + animate('200ms ease-in-out') + ]) + ]) + ] +}) +export class CustomSidebarItemComponent { + @Input() menuItems: any[] = []; // Input for the nested menu items + @Input() isMobile: boolean = false; // Input for the nested menu items + + constructor(public checkSidebar: ActiveSidebarService) { } + + toggleSubMenu(item: any) { + item.expanded = !item.expanded; // Toggle the 'isOpen' property + } +} diff --git a/src/app/modules/common/custom-sidebar/custom-sidebar.component.html b/src/app/modules/common/custom-sidebar/custom-sidebar.component.html new file mode 100644 index 0000000..64af185 --- /dev/null +++ b/src/app/modules/common/custom-sidebar/custom-sidebar.component.html @@ -0,0 +1,48 @@ +
    + +
    + + + + + + + + + + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/common/custom-sidebar/custom-sidebar.component.ts b/src/app/modules/common/custom-sidebar/custom-sidebar.component.ts new file mode 100644 index 0000000..cd01bad --- /dev/null +++ b/src/app/modules/common/custom-sidebar/custom-sidebar.component.ts @@ -0,0 +1,212 @@ +import { ChangeDetectorRef, Component, ElementRef, Renderer2, ViewChild } from '@angular/core'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ActiveSidebarService } from 'src/app/core/services/active-sidebar.service'; +import { API } from 'src/app/core/services/api.service'; +import { BreakpointsService } from 'src/app/core/services/breakpoints.services'; +import { MenuItem } from 'primeng/api'; +import { securityFunctions } from 'src/app/core/common/security'; +import { trigger, state, style, transition, animate } from '@angular/animations'; +import { filter } from 'rxjs'; +import { NavigationEnd, Router } from '@angular/router'; + +@Component({ + selector: 'custom-sidebar', + templateUrl: './custom-sidebar.component.html', + animations: [ + trigger('submenuAnimation', [ + state('closed', style({ + height: '0px', + opacity: 0, + overflow: 'hidden', + })), + state('open', style({ + height: '*', + opacity: 1, + overflow: 'hidden', + })), + transition('closed => open', [ + animate('300ms ease-in-out') + ]), + transition('open => closed', [ + animate('200ms ease-in-out') + ]) + ]) + ] +}) +export class CustomSidebarComponent { + @ViewChild('logoImage') logoImage: ElementRef; + flag: boolean = true; + // mobile resposive start + isMobile = false; + // mobile resposive end + constructor( + public ChcekSidebar: ActiveSidebarService, + public MobileBreakpoints: BreakpointsService, + private cd: ChangeDetectorRef, // mobile resposive end, + private ApiSer: API, + public commonF: CommonFunctionService, + private renderer: Renderer2, + public router: Router + ) { + // mobile resposive start + this.MobileBreakpoints.IsMobile.subscribe({ + next: (val) => { + this.isMobile = val; + }, + }); + // mobile resposive end + } + + asideItems!: MenuItem[]; + ngOnInit(): void { + this.isMobile == true + ? (this.ChcekSidebar.activeSide = '') + : (this.ChcekSidebar.activeSide = 'IsActive'); + this.getMenus().subscribe(res => { + if (res) { + this.commonF.CheckActiveTabMenus(res); + this.BindMenu(res); + const currentUrl = this.router.url; + this.expandAndActivateRecursive(this.asideItems, currentUrl, true); + } + }) + this.router.events + .pipe(filter(event => event instanceof NavigationEnd)) // Filter to get NavigationEnd event + .subscribe((data) => { + this.resetMenuItems(this.asideItems); + // this.expandAndActivateRecursive(this.asideItems, this.router.url, true); + }); + this.cd.detectChanges(); + + } + getMenuss() { + let LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null; + return this.ApiSer.AdminGet(`/MenuMasterNew/GetMenuMasterNewsByOrgId/2405170833594899108/${LoginUserData.user_id}`) + } + getMenus() { + let LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null; + return this.ApiSer.AdminGet('/MenuMasterNew/GetAllMenuByUserId/' + LoginUserData.user_id + '/2405170833594899108') + } + BindMenu(list) { + let aisemenu = []; + let FliterList = list.sort(function (a, b) { return a.sequence - b.sequence; }); + let AllParentlist = list.filter(e => e.parent_id == ''); + AllParentlist.forEach(e => { + if (e.menu_type == '2305170833594899101' && !e.is_tab_wise_menu) { + aisemenu.push({ + label: e.menu_name, + icon: e.ng_icon == null ? 'pi pi-fw pi-pencil' : '' + e.ng_icon, + items: [] + }); + } else if (!e.is_hide_in_side_menu) { + aisemenu.push({ label: e.menu_name, icon: ' ', page_data: e.page_data ? JSON.parse(e.page_data) : [], routerLink: '/' + e.ui_controller + '/' + e.ui_action, command: (event) => { this.isMobile ? this.ChcekSidebar.SideBar('IsActive') : '' } }); + } + let index = aisemenu.length - 1; + let submenu = FliterList.filter(s => s.parent_id == e.menu_id); + if (submenu.length > 0) { + this.subMenu(aisemenu[index], submenu, FliterList); + } + }); + this.asideItems = aisemenu; + }; + + subMenu(menu, FilterSubmenu, Allmenu) { + if (FilterSubmenu.length > 0) { + FilterSubmenu.forEach(e => { + if (e.menu_type == '2305170833594899101' && !e.is_tab_wise_menu) { + menu.items.push({ + label: e.menu_name, + icon: 'pi pi-fw pi-pencil', + items: [] + }); + } else if (!e.is_hide_in_side_menu) { + menu.items.push( + { label: e.menu_name, icon: ' ', page_data: e.page_data ? JSON.parse(e.page_data) : [], routerLink: '/' + e.ui_controller + '/' + e.ui_action, command: (event) => { this.isMobile ? this.ChcekSidebar.SideBar('IsActive') : '' } } + ); + } + let index = menu.items.length - 1; + let submenu = Allmenu.filter(a => a.parent_id == e.menu_id && !e.is_tab_wise_menu); + if (submenu.length > 0) { + this.subMenu(menu.items[index], submenu, Allmenu); + } + }); + }; + }; + headerHeight; // Default height + isHeightSet: boolean = false; // Flag to check if actual height is set + adjustHeaderSize() { + requestAnimationFrame(() => { + this.headerHeight = this.commonF.getHeaderSize(this.logoImage); + if (this.headerHeight > 0) { // Check if the height is valid + this.isHeightSet = true; + } + this.cd.detectChanges(); // Trigger change detection + }); + } + + toggleSubMenu(selectedItem: any) { + this.asideItems.forEach(item => item.expanded = item.label === selectedItem.label ? !item.expanded : false); + } + + private expandAndActivateRecursive(items: MenuItem[], targetUrl: string, isBeforeActive: boolean = true): boolean { + let menu = true; + if (items) { + for (const [i, item] of items.entries()) { + if (item.routerLink) { + if (item['page_data'].some(z => targetUrl.includes(z.page_url.replaceAll('/$', '')))) { + item.expanded = true; + item.styleClass = 'SidebarMenulink'; + menu = false; + for (let ind = i + 1; ind < items.length; ind++) { + if (items[ind].items) { + items[ind].items.forEach(sub_item => sub_item.styleClass = '') + } + } + return true; + } + } else if (item.items) { + if (this.expandAndActivateRecursive(item.items, targetUrl, isBeforeActive)) { + item.expanded = true; + item.styleClass = 'parent-menu-active'; + for (let ind = i + 1; ind < items.length; ind++) { + if (items[ind].items) { + items[ind].items.forEach(sub_item => sub_item.styleClass = '') + } + } + // this.RemoveSubmenuActive(items,index+1); + return true; + } else { + item.styleClass = ''; + } + } + if (menu) { + item.styleClass = 'submenu-before-active'; + } + } + } + // Get the active panel (the expanded one) + const activePanel = document.querySelector('.menu'); + const selected_panel = activePanel.querySelector('.active-panel') + selected_panel?.classList.remove("active-panel") + const panel = activePanel.querySelector('.p-highlight')?.closest('.p-panelmenu-panel'); + + // Add 'active-panel' class to the currently active panel + if (panel) { + this.renderer.addClass(panel, 'active-panel'); + } + return false; + } + private resetMenuItems(items: MenuItem[]) { + if (items) { + for (const [index, item] of items.entries()) { + item.expanded = false; + item.expanded = false; // Reset expanded state + item.styleClass = ''; // Clear any existing style classes + if (item.items) { + this.resetMenuItems(item.items); // Recursively reset child items + } + } + this.expandAndActivateRecursive(items, this.router.url, true) + } + } +} diff --git a/src/app/modules/common/footer/footer.component.html b/src/app/modules/common/footer/footer.component.html new file mode 100644 index 0000000..9ab27b9 --- /dev/null +++ b/src/app/modules/common/footer/footer.component.html @@ -0,0 +1,7 @@ + diff --git a/src/app/modules/common/footer/footer.component.ts b/src/app/modules/common/footer/footer.component.ts new file mode 100644 index 0000000..9e8f65a --- /dev/null +++ b/src/app/modules/common/footer/footer.component.ts @@ -0,0 +1,24 @@ +import { Component } from "@angular/core"; +import * as moment from "moment"; +import { securityFunctions } from "src/app/core/common/security"; + +@Component({ + templateUrl: './footer.component.html', + selector: 'app-footer' +}) +export class FooterComponent { + date; + venderGroupName = ''; + ngOnInit(): void { + this.getyear(); + } + agencyData + getyear() { + const d = new Date(); + this.date = moment(d).format('YYYY'); + this.agencyData = securityFunctions.getSessionStorage('VData'); + if (this.agencyData) { + this.venderGroupName = JSON.parse(this.agencyData).vendor_group_name; + } + }; +} \ No newline at end of file diff --git a/src/app/modules/common/header/header.component.html b/src/app/modules/common/header/header.component.html new file mode 100644 index 0000000..19b53cb --- /dev/null +++ b/src/app/modules/common/header/header.component.html @@ -0,0 +1,119 @@ +
    + +
    + + + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    + + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/common/header/header.component.ts b/src/app/modules/common/header/header.component.ts new file mode 100644 index 0000000..270c0fa --- /dev/null +++ b/src/app/modules/common/header/header.component.ts @@ -0,0 +1,127 @@ +import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout'; +import { ChangeDetectorRef, Component, ElementRef, OnInit, Renderer2, ViewChild } from '@angular/core'; +import { Title } from '@angular/platform-browser'; +import { PrimeNGConfig } from 'primeng/api'; +import { Subject, takeUntil } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ActiveSidebarService } from 'src/app/core/services/active-sidebar.service'; +import { API } from 'src/app/core/services/api.service'; +import { BreakpointsService } from 'src/app/core/services/breakpoints.services'; + +@Component({ + templateUrl: './header.component.html', + selector: 'app-header', +}) +export class HeaderComponent implements OnInit { + @ViewChild('logoImage') logoImage: ElementRef; + + isMobile!: boolean; + destroyed = new Subject(); + MobileShow = true; + MobileHide = true; + topBarMenu = false; + activeAside; + + constructor( + public ChcekSidebar: ActiveSidebarService, + // mobile resposive start + breakpointObserver: BreakpointObserver, + public MobileBreakpoints: BreakpointsService, + private cd: ChangeDetectorRef, + public commonF: CommonFunctionService, + private ApiSer: API, + private renderer: Renderer2, + public titleService: Title + // mobile resposive end + ) { + // mobile resposive start + this.MobileBreakpoints.IsMobile.subscribe({ + next: (val) => { + this.isMobile = val; + }, + }); + breakpointObserver.observe([Breakpoints.XSmall, Breakpoints.Small]) + .pipe(takeUntil(this.destroyed)) + .subscribe((result) => { + if ( + result.breakpoints["(max-width: 599.98px)"] || + result.breakpoints["(min-width: 600px) and (max-width: 959.98px)"] + ) { + this.isMobile = true; + this.MobileShow = true; + this.MobileHide = false; + } else { + this.isMobile = false; + this.MobileShow = false; + this.MobileHide = true; + } + }); + // mobile resposive end + } + + // topBar() { + // this.ChcekSidebartopBarMenu = !this.topBarMenu; + // } + userName; + lastLogin; + ngOnInit(): void { + this.userName = sessionStorage.getItem('userName') + this.lastLogin = sessionStorage.getItem('lastLogin'); + this.isMobile == true + ? (this.ChcekSidebar.activeSide = '') : (this.ChcekSidebar.activeSide = 'IsActive'); this.cd.detectChanges(); + if (sessionStorage.getItem("logo")) { + const favicon = document.getElementById('favIcon') as HTMLLinkElement; + let res = JSON.parse(sessionStorage.getItem("logo")); + if (res != null) if (res["logo"] != null) { + this.orgLogo = res["logo"]; + this.commonF.logo = this.orgLogo + sessionStorage.setItem("logo", JSON.stringify(res)); + this.titleService.setTitle('Inventory Management | ' + res.org_name) + document.documentElement.style.setProperty('--primary-theme', res['primary_color']); + document.documentElement.style.setProperty('--secondary-theme', res['secondary_color']); + this.renderer.setAttribute(favicon, 'href', res['favicon'] ? res['favicon'] : './assets/images/TMC.svg'); + } else { + this.orgLogo = "https://cdn-aos.b-cdn.net/Static/Email/TMC.svg"; + this.commonF.logo = this.orgLogo + } + } else { + this.getLogo() + } + + } + orgLogo + getLogo() { + const favicon = this.renderer.selectRootElement('link[rel="icon"]', true); + this.ApiSer.AdminGet('/ForgotPassword/GetOrgLogo').subscribe((res) => { + if (res != null) if (res["logo"] != null) { + this.orgLogo = res["logo"]; + this.commonF.logo = this.orgLogo + sessionStorage.setItem("logo", JSON.stringify(res)); + this.titleService.setTitle('Inventory Management | ' + res.org_name) + document.documentElement.style.setProperty('--primary-theme', res['primary_color']); + document.documentElement.style.setProperty('--secondary-theme', res['secondary_color']); + this.renderer.setAttribute(favicon, 'href', res['favicon'] ? res['favicon'] : './assets/images/TMC.svg'); + } else { + this.orgLogo = "https://cdn-aos.b-cdn.net/Static/Email/TMC.svg"; + this.commonF.logo = this.orgLogo + } + }) + } + asideBar(ele) { + this.activeAside = ele; + } + topBar() { + this.topBarMenu = !this.topBarMenu; + } + headerHeight; // Default height + isHeightSet: boolean = false; // Flag to check if actual height is set + adjustHeaderSize() { + requestAnimationFrame(() => { + this.headerHeight = this.commonF.getHeaderSize(this.logoImage); + if (this.headerHeight > 0) { // Check if the height is valid + this.isHeightSet = true; + } + this.cd.detectChanges(); // Trigger change detection + }); +} +} diff --git a/src/app/modules/common/sidebar/sidebar.component.html b/src/app/modules/common/sidebar/sidebar.component.html new file mode 100644 index 0000000..df8a1fb --- /dev/null +++ b/src/app/modules/common/sidebar/sidebar.component.html @@ -0,0 +1,37 @@ +
    +
    +
    + +
    + + + + + + + + + + +
    +
    +
    + +
    +
    +
    + +
    + + \ No newline at end of file diff --git a/src/app/modules/common/sidebar/sidebar.component.ts b/src/app/modules/common/sidebar/sidebar.component.ts new file mode 100644 index 0000000..9e2593c --- /dev/null +++ b/src/app/modules/common/sidebar/sidebar.component.ts @@ -0,0 +1,193 @@ +import { ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { MenuItem } from 'primeng/api'; +import { ActiveSidebarService } from 'src/app/core/services/active-sidebar.service'; +import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout'; +import { Subject, takeUntil } from 'rxjs'; +import { BreakpointsService } from 'src/app/core/services/breakpoints.services'; +import { API } from 'src/app/core/services/api.service'; +import { securityFunctions } from 'src/app/core/common/security'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +@Component({ + templateUrl: './sidebar.component.html', + selector: 'side-bar', +}) +export class SideBarComponent implements OnInit { + @ViewChild('logoImage') logoImage: ElementRef; + + router: any; + flag: boolean = true; + // mobile resposive start + isMobile = false; + // mobile resposive end + constructor( + public ChcekSidebar: ActiveSidebarService, + public MobileBreakpoints: BreakpointsService, + private cd: ChangeDetectorRef, // mobile resposive end, + private ApiSer: API, + public commonF: CommonFunctionService, + ) { + // mobile resposive start + this.MobileBreakpoints.IsMobile.subscribe({ + next: (val) => { + this.isMobile = val; + }, + }); + // mobile resposive end + } + + asideItems!: MenuItem[]; + ngOnInit(): void { + + // this.asideItems = [ + // { + // label: 'Bookings', + // icon: 'pi pi-pw pi-file', + // items: [ + // { + // label: 'Search Hotel Booking', + // icon: 'pi', + // routerLink: '/BookingManagement/HotelBooking/Search', + // }, + // { + // label: 'Search Experience Booking', + // icon: 'pi', + // routerLink: '/BookingManagement/ExperienceBooking/Search', + // }, + // ], + // }, + // { + // label: 'Services', + // icon: 'pi pi-fw pi-th-large', + // items: [ + // { + // label: 'Hotels', + // icon: 'pi ', + // routerLink: '/Services/HotelServices/Search', + // }, + // { + // label: 'Activity', + // icon: 'pi ', + // items: [ + // { + // label: 'Experience', + // icon: 'pi ', + // routerLink: '/Services/ActivityServices/ExpServices/Search', + // }, + // { + // label: 'Hotel Zone', + // icon: 'pi ', + // routerLink: '/Services/ActivityServices/HotelZone/Search', + // }, + // ], + // }, + // { + // label: 'Flights', + // icon: 'pi ', + // routerLink: '/Services/FlightServices/Search', + // }, + // { + // label: 'Flight Inventory', + // icon: 'pi ', + // routerLink: '/Services/FlightInventory/Search', + // }, + // { + // label: 'Flight Inventory Report', + // icon: 'pi ', + // routerLink: 'Services/FlightInventoryReport/Search', + // }, + // ], + // }, + // { + // label: 'User Configuration', + // icon: 'pi pi-fw pi-users', + // items: [ + // { + // label: 'Role Management', + // icon: 'pi ', + // routerLink: '/UserConfiguration/RoleManagement/Search', + // }, + // { + // label: 'User Management', + // icon: 'pi ', + // routerLink: '/UserConfiguration/UserManagement/Search', + // }, + // ], + // }, + // ]; + this.isMobile == true + ? (this.ChcekSidebar.activeSide = '') + : (this.ChcekSidebar.activeSide = 'IsActive'); + this.getMenus().subscribe(res => { + if (res) { + this.commonF.CheckActiveTabMenus(res); + this.BindMenu(res); + } + }) + this.cd.detectChanges(); + + } + getMenuss() { + let LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null; + return this.ApiSer.AdminGet(`/MenuMasterNew/GetMenuMasterNewsByOrgId/2405170833594899108/${LoginUserData.user_id}`) + } + getMenus() { + let LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null; + return this.ApiSer.AdminGet('/MenuMasterNew/GetAllMenuByUserId/' + LoginUserData.user_id + '/2405170833594899108') + } + BindMenu(list) { + let aisemenu = []; + let FliterList = list.sort(function (a, b) { return a.sequence - b.sequence; }); + let AllParentlist = list.filter(e => e.parent_id == ''); + AllParentlist.forEach(e => { + if (e.menu_type == '2305170833594899101' && !e.is_tab_wise_menu) { + aisemenu.push({ + label: e.menu_name, + icon: e.ng_icon == null ? 'pi pi-fw pi-pencil' : 'pi pi-fw ' + e.ng_icon, + items: [] + }); + } else if(!e.is_hide_in_side_menu){ + aisemenu.push({ label: e.menu_name, icon: ' ', routerLink: '/' + e.ui_controller + '/' + e.ui_action, command: (event) => { this.isMobile ? this.ChcekSidebar.SideBar('IsActive') : '' } }); + } + let index = aisemenu.length - 1; + let submenu = FliterList.filter(s => s.parent_id == e.menu_id); + if (submenu.length > 0) { + this.subMenu(aisemenu[index], submenu, FliterList); + } + }); + this.asideItems = aisemenu; + }; + + subMenu(menu, FilterSubmenu, Allmenu) { + if (FilterSubmenu.length > 0) { + FilterSubmenu.forEach(e => { + if (e.menu_type == '2305170833594899101' && !e.is_tab_wise_menu) { + menu.items.push({ + label: e.menu_name, + icon: 'pi pi-fw pi-pencil', + items: [] + }); + } else if(!e.is_hide_in_side_menu){ + menu.items.push( + { label: e.menu_name, icon: ' ', routerLink: '/' + e.ui_controller + '/' + e.ui_action, command: (event) => { this.isMobile ? this.ChcekSidebar.SideBar('IsActive') : '' } } + ); + } + let index = menu.items.length - 1; + let submenu = Allmenu.filter(a => a.parent_id == e.menu_id && !e.is_tab_wise_menu); + if (submenu.length > 0) { + this.subMenu(menu.items[index], submenu, Allmenu); + } + }); + }; + }; + headerHeight; // Default height + isHeightSet: boolean = false; // Flag to check if actual height is set + adjustHeaderSize() { + requestAnimationFrame(() => { + this.headerHeight = this.commonF.getHeaderSize(this.logoImage); + if (this.headerHeight > 0) { // Check if the height is valid + this.isHeightSet = true; + } + this.cd.detectChanges(); // Trigger change detection + }); +} +} diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on-add/activity-add-on-add.component.html b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-add/activity-add-on-add.component.html new file mode 100644 index 0000000..5393dfb --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-add/activity-add-on-add.component.html @@ -0,0 +1,231 @@ + + +
    +
    +
    +

    Add Activity Add-On

    +
    +
    + +
    +
    + +
    +
    + + + + Please enter add-on name + +
    +
    + + +
    +
    + + + +
    +
    +
    +

    Default Language

    +
    + +
    +
    +
    + + {{ lang.LanguageName }} + +
    + + Please select default language + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + Add-On Image + + +
    + + Note: Upload JPEG/PNG under 1MB. + +
    +
    +
    + + +
    +
    +
    +
    +
    Preview
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + +
    +
    +
    +

    Apply Rate On

    +
    + +
    +
    +
    + Select + {{ opt.key }} +
    + + Please select apply rate option + +
    +
    + + +
    +
    + + + +
    +
    +
    +

    Currency

    +
    + +
    +
    +
    + {{ curr.currency_code }} +
    + + Please select currency + +
    +
    + + +
    +
    + + + + Please enter adult rate + +
    +
    + + +
    +
    + + + + Please enter child rate + +
    +
    + + +
    +
    + + + + Please enter youth rate + +
    +
    + + +
    +
    + + + + Please enter senior + +
    +
    + + +
    +
    + + + + Please enter amount + +
    +
    + + +
    +
    + + + +
    +
    +
    +

    Vendor

    +
    + +
    +
    +
    + {{data.vehicleVendorName}} +
    +
    +
    +
    +
    + +
    + +
    +
    + + \ No newline at end of file diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on-add/activity-add-on-add.component.ts b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-add/activity-add-on-add.component.ts new file mode 100644 index 0000000..c19a5ac --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-add/activity-add-on-add.component.ts @@ -0,0 +1,244 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-activity-add-on-add', + templateUrl: './activity-add-on-add.component.html', +}) +export class ActivityAddOnAddComponent { +Edit_Id: string; + AddOnForm: FormGroup; + AllLang: any[] = []; + currencyList: any[] = []; + applyRateOnList = [ + { key: 'Per Person', value: 'PERPERSON' }, + { key: 'Per Service', value: 'PERSERVICE' }, + ]; + vendorList: any[] = []; + fileInfo = []; + fileArr = []; + editResp: any; + + constructor( + private fb: FormBuilder, + public validServ: ValidationService, + private apiserv: API, + private commonMasterSer: CommonFunctionService, + private router: Router, + private activateRoute: ActivatedRoute + ) {} + + ngOnInit(): void { + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.initForm(); + this.getAllLanguages(); + this.getCurrencyList(); + this.getVendorList(); + if (this.Edit_Id) { + this.getById(); + } + } + + getAllLanguages() { + this.apiserv.AdminGet('/LanguageMapping/GetLanguagesByOrgId').subscribe(data => { + if (data) { + this.AllLang = data; + } + }); + } + + getCurrencyList() { + // Replace with actual API if needed + this.apiserv.AdminGet('/CurrencyMaster/GetAllCurrencies').subscribe(d => { + if (d) this.currencyList = d; + }); + } + + getVendorList() { + this.apiserv.Get('/ActivityVehicle/GetVehicleVendor').subscribe(res => { + if (res && res.status) { + this.vendorList = res.data; + } + }); + } + + initForm() { + this.AddOnForm = this.fb.group({ + addOn: this.validServ.required, + defaultLanguageCode: this.validServ.required, + description: '', + addonImage: '', + addonImageUrl: '', + applyRateOn: this.validServ.required, + currency: this.validServ.required, + activityAddonVendorId: '' + }); + } + + SelectImage(event: any, fileUpload: any, controlName: string) { + const file = event.currentFiles[0]; + if (file && file.size < 1048576 && ['image/jpeg', 'image/png'].includes(file.type)) { + const reader = new FileReader(); + reader.readAsText(file); // Check for script tags + reader.onload = (e) => { + const binaryString = e.target?.result as string; + const hasScript = this.commonMasterSer.hasScriptTagInBinary(binaryString); + if (hasScript) { + fileUpload.clear(); + this.commonMasterSer.showMessage(false, 'Invalid file (contains script tag)'); + return; + } + + // Set file and preview URL + this.AddOnForm.get(controlName).setValue(file); + const urlReader = new FileReader(); + urlReader.readAsDataURL(file); + urlReader.onload = () => { + this.AddOnForm.get('addonImageUrl').setValue(urlReader.result?.toString()); + }; + }; + } else { + this.commonMasterSer.showMessage(false, 'File must be JPG/PNG under 1MB'); + fileUpload.clear(); + } + } + + RemoveImage() { + this.AddOnForm.get('addonImage').setValue(''); + this.AddOnForm.get('addonImageUrl').setValue(''); + } + + getById() { + this.apiserv.Get(`/ActivityAddon/GetById/${this.Edit_Id}`).subscribe(res => { + if (res && res.status) { + this.editResp = res.data; + this.HandleApplyRateOn(this.editResp.applyRateOn) + this.AddOnForm.get('addOn').setValue(this.editResp.activityAddonDetails.addOn); + this.AddOnForm.get('defaultLanguageCode').setValue(this.editResp.defaultLanguageCode); + this.AddOnForm.get('description').setValue(this.editResp.activityAddonDetails.description); + this.AddOnForm.get('applyRateOn').setValue(this.editResp.applyRateOn); + this.AddOnForm.get('currency').setValue(this.editResp.currency); + this.AddOnForm.get('adult')?.setValue(this.editResp.adult); + this.AddOnForm.get('child')?.setValue(this.editResp.child); + this.AddOnForm.get('youth')?.setValue(this.editResp.youth); + this.AddOnForm.get('senior')?.setValue(this.editResp.senior); + this.AddOnForm.get('amount')?.setValue(this.editResp.amount); + this.AddOnForm.get('activityAddonVendorId').setValue(this.editResp.activityAddonVendorId || ''); + + if (this.editResp.addonImage) { + this.AddOnForm.get('addonImage').setValue(this.editResp.addonImage); + this.AddOnForm.get('addonImageUrl').setValue(this.editResp.addonImage); + } + } + }); + } + + SaveUpdateAddOn() { + if (this.AddOnForm.invalid) { + this.validServ.showValidationsMsg(this.AddOnForm); + setTimeout(() => this.validServ.scrollToError(), 50); + return; + } + + const formVal = this.AddOnForm.getRawValue(); + const postData = { + activityAddonId: this.Edit_Id ?? '', + defaultLanguageCode: formVal.defaultLanguageCode, + applyRateOn: formVal.applyRateOn, + currency: formVal.currency, + adult: formVal.adult, + child: formVal.child, + youth: formVal.youth, + senior: formVal.senior, + amount: formVal.amount, + activityAddonVendorId: formVal.activityAddonVendorId, + activityAddonDetails: { + addOn: formVal.addOn, + description: formVal.description, + languageCode: formVal.defaultLanguageCode, + activityAddonId: this.Edit_Id ?? '', + activityAddonDetailId: this.editResp?.activityAddonDetails?.activityAddonDetailId || '' + } + }; + + let addonImageUrl = ''; + if (formVal.addonImage && typeof formVal.addonImage === 'object') { + const ext = formVal.addonImage.name.split('.').pop(); + this.fileArr.push(formVal.addonImage); + this.fileInfo.push({ + fileName: `Extranet/Activity/AddOn/ActivityAddonId/addonImage.${ext}`, + pathToSave: 'OrganizationData/ORGID' + }); + addonImageUrl = `${environment.cdnFileUrl}OrganizationData/ORGID/Extranet/Activity/AddOn/ActivityAddonId/addonImage.${ext}?t=${moment().format('yyMMddHHmmssfffffff')}`; + } else { + addonImageUrl = formVal.addonImage; + } + + postData['addonImage'] = addonImageUrl; + + const url = this.Edit_Id ? 'Update' : 'Save'; + this.apiserv.Post(`/ActivityAddon/${url}`, postData).subscribe(resp => { + if (resp?.status) { + if (this.fileInfo.length > 0) { + this.saveImg(this.fileInfo, this.fileArr, resp.data).subscribe(uploadRes => { + if (uploadRes?.resp) { + this.BackButton(); + } + this.commonMasterSer.showMessage(uploadRes.resp, uploadRes.respMsg || 'Saved successfully'); + }); + } else { + this.BackButton(); + } + this.commonMasterSer.showMessage(true, resp.message); + } else { + this.commonMasterSer.showMessage(false, resp?.message || 'Save failed'); + } + }); + } + + saveImg(fileInfo: any[], fileArr: File[], edit_id: string) { + if (!fileInfo.length || !fileArr.length) { + return of({ resp: true, respMsg: 'No files to upload' }); + } + + const formData = new FormData(); + fileArr.forEach(file => formData.append('files', file)); + const processedFileInfo = JSON.stringify(fileInfo).replace(/ActivityAddonId/g, edit_id); + formData.append('fileInfo', processedFileInfo); + + return this.apiserv.PostFile('/FileUpload/SaveFile', formData); + } + + BackButton() { + this.router.navigateByUrl('ActivityConfiguration/ActivityAddOn/Search'); + } + + HandleApplyRateOn(value){ + if(value === "PERPERSON"){ + this.AddOnForm.addControl('adult', this.fb.control('', Validators.required)); + this.AddOnForm.addControl('child', this.fb.control('', Validators.required)); + this.AddOnForm.addControl('youth', this.fb.control('', Validators.required)); + this.AddOnForm.addControl('senior', this.fb.control('', Validators.required)); + this.AddOnForm.removeControl('amount'); + }else if(value === "PERSERVICE"){ + this.AddOnForm.addControl('amount', this.fb.control('', Validators.required)); + this.AddOnForm.removeControl('child'); + this.AddOnForm.removeControl('youth'); + this.AddOnForm.removeControl('adult'); + this.AddOnForm.removeControl('senior'); + }else { + this.AddOnForm.removeControl('child'); + this.AddOnForm.removeControl('youth'); + this.AddOnForm.removeControl('adult'); + this.AddOnForm.removeControl('amount'); + this.AddOnForm.removeControl('senior'); + } + } +} diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on-edit/activity-add-on-edit.component.html b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-edit/activity-add-on-edit.component.html new file mode 100644 index 0000000..9579923 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-edit/activity-add-on-edit.component.html @@ -0,0 +1 @@ +

    activity-add-on-edit works!

    diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on-edit/activity-add-on-edit.component.ts b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-edit/activity-add-on-edit.component.ts new file mode 100644 index 0000000..a24dc47 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-edit/activity-add-on-edit.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-add-on-edit', + templateUrl: './activity-add-on-edit.component.html', +}) +export class ActivityAddOnEditComponent { + +} diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on-language/activity-add-on-language.component.html b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-language/activity-add-on-language.component.html new file mode 100644 index 0000000..4e4d209 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-language/activity-add-on-language.component.html @@ -0,0 +1,124 @@ + + + +
    +
    +
    +

    Manage Translation

    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + + +
    +
    +
    +

    Translate To

    +
    + +
    +
    +
    + {{ lang.LanguageName }} +
    + + Please select a language to translate to + +
    +
    +
    +
    +
    + + +
    + +
    +
    +
    +
    +

    Default Language Content

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +

    Selected Language Content

    +
    +
    +
    +
    +
    +
    + + + + Please enter translated add-on name + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    + + +
    + +
    + + \ No newline at end of file diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on-language/activity-add-on-language.component.ts b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-language/activity-add-on-language.component.ts new file mode 100644 index 0000000..8665c48 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-language/activity-add-on-language.component.ts @@ -0,0 +1,125 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; +@Component({ + selector: 'app-activity-add-on-language', + templateUrl: './activity-add-on-language.component.html', +}) +export class ActivityAddOnLanguageComponent { +Edit_Id: string; + AddOnLangForm: FormGroup; + AllLang: any[] = []; + editResp: any; + + constructor( + private fb: FormBuilder, + public validServ: ValidationService, + private apiserv: API, + public commonMasterSer: CommonFunctionService, + private router: Router, + private activateRoute: ActivatedRoute + ) {} + + ngOnInit(): void { + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.initForm(); + this.loadInitialData(); + } + + initForm() { + this.AddOnLangForm = this.fb.group({ + defaultLanguageCode: [''], + languageCode: this.validServ.required, + defaultAddOn: [''], + defaultDescription: [''], + addOn: this.validServ.required, + description: [''], + activityAddonDetailId: [''] + }); + } + + loadInitialData() { + forkJoin({ + languages: this.apiserv.AdminGet('/LanguageMapping/GetLanguagesByOrgId'), + addonData: this.Edit_Id ? this.apiserv.Get(`/ActivityAddon/GetById/${this.Edit_Id}`) : of(null) + }).subscribe(res => { + if (res.languages) { + this.AllLang = [...res.languages]; + } + + if (res.addonData?.status) { + this.editResp = res.addonData.data; + const defaultLangCode = this.editResp.defaultLanguageCode; + + // Set default language name + const defaultLang = this.AllLang.find(lang => lang.LanguageCode === defaultLangCode); + this.AddOnLangForm.get('defaultLanguageCode').setValue(defaultLang?.LanguageName || defaultLangCode); + + // Set default content + this.AddOnLangForm.get('defaultAddOn').setValue(this.editResp.activityAddonDetails.addOn); + this.AddOnLangForm.get('defaultDescription').setValue(this.editResp.activityAddonDetails.description); + + // Remove default language from dropdown + this.AllLang = this.AllLang.filter(lang => lang.LanguageCode !== defaultLangCode); + } + }); + } + + getDataByLang() { + const langCode = this.AddOnLangForm.get('languageCode').value; + if (!langCode || !this.Edit_Id) return; + + this.apiserv.Get(`/ActivityAddon/GetActivityAddonDetailsByIdAndLangCode/${this.Edit_Id}/${langCode}`).subscribe(res => { + if (res && res.status && res.data) { + this.AddOnLangForm.patchValue({ + addOn: res.data.addOn, + description: res.data.description, + activityAddonDetailId: res.data.activityAddonDetailId + }); + } else { + // Reset for new translation + this.AddOnLangForm.patchValue({ + addOn: '', + description: '', + activityAddonDetailId: '' + }); + } + }); + } + + saveTranslation() { + if (this.AddOnLangForm.invalid) { + this.validServ.showValidationsMsg(this.AddOnLangForm); + setTimeout(() => this.validServ.scrollToError(), 50); + return; + } + + const formVal = this.AddOnLangForm.getRawValue(); + + const postData = { + activityAddonDetailId: formVal.activityAddonDetailId || '', + activityAddonId: this.Edit_Id, + languageCode: formVal.languageCode, + addOn: formVal.addOn, + description: formVal.description || '', + }; + + this.apiserv.Post('/ActivityAddon/ManageTranslationActivityAddonDetail', postData).subscribe(resp => { + if (resp?.status) { + this.commonMasterSer.showMessage(true, resp.message || 'Translation saved successfully'); + this.BackButton(); + } else { + this.commonMasterSer.showMessage(false, resp?.message || 'Save failed'); + } + }); + } + + BackButton() { + this.router.navigateByUrl('ActivityConfiguration/ActivityAddOn/Search'); + } + +} diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on-search/activity-add-on-search.component.html b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-search/activity-add-on-search.component.html new file mode 100644 index 0000000..2e22938 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-search/activity-add-on-search.component.html @@ -0,0 +1,128 @@ +
    +
    +
    +

    Activity Add-On Search

    +
    + +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    + + +
    +
    + +
    + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + + {{ col.header }} + + + Action + + + + + + {{ data.addOn }} + {{ data.description }} + {{ data.applyRateOn }} + {{ data.currency }} + {{ data.activityAddonId }} + {{ data.activityAddonVendor }} + + + {{ data.status }} + + + {{ data.updatedBy }} + {{ data.Custom_updated_on }} + + + + + + + + + + + + + + No data found + + +
    +
    + + \ No newline at end of file diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on-search/activity-add-on-search.component.ts b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-search/activity-add-on-search.component.ts new file mode 100644 index 0000000..3be580d --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on-search/activity-add-on-search.component.ts @@ -0,0 +1,95 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import { of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; +@Component({ + selector: 'app-activity-add-on-search', + templateUrl: './activity-add-on-search.component.html', +}) +export class ActivityAddOnSearchComponent { + Result; + cols: any[]; + searchForm: FormGroup; + + constructor( + public fb: FormBuilder, + private apiserv: API, + public commonMasterSer: CommonFunctionService, + private router: Router + ) {} + + ngOnInit(): void { + this.cols = [ + { field: 'addOn', header: 'Add-On' }, + { field: 'description', header: 'Description' }, + { field: 'applyRateOn', header: 'Rate Type' }, + { field: 'currency', header: 'Currency' }, + { field: 'activityAddonId', header: 'Add-On Id' }, + { field: 'activityAddonVendor', header: 'Vendor' }, + { field: 'status', header: 'Status' }, + { field: 'updatedBy', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + + this.initForm(); + } + + initForm() { + this.searchForm = this.fb.group({ + addOn: '' + }); + } + + Search() { + const formVal = this.searchForm.getRawValue(); + const reqObj = { + addOn: formVal.addOn ? formVal.addOn.trim() : '' + }; + + this.apiserv.Post('/ActivityAddon/GetAll', reqObj).subscribe(res => { + if (res && res.status) { + this.Result = res.data ? res.data : []; + if (this.Result.length > 0) { + this.Result.forEach(item => { + item['status'] = item.isActive ? 'Active' : 'Deactive'; + item['Custom_updated_on'] = this.commonMasterSer.convertDateWithTimeToShow(item.updatedOn); + }); + } + } else { + this.Result = []; + // this.commonMasterSer.showMessage(false, res?.message || 'Failed to load data'); + } + }); + } + + Reset() { + this.searchForm.reset(); + this.Result = []; + } + + Edit(id: string) { + this.router.navigateByUrl(`/ActivityConfiguration/ActivityAddOn/Edit/${id}`); + } + + ManageLang(id: string) { + this.router.navigateByUrl(`/ActivityConfiguration/ActivityAddOn/Language/${id}`); + } + + updateStatus(id: string, currentStatus: boolean) { + const obj = { + id: id, + status: !currentStatus + }; + + this.apiserv.Post('/ActivityAddon/UpdateStatus', obj).subscribe(res => { + if (res && res.status) { + this.commonMasterSer.showMessage(true, res.message || 'Status updated successfully'); + this.Search(); // Refresh list + } else { + this.commonMasterSer.showMessage(false, res?.message || 'Failed to update status'); + } + }); + } +} diff --git a/src/app/modules/services/activity-config/activity-add-on/activity-add-on.module.ts b/src/app/modules/services/activity-config/activity-add-on/activity-add-on.module.ts new file mode 100644 index 0000000..4b7c4ad --- /dev/null +++ b/src/app/modules/services/activity-config/activity-add-on/activity-add-on.module.ts @@ -0,0 +1,66 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { ActivityAddOnAddComponent } from './activity-add-on-add/activity-add-on-add.component'; +import { ActivityAddOnEditComponent } from './activity-add-on-edit/activity-add-on-edit.component'; +import { ActivityAddOnLanguageComponent } from './activity-add-on-language/activity-add-on-language.component'; +import { ActivityAddOnSearchComponent } from './activity-add-on-search/activity-add-on-search.component'; + +const routes: Routes = [ + { + path: 'Search', + component: ActivityAddOnSearchComponent, + }, + { + path: 'Add', + component: ActivityAddOnAddComponent, + }, + { + path: 'Language/:RuleId', + component: ActivityAddOnLanguageComponent, + }, + { + path: 'Edit/:RuleId', + component: ActivityAddOnAddComponent, + }, +] + +@NgModule({ + declarations: [ + ActivityAddOnSearchComponent, + ActivityAddOnAddComponent, + ActivityAddOnLanguageComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + FileUploadModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + RouterModule.forChild(routes) + ] +}) +export class ActivityAddOnModule { } diff --git a/src/app/modules/services/activity-config/activity-category/activity-category-add/activity-category-add.component.html b/src/app/modules/services/activity-config/activity-category/activity-category-add/activity-category-add.component.html new file mode 100644 index 0000000..cbcc13f --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category-add/activity-category-add.component.html @@ -0,0 +1,78 @@ + +
    +
    +
    +

    Add Vehicle Master

    +
    +
    +
    +
    +
    +
    + + + + Please enter category name + +
    +
    +
    +
    + + + +
    +
    +
    +

    Parent Category

    +
    + +
    +
    +
    + Select + {{data.categoryName}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Default Language

    +
    + +
    +
    +
    + + {{ lang.LanguageName }} + +
    + + Please select default language + +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity-config/activity-category/activity-category-add/activity-category-add.component.ts b/src/app/modules/services/activity-config/activity-category/activity-category-add/activity-category-add.component.ts new file mode 100644 index 0000000..563f288 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category-add/activity-category-add.component.ts @@ -0,0 +1,107 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-activity-category-add', + templateUrl: './activity-category-add.component.html', +}) +export class ActivityCategoryAddComponent { + Edit_Id: string; + ActivityCategoryForm: FormGroup; + AllLang: any[] = []; + AllParentCategory: any[] = []; + editResp; + + constructor( + private fb: FormBuilder, + public validServ: ValidationService, + private apiserv: API, + private commonMasterSer: CommonFunctionService, + private router: Router, + private activateRoute: ActivatedRoute + ) {} + + ngOnInit(): void { + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.initForm(); + this.getAllLanguages(); + this.getParentCategory(); + if (this.Edit_Id) { + this.getById(); + } + } + + initForm() { + this.ActivityCategoryForm = this.fb.group({ + defaultLanguageCode: this.validServ.required, + categoryName: this.validServ.required, + parentCategoryId: '', + activityCategoryDetailsId:'' + }); + } + + getAllLanguages() { + this.apiserv.AdminGet('/LanguageMapping/GetLanguagesByOrgId').subscribe(data => { + if (data) { + this.AllLang = data; + } + }); + } + + getById() { + this.apiserv.Get(`/ActivityCategory/GetById/${this.Edit_Id}`).subscribe(res => { + if (res && res.status) { + this.editResp = res.data; + this.ActivityCategoryForm.get('categoryName').setValue(this.editResp.activityCategoryDetails.categoryName); + this.ActivityCategoryForm.get('defaultLanguageCode').setValue(this.editResp.defaultLanguageCode); + this.ActivityCategoryForm.get('parentCategoryId').setValue(this.editResp.parentCategoryId); + } + }); + } + getParentCategory() { + this.apiserv.Get(`/ActivityCategory/GetAllCategory`).subscribe(res => { + if (res && res.status) { + this.AllParentCategory = res.data; + } + }); + } + + + BackButton() { + this.router.navigateByUrl('ActivityConfiguration/ActivityCategory/Search'); + } + + SaveUpdateCategory() { + if (this.ActivityCategoryForm.invalid) { + this.validServ.showValidationsMsg(this.ActivityCategoryForm); + setTimeout(() => this.validServ.scrollToError(), 50); + return; + } + + const formVal = this.ActivityCategoryForm.getRawValue(); + const postdata = { + defaultLanguageCode:formVal.defaultLanguageCode, + parentCategoryId:formVal.parentCategoryId || '', + activityCategoryId:this.Edit_Id || '', + activityCategoryDetails : { + activityCategoryDetailsId : formVal.activityCategoryDetailsId, + activityCategoryId: this.Edit_Id || '', + categoryName:formVal.categoryName, + languageCode:formVal.defaultLanguageCode, + } + }; + const url = this.Edit_Id ? 'Update' : 'Save'; + this.apiserv.Post(`/ActivityCategory/${url}`, postdata).subscribe(resp => { + if (resp?.status) { + this.commonMasterSer.showMessage(resp.status, resp.respMsg); + } else { + this.commonMasterSer.showMessage(false, resp?.message || 'Save failed'); + } + }); + } + +} diff --git a/src/app/modules/services/activity-config/activity-category/activity-category-edit/activity-category-edit.component.html b/src/app/modules/services/activity-config/activity-category/activity-category-edit/activity-category-edit.component.html new file mode 100644 index 0000000..229009d --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category-edit/activity-category-edit.component.html @@ -0,0 +1 @@ +

    activity-category-edit works!

    diff --git a/src/app/modules/services/activity-config/activity-category/activity-category-edit/activity-category-edit.component.ts b/src/app/modules/services/activity-config/activity-category/activity-category-edit/activity-category-edit.component.ts new file mode 100644 index 0000000..1ba4433 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category-edit/activity-category-edit.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-category-edit', + templateUrl: './activity-category-edit.component.html', +}) +export class ActivityCategoryEditComponent { + +} diff --git a/src/app/modules/services/activity-config/activity-category/activity-category-language/activity-category-language.component.html b/src/app/modules/services/activity-config/activity-category/activity-category-language/activity-category-language.component.html new file mode 100644 index 0000000..a6f336c --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category-language/activity-category-language.component.html @@ -0,0 +1,89 @@ + +
    +
    +
    +

    Manage Translation

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Translate To

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Default Language Content

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Selected Language Content

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    diff --git a/src/app/modules/services/activity-config/activity-category/activity-category-language/activity-category-language.component.ts b/src/app/modules/services/activity-config/activity-category/activity-category-language/activity-category-language.component.ts new file mode 100644 index 0000000..602d034 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category-language/activity-category-language.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-category-language', + templateUrl: './activity-category-language.component.html', +}) +export class ActivityCategoryLanguageComponent { + +} diff --git a/src/app/modules/services/activity-config/activity-category/activity-category-search/activity-category-search.component.html b/src/app/modules/services/activity-config/activity-category/activity-category-search/activity-category-search.component.html new file mode 100644 index 0000000..e24f7c2 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category-search/activity-category-search.component.html @@ -0,0 +1,175 @@ +
    +
    +
    +

    Activity Category Search

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Parent Category

    +
    + +
    +
    +
    + Select + {{data.categoryName}} +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + + Category Name + + + + Parent Category + + + + Category Id + + + + Status + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + {{ data.categoryName }} + {{ data.parentCategoryName }} + {{ data.activityCategoryId }} + + + {{ data.status }} + + + {{ data.createdBy }} + {{ data.Custom_created_on }} + {{ data.updatedBy }} + {{ data.Custom_updated_on }} + + + + + + + + + + + + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity-config/activity-category/activity-category-search/activity-category-search.component.ts b/src/app/modules/services/activity-config/activity-category/activity-category-search/activity-category-search.component.ts new file mode 100644 index 0000000..36def36 --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category-search/activity-category-search.component.ts @@ -0,0 +1,101 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service' +@Component({ + selector: 'app-activity-category-search', + templateUrl: './activity-category-search.component.html', +}) +export class ActivityCategorySearchComponent { + + Result; + AllParentCategory; + cols; + categorySearchForm: FormGroup; + + constructor( + public fb: FormBuilder, + private apiserv: API, + public commonMasterSer: CommonFunctionService, + private router: Router + ) {} + + ngOnInit(): void { + this.cols = [ + { field: 'categoryName', header: 'Category Name' }, + { field: 'parentCategoryName', header: 'Parent Category' }, + { field: 'activityCategoryId', header: 'Category Id' }, + { field: 'status', header: 'Status' }, + { field: 'createdBy', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updatedBy', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + + this.initform(); + this.getParentCategory(); + } + + getParentCategory() { + this.apiserv.Get(`/ActivityCategory/GetAllCategory`).subscribe(res => { + if (res && res.status) { + this.AllParentCategory = res.data; + } + }); + } + + initform() { + this.categorySearchForm = this.fb.group({ + categoryName: '', + parentCategoryId: '' + }); + } + + Search() { + let val = this.categorySearchForm.getRawValue(); + let ReqObj = { + categoryName: val.categoryName ? val.categoryName : '', + parentCategoryId: val.parentCategoryId ? val.parentCategoryId : '' + }; + + this.apiserv.Post('/ActivityCategory/GetAll', ReqObj).subscribe(res => { + if (res) { + this.Result = res.data ? res.data : []; + if (res.data && res.status) { + this.Result.forEach(e => { + e['status'] = e.isActive ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this.commonMasterSer.convertDateWithTimeToShow(e.updatedOn); + e['Custom_created_on'] = e['createdOn'] ? this.commonMasterSer.convertDateWithTimeToShow(e.createdOn) : e['createdOn']; + }); + } + } + }); + } + + Reset() { + this.categorySearchForm.reset(); + } + + Edit(id: string) { + this.router.navigateByUrl(`ActivityConfiguration/ActivityCategory/Edit/${id}`); + } + + ManageLang(id: string) { + this.router.navigateByUrl(`ActivityConfiguration/ActivityCategory/Language/${id}`); + } + + updateStatus(id: string, val: boolean) { + let obj = { + id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ActivityCategory/UpdateStatus', obj).subscribe(res => { + if (res) { + this.commonMasterSer.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + +} diff --git a/src/app/modules/services/activity-config/activity-category/activity-category.module.ts b/src/app/modules/services/activity-config/activity-category/activity-category.module.ts new file mode 100644 index 0000000..47e15db --- /dev/null +++ b/src/app/modules/services/activity-config/activity-category/activity-category.module.ts @@ -0,0 +1,66 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { ActivityCategoryAddComponent } from './activity-category-add/activity-category-add.component'; +import { ActivityCategoryEditComponent } from './activity-category-edit/activity-category-edit.component'; +import { ActivityCategoryLanguageComponent } from './activity-category-language/activity-category-language.component'; +import { ActivityCategorySearchComponent } from './activity-category-search/activity-category-search.component'; + +const routes: Routes = [ + { + path: 'Search', + component: ActivityCategorySearchComponent, + }, + { + path: 'Add', + component: ActivityCategoryAddComponent, + }, + { + path: 'Language', + component: ActivityCategoryLanguageComponent, + }, + { + path: 'Edit', + component: ActivityCategoryEditComponent, + }, +] + +@NgModule({ + declarations: [ + ActivityCategorySearchComponent, + ActivityCategoryAddComponent, + ActivityCategoryLanguageComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + FileUploadModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + RouterModule.forChild(routes) + ] +}) +export class ActivityCategoryModule { } diff --git a/src/app/modules/services/activity-config/activity-config.module.ts b/src/app/modules/services/activity-config/activity-config.module.ts new file mode 100644 index 0000000..7c7efcd --- /dev/null +++ b/src/app/modules/services/activity-config/activity-config.module.ts @@ -0,0 +1,44 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; + +const routes: Routes = [ + { + path: 'HotelZone', + loadChildren: () => + import('./hotel-zone/hotel-zone.module').then( + (m) => m.HotelZoneModule + ), + }, + { + path: 'VehicleMaster', + loadChildren: () => + import('./vehicle-master/vehicle-master.module').then( + (m) => m.VehicleMasterModule + ), + }, + { + path: 'ActivityCategory', + loadChildren: () => + import('./activity-category/activity-category.module').then( + (m) => m.ActivityCategoryModule + ), + }, + { + path: 'ActivityAddOn', + loadChildren: () => + import('./activity-add-on/activity-add-on.module').then( + (m) => m.ActivityAddOnModule + ), + }, +] + + +@NgModule({ + declarations: [], + imports: [ + CommonModule, + RouterModule.forChild(routes) + ] +}) +export class ActivityConfigModule { } diff --git a/src/app/modules/services/activity-config/hotel-zone/hotel-zone-add/hotel-zone-add.component.html b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-add/hotel-zone-add.component.html new file mode 100644 index 0000000..d6625e0 --- /dev/null +++ b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-add/hotel-zone-add.component.html @@ -0,0 +1,230 @@ + +
    +
    +
    +

    Add Hotel Zones

    +
    +
    +
    +
    +
    +
    + + + Please + enter zone name +
    +
    +
    +
    + + + +
    +
    +
    +

    Country

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select country +
    +
    +
    +
    + + + +
    +
    +
    +

    City

    +
    + +
    +
    +
    + + {{item.cityName }}, {{item.countryName}} + +
    + Please + select city +
    +
    +
    + + +
    + + + + +
    Hotel Selection
    + +
    + +
    + + +
    +
    + + + + +
    +
    +
    +
    + + + + + + + Hotel Name + + + + Hotel Star Category + + + + Address + + + + City + + + + + + + + {{data.hotelName}} + {{data.starRating}} + {{data.address}} + {{data.city}} + + +
    +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + +
    + Hotel Name + + Hotel Star Category + + Address + + City +
    {{data.hotelName}}{{data.starRating}}{{data.address}}{{data.city}}
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-config/hotel-zone/hotel-zone-add/hotel-zone-add.component.ts b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-add/hotel-zone-add.component.ts new file mode 100644 index 0000000..f6414db --- /dev/null +++ b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-add/hotel-zone-add.component.ts @@ -0,0 +1,223 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { PaginatorState } from 'primeng/paginator'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-hotel-zone-add', + templateUrl: './hotel-zone-add.component.html', +}) +export class HotelZoneAddComponent implements OnInit { + visible: boolean = false; + + hotelZoneForm:FormGroup; + ddLoader = { + country:false, + city:false, + }; + CountryList:any[] = []; + cityList=[]; + timer:any; + citySelection = true; + hotelList = []; + Edit_Id; + editResp; + selectedHotelList = []; + selectedHotelCheck = []; + SelectedHotels = []; + + constructor(public fb:FormBuilder, public validServ:ValidationService, private apiserv:API, private commonMasterSer:CommonFunctionService, private router:Router, private activateRoute:ActivatedRoute){ + + } + showDialog() { + this.SelectedHotels = []; + this.hotelList.forEach(hotelDet=>{ + if(hotelDet.check){ + this.SelectedHotels.push(hotelDet); + } + }) + this.visible = true; + } + first: number = 0; + + rows: number = 10; + + ngOnInit(): void { + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.initform(); + if(this.Edit_Id){ + this.GetById(); + } + } + + onPageChange(event: PaginatorState) { + this.first = event.first ?? 0; + this.rows = event.rows ?? 10; + } + + GetById(){ + this.apiserv.Get(`/ActivityHotelZone/GetById/${this.Edit_Id}`).subscribe(res => { + if (res && res.status) { + this.editResp = res.data; + let country_obj = { + country_code : this.editResp.country, + country_name:this.editResp.countryName + } + let city_obj = { + cityCode:this.editResp.city, + countryName:this.editResp.countryName, + cityName:this.editResp.cityName, + } + this.CountryList.push(country_obj); + this.cityList.push(city_obj); + + this.hotelZoneForm.get('Country').setValue(this.editResp.country); + this.hotelZoneForm.get('City').setValue(this.editResp.city); + this.hotelZoneForm.get('ZoneName').setValue(this.editResp.zoneName); + this.hotelZoneForm.get('ZoneName').disable(); + this.getHotelsByCity(true); + } + }); + } + + initform(){ + this.hotelZoneForm = this.fb.group({ + ZoneName:this.validServ.required, + Country:this.validServ.required, + City:this.validServ.required, + selectAll:false, + filterInput:'' + }) + } + + getCountryList(event) { + if (event.value.length >= 2) { + this.ddLoader.country = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGet(`/MasterSearch/GetAllCountry/en/${event.value}`).subscribe(res => { + if (res) { + this.CountryList = res; + this.ddLoader.country = false; + } + }); + }, 500); + } + } + + getCityList(event) { + if (event.value.length >= 2) { + this.ddLoader.city = true; + clearTimeout(this.timer); + let req = { + "cityName": event.value, + "languageCode": "EN", + "lattitude": "0", + "longitude": "0", + "CountryCode": this.hotelZoneForm.get('Country').value || '', + } + this.timer = setTimeout(() => { + this.apiserv.PostGo(`/Hotel/GetHotelCities`, req).subscribe(res => { + if (res) { + this.cityList = res.cities; + this.ddLoader.city = false; + } + }); + }, 500); + } + } + + checkCountrySelection(){ + let val = this.hotelZoneForm.get('Country').value; + this.hotelZoneForm.get('City').setValue(''); + if(val){ + this.citySelection = false; + }else { + this.citySelection = true; + } + this.getHotelsByCity(); + } + + getHotelsByCity(check?){ + let cityVal =this.hotelZoneForm.get('City').value; + let countryVal =this.hotelZoneForm.get('City').value; + if(countryVal && cityVal){ + this.selectedHotelList = []; + this.apiserv.Get(`/ActivityHotelZone/GetHotelByCityCode/${cityVal}`).subscribe(res => { + if (res) { + this.hotelList = res.data; + this.hotelList.forEach(hotelDet=>{ + hotelDet['check'] = check ? this.editResp.hotels.includes(hotelDet.hotelId) :false; + }) + this.selectedHotelCheck = new Array(res.data.length).fill(false); + } + }); + }else { + this.hotelList = []; + } + } + + checkHotelSelection(hotelId){ + this.hotelList.forEach(hotelDet=>{ + if(hotelDet.hotelId === hotelId){ + hotelDet['check'] = !hotelDet['check']; + } + }); + if(this.hotelList.every(hotelDet=> hotelDet['check'] )){ + this.hotelZoneForm.get('selectAll').setValue(true); + }else { + this.hotelZoneForm.get('selectAll').setValue(false); + } + } + + SelectDeselectHotels(){ + let val = this.hotelZoneForm.get('selectAll').value; + this.hotelList.forEach(hotelDet=>{ + hotelDet['check'] = val; + }); + } + + saveUpdateHotelZone(){ + if(!this.hotelList.some(hotelDet=> hotelDet['check'] )){ + this.commonMasterSer.showMessage(false, 'Please select a hotel'); + return; + } + if(this.hotelZoneForm.status == "INVALID"){ + this.validServ.showValidationsMsg(this.hotelZoneForm); + setTimeout(() => { + this.validServ.scrollToError(); + }, 50); + } else if(this.hotelZoneForm.status == "VALID"){ + let formVal = this.hotelZoneForm.getRawValue(); + let PostData = { + HotelZoneId: this.Edit_Id ?? '', + ZoneName: formVal.ZoneName, + Country:formVal.Country, + City:formVal.City, + Hotels:'', + }; + let hotel_arr = []; + this.hotelList.forEach(hotelDet=>{ + if(hotelDet['check']){ + hotel_arr.push(hotelDet.hotelId); + } + }) + PostData.Hotels = hotel_arr.join(','); + let url = this.Edit_Id ? `Update` : `Save` + this.apiserv.Post(`/ActivityHotelZone/${url}`, PostData).subscribe(res=>{ + if(res){ + this.commonMasterSer.showMessage(res.status, res.message); + this.BackButton(); + } + }) + } + } + + + BackButton(){ + this.router.navigateByUrl(`ActivityConfiguration/HotelZone/Search`); + } +} diff --git a/src/app/modules/services/activity-config/hotel-zone/hotel-zone-edit/hotel-zone-edit.component.html b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-edit/hotel-zone-edit.component.html new file mode 100644 index 0000000..c85104d --- /dev/null +++ b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-edit/hotel-zone-edit.component.html @@ -0,0 +1 @@ +

    hotel-zone-edit works!

    diff --git a/src/app/modules/services/activity-config/hotel-zone/hotel-zone-edit/hotel-zone-edit.component.ts b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-edit/hotel-zone-edit.component.ts new file mode 100644 index 0000000..3374027 --- /dev/null +++ b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-edit/hotel-zone-edit.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-hotel-zone-edit', + templateUrl: './hotel-zone-edit.component.html', +}) +export class HotelZoneEditComponent { + +} diff --git a/src/app/modules/services/activity-config/hotel-zone/hotel-zone-search/hotel-zone-search.component.html b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-search/hotel-zone-search.component.html new file mode 100644 index 0000000..50f5e61 --- /dev/null +++ b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-search/hotel-zone-search.component.html @@ -0,0 +1,227 @@ +
    +
    +
    +

    Hotel Zones Search

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Hotel Name

    +
    + +
    +
    +
    + + {{item.hotelName }} {{item.cityName }}, {{item.countryName }} + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Country

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    City

    +
    + +
    +
    +
    + + {{item.cityName }}, {{item.countryName }} + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Zone Name + + + + Country + + + + City + + + + Number of Hotel + + + + Zone Id + + + + Status + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + {{data.zoneName}} + + {{data.country}} + {{data.city}} + {{data.hotels}} + {{data.hotelZoneId}} + + + {{data.status}} + + + {{data.createdBy}} + {{data.Custom_created_on}} + {{data.updatedBy}} + {{data.Custom_updated_on}} + + + + + + + + + + + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity-config/hotel-zone/hotel-zone-search/hotel-zone-search.component.ts b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-search/hotel-zone-search.component.ts new file mode 100644 index 0000000..6c58181 --- /dev/null +++ b/src/app/modules/services/activity-config/hotel-zone/hotel-zone-search/hotel-zone-search.component.ts @@ -0,0 +1,173 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import { TableModule } from 'primeng/table'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-hotel-zone-search', + templateUrl: './hotel-zone-search.component.html', +}) +export class HotelZoneSearchComponent implements OnInit { + + hotelZoneSearchForm: FormGroup; + + ddLoader = { + city: false, + Country: false, + hotel_list: false, + }; + timer; + HotelList; + CountryList; + CityList; + Result; + cols; + constructor(public fb: FormBuilder, private apiserv: API, public commonMasterSer: CommonFunctionService, private router: Router) { + + } + + ngOnInit(): void { + this.cols = [ + { field: 'zoneName', header: 'Zone Name' }, + { field: 'country', header: 'Country' }, + { field: 'city', header: 'City' }, + { field: "hotels", header: 'Number of Hotel' }, + { field: 'hotelZoneId', header: 'Zone Id' }, + { field: 'status', header: 'Status' }, + { field: 'createdBy', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updatedBy', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + this.initform(); + } + + initform() { + this.hotelZoneSearchForm = this.fb.group({ + ZoneName: '', + HotelName: '', + Country: '', + City: '', + }); + } + + + GetHotels(event) { + if (event.value.length >= 2) { + let obj = { + languageCode: 'en', + cityName: event.value, + lattitude: '0', + longitude: '0', + } + this.ddLoader['hotel_list'] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGoPost(`/Hotel/GetHotels`, obj).subscribe(res => { + if (res) { + this.HotelList = res.hotels; + this.ddLoader['hotel_list'] = false; + } + }); + }, 500); + } + } + + getCountryList(event) { + if (event.value.length >= 2) { + this.ddLoader['Country'] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGet(`/MasterSearch/GetAllCountry/en/${event.value}`).subscribe(res => { + if (res) { + this.CountryList = res; + this.ddLoader['Country'] = false; + } + }); + }, 500); + } + } + + getHotelCitySearch(event) { + if (event.value.length >= 2) { + let reqObj = { + cityName: event.value, + languageCode: 'en', + lattitude: '0', + longitude: '0' + } + this.ddLoader.city = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGoPost("/Hotel/GetHotelCities", reqObj).subscribe(res => { + if (res) { + this.CityList = res.cities; + this.ddLoader.city = false; + } + }); + }, 500); + } + if (!event.value) { + this.CityList = []; + } + }; + + Search(){ + let val = this.hotelZoneSearchForm.getRawValue(); + let ReqObj = { + ZoneName: val.ZoneName ? val.ZoneName : '', + HotelName: val.HotelName ? val.HotelName : '', + Country: val.Country ? val.Country : '', + City: val.City ? val.City : '', + } + this.apiserv.Post('/ActivityHotelZone/GetAll', ReqObj).subscribe(res => { + if (res) { + this.Result = res.data ? res.data :[]; + if (res.data) { + this.Result.forEach(e => { + e['status'] = e.isActive ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this.commonMasterSer.convertDateWithTimeToShow(e.updatedOn); + e['Custom_created_on'] = e['createdOn'] ? this.commonMasterSer.convertDateWithTimeToShow(e.createdOn) : e['createdOn']; + }); + // customSort(event: SortEvent) { + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updatedOn).getTime() - new Date(a.updatedOn).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updatedOn).getTime() - new Date(a.updatedOn).getTime(); + }); + // } + } + } + }) + } + Reset(){ + this.hotelZoneSearchForm.reset(); + } + + Edit(Id){ + this.router.navigateByUrl(`ActivityConfiguration/HotelZone/Edit/${Id}`); + } + updateStatus(id, val) { + let obj = { + id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ActivityHotelZone/UpdateStatus', obj).subscribe(res => { + if (res) { + this.commonMasterSer.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } +} diff --git a/src/app/modules/services/activity-config/hotel-zone/hotel-zone.module.ts b/src/app/modules/services/activity-config/hotel-zone/hotel-zone.module.ts new file mode 100644 index 0000000..cee4b5a --- /dev/null +++ b/src/app/modules/services/activity-config/hotel-zone/hotel-zone.module.ts @@ -0,0 +1,67 @@ +import { Component, NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { HotelZoneSearchComponent } from './hotel-zone-search/hotel-zone-search.component'; +import { HotelZoneAddComponent } from './hotel-zone-add/hotel-zone-add.component'; +import { HotelZoneEditComponent } from './hotel-zone-edit/hotel-zone-edit.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { PaginatorModule } from 'primeng/paginator'; + +const routes: Routes = [ + { + path: 'Search', + component: HotelZoneSearchComponent, + }, + { + path: 'Add', + component: HotelZoneAddComponent, + }, + { + path: 'Edit/:RuleId', + component: HotelZoneAddComponent, + }, +] + + +@NgModule({ + declarations: [ + HotelZoneSearchComponent, + HotelZoneAddComponent, + HotelZoneAddComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + FormsModule, + CommonModule, + FileUploadModule, + ToolbarModule, + MatMenuModule, + PaginatorModule, + CalendarModule, + ToastModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + RouterModule.forChild(routes) + ] +}) +export class HotelZoneModule { } diff --git a/src/app/modules/services/activity-config/vehicle-master/vehicle-master-add/vehicle-master-add.component.html b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-add/vehicle-master-add.component.html new file mode 100644 index 0000000..9f675d2 --- /dev/null +++ b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-add/vehicle-master-add.component.html @@ -0,0 +1,268 @@ + +
    +
    +
    +

    Add Vehicle Master

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Vehicle Type

    +
    + +
    +
    +
    + Select + {{vehicleType.key}} +
    + Please + select vehicle type +
    +
    +
    +
    + + + +
    +
    +
    +

    Default Language

    +
    + +
    +
    +
    + {{lang.LanguageName}} +
    + Please + select default language +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Passenger Capacity

    +
    + +
    +
    +
    + {{capacity}} +
    + Please + select max passenger capcity +
    +
    +
    +
    + + + Please + enter max luggage capcity +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Vehicle Transfer Type

    +
    + +
    +
    +
    + Select + Private + Shared +
    + Please + select vehicle transfer type +
    +
    +
    +
    + + + +
    +
    +
    +

    Fuel Type

    +
    + +
    +
    +
    + Select + Petrol + Diesel + CNG + Electric +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Vehicle Vendor

    +
    + +
    +
    +
    + Select + {{data.vehicleVendorName}} +
    +
    +
    +
    +
    +
    + Display Vehicle Image + + +
    + Note: Upload jpeg/png with max file size upto + 500kb. Height + 200px and Width 800px. +
    +
    +
    +
    +
    +
    +
    +
    +
    date.PNG
    +
    490 B
    +
    + +
    +
    +
    +
    +
    +
    + Vehicle Images + + +
    + Note: Upload jpeg/png with max file size upto + 500kb. Height + 200px and Width 800px. +
    +
    +
    +
    +
    +
    +
    +
    +
    date.PNG
    +
    490 B
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-config/vehicle-master/vehicle-master-add/vehicle-master-add.component.ts b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-add/vehicle-master-add.component.ts new file mode 100644 index 0000000..620407e --- /dev/null +++ b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-add/vehicle-master-add.component.ts @@ -0,0 +1,252 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-vehicle-master-add', + templateUrl: './vehicle-master-add.component.html', +}) +export class VehicleMasterAddComponent implements OnInit { + Edit_Id: string; + VehicleForm: FormGroup; + AllLang; + transferVendorList; + fileInfo = []; + fileArr = []; + vehicleTypeList = [ + { key: 'Standard', value: 'STANDARD' }, + { key: 'Sedan', value: 'SEDAN' }, + { key: 'Minivan', value: 'MINIVAN' }, + { key: 'Minbus', value: 'MINBUS' }, + { key: 'Luxury Sedan', value: 'LUXURYSEDAN' }, + { key: 'Luxury Minivan', value: 'LUXURYMINIVAN' }, + { key: 'SUV', value: 'SUV' }, + { key: 'Minicoach', value: 'MINICOACH' }, + { key: 'Bus', value: 'BUS' } + ]; + passCapacityList = Array.from({ length: 100 }, (_, i) => i + 1); + editResp: any; + + constructor(public fb: FormBuilder, public validServ: ValidationService, private apiserv: API, private commonMasterSer: CommonFunctionService, private router: Router, private activateRoute: ActivatedRoute) { + + } + + ngOnInit(): void { + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.initform(); + this.GetAllLAng(); + this.GetTransferVendor() + if (this.Edit_Id) { + this.GetById(); + } + } + GetAllLAng() { + this.apiserv.AdminGet('/LanguageMapping/GetLanguagesByOrgId').subscribe(data => { + if (data) { + this.AllLang = data; + } + }) + } + GetTransferVendor() { + this.apiserv.Get('/ActivityVehicle/GetVehicleVendor').subscribe(res => { + if (res) { + this.transferVendorList = res.data; + } + }) + } + + initform() { + this.VehicleForm = this.fb.group({ + vehicleType: this.validServ.required, + defaultLanguageCode: this.validServ.required, + maxPassengerCapacity: this.validServ.required, + maxLuggageCapacity: this.validServ.required, + vehicleNumberPlate: '', + vehicleTransferType: this.validServ.required, + displayVehicleImage: '', + displayVehicleImageUrl: '', + vehicleImages: this.fb.control([]), + vehicleImagesUrl: this.fb.control([]), + fuelType: '', + vehicleName: '', + VehicleDescription: '', + vehicleVendorId: '', + }) + } + + SelectImage(e, filedata, contol) { + if (e.currentFiles.length != 0) { + for (let i = 0; i < e.files.length; i++) { + let file = e.files[i]; + if (file.size < 1048576 && (file.type == 'image/png' || file.type == 'image/jpeg')) { + const reader = new FileReader(); + console.log(file) + reader.readAsText(file); // Read as binary data + reader.onload = (res) => { + const binaryString = res.target.result as string; + const hasScriptTag = this.commonMasterSer.hasScriptTagInBinary(binaryString); + if (hasScriptTag) { + filedata.clear(); + this.commonMasterSer.showMessage(false, 'Invalid file (contains script tag)'); + } else { + //base 64 + if (contol == 'displayVehicleImage') { + this.VehicleForm.get(contol).setValue(file); + } else { + this.VehicleForm.get(contol).value.push(file); + } + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => { + if (contol == 'displayVehicleImage') { + this.VehicleForm.get('displayVehicleImageUrl').setValue(reader.result.toString()); + } else { + this.VehicleForm.get('vehicleImagesUrl').value.push(reader.result.toString()); + } + } + }; + } + } + } + } + + } + RemoveImage(ind, contol) { + if (contol == 'displayVehicleImage') { + this.VehicleForm.get(contol).setValue(''); + this.VehicleForm.get('displayVehicleImageUrl').setValue(''); + } else { + let image_url_list = this.VehicleForm.get(contol).value; + image_url_list.splice(ind, 1); + let image_display_url_list = this.VehicleForm.get('vehicleImagesUrl').value; + image_display_url_list.splice(ind, 1); + } + } + + GetById() { + this.apiserv.Get(`/ActivityVehicle/GetById/${this.Edit_Id}`).subscribe(res => { + if (res && res.status) { + this.editResp = res.data; + this.VehicleForm.get('vehicleType').setValue(this.editResp.vehicleType); + this.VehicleForm.get('defaultLanguageCode').setValue(this.editResp.defaultLanguageCode); + this.VehicleForm.get('maxPassengerCapacity').setValue(this.editResp.maxPassengerCapacity); + this.VehicleForm.get('maxLuggageCapacity').setValue(this.editResp.maxLuggageCapacity); + this.VehicleForm.get('vehicleNumberPlate').setValue(this.editResp.vehicleNumberPlate); + this.VehicleForm.get('vehicleTransferType').setValue(this.editResp.vehicleTransferType); + this.VehicleForm.get('fuelType').setValue(this.editResp.fuelType); + this.VehicleForm.get('vehicleName').setValue(this.editResp.activityVehicleDetails.vehicleName); + this.VehicleForm.get('vehicleVendorId').setValue(this.editResp.activityVehicleDetails.vehicleVendorId || ''); + this.VehicleForm.get('VehicleDescription').setValue(this.editResp.activityVehicleDetails.VehicleDescription); + if (this.editResp.vehicleImages) { + let Images_Arr = this.editResp.vehicleImages.split(','); + Images_Arr.forEach(data => { + this.VehicleForm.get('vehicleImages').value.push(data); + this.VehicleForm.get('vehicleImagesUrl').value.push(data); + }) + } + if (this.editResp.displayVehicleImage) { + this.VehicleForm.get('displayVehicleImage').setValue(this.editResp.displayVehicleImage); + this.VehicleForm.get('displayVehicleImageUrl').setValue(this.editResp.displayVehicleImage); + } + } + }) + } + + SaveUpdateVehicleDet() { + if (this.VehicleForm.status == "INVALID") { + this.validServ.showValidationsMsg(this.VehicleForm); + setTimeout(() => { + this.validServ.scrollToError(); + }, 50); + } else if (this.VehicleForm.status == "VALID") { + let formVal = this.VehicleForm.getRawValue(); + let postData = { + vehicleType: formVal.vehicleType, + ActivityVehicleId: this.Edit_Id ?? '', + defaultLanguageCode: formVal.defaultLanguageCode, + maxPassengerCapacity: formVal.maxPassengerCapacity.toString(), + maxLuggageCapacity: formVal.maxLuggageCapacity, + vehicleNumberPlate: formVal.vehicleNumberPlate, + vehicleTransferType: formVal.vehicleTransferType, + displayVehicleImage: formVal, + vehicleImages: formVal, + fuelType: formVal.fuelType, + vehicleVendorId: formVal.vehicleVendorId, + activityVehicleDetails: { + vehicleName: formVal.vehicleName, + VehicleDescription: formVal.VehicleDescription, + LanguageCode: formVal.defaultLanguageCode, + ActivityVehicleId: this.Edit_Id ?? '', + activityVehicleDetailsId: this.editResp ?this.editResp.activityVehicleDetails.activityVehicleDetailsId :'' + }, + } + let vehicleImages_arr = [] + formVal.vehicleImages.forEach((img_data, img_Ind) => { + if (typeof (img_data) == 'object' && img_data) { + let image_type = img_data.name.split('.'); + this.fileArr.push(img_data); + this.fileInfo.push({ 'fileName': "Extranet/Activity/Vehicle/ActivityVehicleId/vehicleImages_" + img_Ind + '.' + image_type[image_type.length - 1], 'pathToSave': 'OrganizationData/ORGID' }); + let image_url = `${environment.cdnFileUrl}OrganizationData/ORGID/Extranet/Activity/Vehicle/ActivityVehicleId/vehicleImages_${img_Ind}.${image_type[image_type.length - 1]}?t=${moment(new Date()).format("yyMMddHHmmssfffffff")}`; + vehicleImages_arr.push(image_url) + } else { + vehicleImages_arr.push(img_data); + } + }) + let thumbnail_image_url = ''; + if (typeof (formVal.displayVehicleImage) == 'object' && formVal.displayVehicleImage) { + let image_type = formVal.displayVehicleImage.name.split('.'); + this.fileArr.push(formVal.displayVehicleImage); + this.fileInfo.push({ 'fileName': "Extranet/Activity/Vehicle/ActivityVehicleId/DisplayImg" + '.' + image_type[image_type.length - 1], 'pathToSave': 'OrganizationData/ORGID' }); + thumbnail_image_url = `${environment.cdnFileUrl}OrganizationData/ORGID/Extranet/Activity/Vehicle/ActivityVehicleId/DisplayImg.${image_type[image_type.length - 1]}?t=${moment(new Date()).format("yyMMddHHmmssfffffff")}`; + } else { + thumbnail_image_url = formVal.displayVehicleImage; + } + postData['vehicleImages'] = vehicleImages_arr.length > 0 ? vehicleImages_arr.join(',') : ''; + postData['displayVehicleImage'] = thumbnail_image_url; + let url = this.Edit_Id ? `Update` : 'Save'; + this.apiserv.Post(`/ActivityVehicle/${url}`, postData).subscribe(resp => { + if (resp) { + if (this.fileInfo.length > 0 && resp.status) { + this.saveImg(this.fileInfo, this.fileArr, resp.data).subscribe(res => { + if (res && res.resp) { + this.BackButton(); + } + this.commonMasterSer.showMessage(resp.resp, resp.message) + }) + } else if (resp.status) { + this.BackButton(); + } + this.commonMasterSer.showMessage(resp.status, resp.message); + + } + }) + } + } + + saveImg(fileInfo, fileArr, edit_id) { + if (fileInfo && fileInfo.length > 0 && fileArr && fileArr.length > 0) { + var formdata = new FormData(); + fileArr.forEach((x) => { + formdata.append("files", x); + }); + let file_info_list = JSON.stringify(fileInfo).replaceAll('ActivityVehicleId', edit_id); + formdata.append("fileInfo", file_info_list); + return this.apiserv.PostFile("/FileUpload/SaveFile", formdata); + } else { + return of({ + resp: true, + respMsg: "No images to save" + }); + } + } + BackButton() { + this.router.navigateByUrl(`ActivityConfiguration/VehicleMaster/Search`); + } + +} diff --git a/src/app/modules/services/activity-config/vehicle-master/vehicle-master-language/vehicle-master-language.component.html b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-language/vehicle-master-language.component.html new file mode 100644 index 0000000..19af44e --- /dev/null +++ b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-language/vehicle-master-language.component.html @@ -0,0 +1,109 @@ + +
    +
    +
    +

    Manage Translation

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Default Language

    +
    + +
    +
    +
    + {{lang.LanguageName}} +
    + Please + select language +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Default Language Content

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Selected Language Content

    +
    +
    +
    +
    +
    +
    + + + Please + enter vehicle name +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-config/vehicle-master/vehicle-master-language/vehicle-master-language.component.ts b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-language/vehicle-master-language.component.ts new file mode 100644 index 0000000..ee9cf03 --- /dev/null +++ b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-language/vehicle-master-language.component.ts @@ -0,0 +1,111 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-vehicle-master-language', + templateUrl: './vehicle-master-language.component.html', +}) +export class VehicleMasterLanguageComponent implements OnInit { + Edit_Id: string; + VehicleManageLangForm:FormGroup; + AllLang: any; + editResp: any; + + + constructor(public fb: FormBuilder, public validServ: ValidationService, private apiserv: API, private commonMasterSer: CommonFunctionService, private router: Router, private activateRoute: ActivatedRoute) { + + } + + ngOnInit(): void { + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.initform(); + this.GetAll(); + } + + GetAll(){ + forkJoin( + this.GetAllLAng(), + this.GetById(this.Edit_Id) + ).subscribe(res=>{ + if(res && res.length > 0){ + this.AllLang = res[0]; + if(res[1] && res[1].status){ + this.editResp = res[1].data; + this.VehicleManageLangForm.get('defaultvehicleName').setValue(this.editResp.activityVehicleDetails.vehicleName); + this.VehicleManageLangForm.get('defaultVehicleDescription').setValue(this.editResp.activityVehicleDetails.vehicleDescription); + const index = this.AllLang.findIndex(lang => lang.LanguageCode === this.editResp.defaultLanguageCode); + this.VehicleManageLangForm.get('defaultLanguageCode').setValue(this.AllLang[index].LanguageName); + if(index !== -1){ + this.AllLang.splice(index, 1); + } + } + } + }) + } + GetAllLAng() { + return this.apiserv.AdminGet('/LanguageMapping/GetLanguagesByOrgId') + } + + initform() { + this.VehicleManageLangForm = this.fb.group({ + defaultvehicleName: '', + defaultVehicleDescription: '', + defaultLanguageCode: '', + languageCode: this.validServ.required, + vehicleName: this.validServ.required, + vehicleDescription: '', + activityVehicleDetailsId:'' + }) + } + + GetById(Editid) { + if (Editid) + return this.apiserv.Get('/ActivityVehicle/GetById/' + Editid) + else + return of(null) + }; + + saveTranslation(){ + if (this.VehicleManageLangForm.status == "INVALID") { + this.validServ.showValidationsMsg(this.VehicleManageLangForm); + setTimeout(() => { + this.validServ.scrollToError(); + }, 50); + } else if (this.VehicleManageLangForm.status == "VALID") { + let formVal = this.VehicleManageLangForm.getRawValue(); + let postData = { + activityVehicleDetailsId:formVal.activityVehicleDetailsId ?? '', + activityVehicleId:this.Edit_Id, + languageCode:formVal.languageCode, + vehicleName:formVal.vehicleName, + VehicleDescription:formVal.VehicleDescription ?? '', + } + this.apiserv.Post('/ActivityVehicle/ManageTranslationActivityVehicleDetails', postData).subscribe(resp=>{ + this.commonMasterSer.showMessage(resp.status, resp.message) + if(resp.status){ + this.BackButton(); + } + }) + } + } + + getDataByLang(){ + let langCode = this.VehicleManageLangForm.get('languageCode').value; + this.apiserv.Get(`/ActivityVehicle/GetActivityVehicleDetailsByIdAndLangCode/${this.Edit_Id}/${langCode}`).subscribe(res=>{ + if(res && res.data){ + this.VehicleManageLangForm.get('vehicleName').setValue(res.data.vehicleName); + this.VehicleManageLangForm.get('vehicleDescription').setValue(res.data.vehicleDescription); + this.VehicleManageLangForm.get('activityVehicleDetailsId').setValue(res.data.activityVehicleDetailsId); + } + }) + } + + BackButton() { + this.router.navigateByUrl(`ActivityConfiguration/VehicleMaster/Search`); + } +} diff --git a/src/app/modules/services/activity-config/vehicle-master/vehicle-master-search/vehicle-master-search.component.html b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-search/vehicle-master-search.component.html new file mode 100644 index 0000000..1f05927 --- /dev/null +++ b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-search/vehicle-master-search.component.html @@ -0,0 +1,234 @@ +
    +
    +
    +

    Vehicle Search

    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Vehicle Type

    +
    + +
    +
    +
    + Select + {{vehicleType.key}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Vehicle Transfer Type

    +
    + +
    +
    +
    + Select + Private + Shared +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Vehicle Id + + + + Vehicle Type + + + + Max Passenger Capacity + + + + Max Luggage Capacity + + + + Vehicle Supplier + + + + Vehicle Transfer Type + + + + Vehicle Name + + + + Vehicle Number Plate + + + + Fuel Type + + + + Status + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + {{data.activityVehicle_id}} + + {{data.vehicleType}} + {{data.maxPassengerCapacity}} + {{data.maxLuggageCapacity}} + + {{data.vehicleTransferType}} + {{data.vehicleName}} + {{data.vehicleNumberPlate}} + {{data.fuelType}} + + + {{data.status}} + + + {{data.createdBy}} + {{data.Custom_created_on}} + {{data.updatedBy}} + {{data.Custom_updated_on}} + + + + + + + + + + + + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity-config/vehicle-master/vehicle-master-search/vehicle-master-search.component.ts b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-search/vehicle-master-search.component.ts new file mode 100644 index 0000000..2a281ba --- /dev/null +++ b/src/app/modules/services/activity-config/vehicle-master/vehicle-master-search/vehicle-master-search.component.ts @@ -0,0 +1,102 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-vehicle-master-search', + templateUrl: './vehicle-master-search.component.html', +}) +export class VehicleMasterSearchComponent implements OnInit { + + Result; + cols; + vehicleSearchForm:FormGroup; + vehicleTypeList = [ + { key: 'Standard', value: 'STANDARD' }, + { key: 'Sedan', value: 'SEDAN' }, + { key: 'Minivan', value: 'MINIVAN' }, + { key: 'Minbus', value: 'MINBUS' }, + { key: 'Luxury Sedan', value: 'LUXURYSEDAN' }, + { key: 'Luxury Minivan', value: 'LUXURYMINIVAN' }, + { key: 'SUV', value: 'SUV' }, + { key: 'Minicoach', value: 'MINICOACH' }, + { key: 'Bus', value: 'BUS' } + ]; + + constructor(public fb: FormBuilder, private apiserv: API, public commonMasterSer: CommonFunctionService, private router: Router) {} + + ngOnInit(): void { + this.cols = [ + { field: 'activityVehicle_id', header: 'Vehicle Id' }, + { field: 'vehicleType', header: 'Vehicle Type' }, + { field: 'maxPassengerCapacity', header: 'Max Passenger Capacity' }, + { field: 'maxLuggageCapacity', header: 'Max Luggage Capacity' }, + { field: 'maxLuggageCapacity', header: 'Vehicle Supplier' }, + { field: 'vehicleTransferType', header: 'Vehicle Transfer Type' }, + { field: 'vehicleName', header: 'Vehicle Name' }, + { field: 'vehicleNumberPlate', header: 'Vehicle Number Plate' }, + { field: 'fuelType', header: 'Fuel Type' }, + { field: 'status', header: 'Status' }, + { field: 'createdBy', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updatedBy', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + this.initform(); + } + + initform(){ + this.vehicleSearchForm = this.fb.group({ + vehicleType:'', + vehicleTransferType:'', + maxPassengerCapacity:'', + maxLuggageCapacity:'' + }) + } + + Search(){ + let val = this.vehicleSearchForm.getRawValue(); + let ReqObj = { + vehicleType: val.vehicleType ? val.vehicleType : '', + vehicleTransferType: val.vehicleTransferType ? val.vehicleTransferType : '', + maxPassengerCapacity: val.maxPassengerCapacity ? val.maxPassengerCapacity : '', + maxLuggageCapacity: val.maxLuggageCapacity ? val.maxLuggageCapacity : '', + } + this.apiserv.Post('/ActivityVehicle/GetAll', ReqObj).subscribe(res => { + if (res) { + this.Result = res.data ? res.data :[]; + if (res.data) { + this.Result.forEach(e => { + e['status'] = e.isActive ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this.commonMasterSer.convertDateWithTimeToShow(e.updatedOn); + e['Custom_created_on'] = e['createdOn'] ? this.commonMasterSer.convertDateWithTimeToShow(e.createdOn) : e['createdOn']; + }); + } + } + }) + } + + Reset(){ + this.vehicleSearchForm.reset(); + } + Edit(Id){ + this.router.navigateByUrl(`ActivityConfiguration/VehicleMaster/Edit/${Id}`); + } + ManageLang(Id){ + this.router.navigateByUrl(`ActivityConfiguration/VehicleMaster/Language/${Id}`); + } + updateStatus(id, val) { + let obj = { + id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ActivityVehicle/UpdateStatus', obj).subscribe(res => { + if (res) { + this.commonMasterSer.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } +} diff --git a/src/app/modules/services/activity-config/vehicle-master/vehicle-master.module.ts b/src/app/modules/services/activity-config/vehicle-master/vehicle-master.module.ts new file mode 100644 index 0000000..fe403b3 --- /dev/null +++ b/src/app/modules/services/activity-config/vehicle-master/vehicle-master.module.ts @@ -0,0 +1,66 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { VehicleMasterAddComponent } from './vehicle-master-add/vehicle-master-add.component'; +import { VehicleMasterLanguageComponent } from './vehicle-master-language/vehicle-master-language.component'; +import { VehicleMasterSearchComponent } from './vehicle-master-search/vehicle-master-search.component'; + +const routes: Routes = [ + { + path: 'Search', + component: VehicleMasterSearchComponent, + }, + { + path: 'Add', + component: VehicleMasterAddComponent, + }, + { + path: 'Language/:RuleId', + component: VehicleMasterLanguageComponent, + }, + { + path: 'Edit/:RuleId', + component: VehicleMasterAddComponent, + }, +] + +@NgModule({ + declarations: [ + VehicleMasterSearchComponent, + VehicleMasterAddComponent, + VehicleMasterLanguageComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + CommonModule, + FileUploadModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + RouterModule.forChild(routes) + ] +}) +export class VehicleMasterModule { } diff --git a/src/app/modules/services/activity-services/activity-services.module.ts b/src/app/modules/services/activity-services/activity-services.module.ts new file mode 100644 index 0000000..c67f425 --- /dev/null +++ b/src/app/modules/services/activity-services/activity-services.module.ts @@ -0,0 +1,31 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +// import { ExpServicesComponent } from './exp-services/exp-services.component'; +const routes: Routes = [ + { + path: 'ExpServices', + loadChildren: () => + import('./exp-services/exp-services.module').then( + (m) => m.ExpServicesModule + ), + }, + { + path: 'HotelZone', + loadChildren: () => + import('./hotel-zone-services/hotel-zone-services.module').then( + (m) => m.HotelZoneServicesModule + ), + }, + + { + path: '', + pathMatch: 'full', + redirectTo: 'search', + }, +]; +@NgModule({ + declarations: [], + imports: [CommonModule, RouterModule.forChild(routes)], +}) +export class ActivityServicesModule {} diff --git a/src/app/modules/services/activity-services/exp-services/exp-manage-translation/exp-manage-translation.component.html b/src/app/modules/services/activity-services/exp-services/exp-manage-translation/exp-manage-translation.component.html new file mode 100644 index 0000000..2693514 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-manage-translation/exp-manage-translation.component.html @@ -0,0 +1,236 @@ +
    + + Back +
    +
    Experience Manage Translation
    +
    +
    +
    +
    + + + +
    + +
    Service Language
    +
    + +
    +
    +
    +
    + + + +
    + +
    Service Language
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    Default Language Content
    +
    Selected Language Content
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + Day Wise Itinerary +
    +
    + Day Wise Itinerary +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-manage-translation/exp-manage-translation.component.ts b/src/app/modules/services/activity-services/exp-services/exp-manage-translation/exp-manage-translation.component.ts new file mode 100644 index 0000000..7da584a --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-manage-translation/exp-manage-translation.component.ts @@ -0,0 +1,196 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { MessageService } from 'primeng/api'; +import { ActivityContent } from 'src/app/core/models/Experience-Service/experience-manage-languag/experience-manage-lang.model'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-exp-manage-translation', + templateUrl: './exp-manage-translation.component.html', +}) +export class ExpManageTranslationComponent implements OnInit { + + constructor(private ApiServ: API, private router: Router, public MsgService : MessageService ,private route: ActivatedRoute, public fb: FormBuilder) { } + formdata: FormGroup + ServiceLanguages; + Languages; + ngOnInit(): void { + this.GetLOVLanguage(); + this.GetDefaultActivity(); + this.formdata = this.fb.group({ + language_code: [''], + def_language_code: [''], + activity_name: [''], + def_activity_name: [''], + departure_point: [''], + def_departure_point: [''], + meeting_point: [''], + def_meeting_point: [''], + drop_point: [''], + def_drop_point: [''], + activity_highlight: [''], + def_activity_highlight: [''], + activity_description: [''], + def_activity_description: [''], + activity_restriction: [''], + def_activity_restriction: [''], + activities_details: [''], + def_activities_details: [''], + activity_inclusion: [''], + def_activity_inclusion: [''], + activity_exclusion: [''], + def_activity_exclusion: [''], + additional_pick_up_details: [''], + def_additional_pick_up_details: [''], + daywise_itinerary: this.fb.array([]), + }) + } + + + /** + * @author Abdul Razzak + * to get LOV data + */ + GetLOVLanguage() { + let formdata = { + "lov_types": [{ "lov_type": "Language" }], + "lov_lang": "en" + } + this.ApiServ.Post("/LovMaster/GetLov", formdata).subscribe(data => { + if (data) { + console.log(data) + this.ServiceLanguages = data['responseObject']['0']['keys']; + this.Languages = data['responseObject']['0']['keys']; + } + }); + }; + + // GetActivityContent() { + // this.ApiServ.Get('/Activity/GetActivityContent/') + // } + activity_id; + GetDefaultActivity() { + this.route.queryParams.subscribe(d => { + if (d['id']) { + this.activity_id = d['id'] + this.GetActivityDetails(d['id'],'','def_'); + } + }); + }; + + getactivity(){ + let lang = this.formdata.get('language_code').value; + this.GetActivityDetails(this.activity_id , lang , false); + } + GetActivityDetails(Id,lang,check){ + this.ApiServ.Get('/Activity/GetActivityContent/' + Id + '?LangCode=' + lang).subscribe(data => { + if (data) { + console.log(data,) + this.Setvalue(data.responseObject, check) + } + }); + } + Setvalue(data, check) { + let value = this.formdata.getRawValue() + Object.keys(value).forEach(e => { + let controlname = check ? check + e : e; + if ( e == 'activity_name' || e == 'departure_point' + || e == 'meeting_point' + || e == 'additional_pick_up_details' + || e == 'drop_point' || e == 'activity_highlight' || e == 'activity_description' + || e == 'activity_restriction' || e == 'activities_details' || e == 'activity_inclusion' || e == 'activity_exclusion' + ) { + this.formdata.get(controlname).setValue(data ? data[e] : ''); + }else if(e == 'language_code'){ + if(check){ + debugger + this.formdata.get(controlname).setValue(data ? data[e] : ''); + let list = this.Languages + let ind = this.Languages.findIndex(d => d.lov_value == data[e]); + list.splice(ind, 1); + this.Languages = [...list] + } + } else if (e == 'daywise_itinerary') { + if(data){ + let daywiseObj = JSON.parse(data[e]); + if (daywiseObj.length > 0 && daywiseObj) { + daywiseObj.forEach((e, l) => { + check ? this.CreateitineraryGroup(e) : ''; + let html = check ? check + 'Text_html' : 'Text_html'; + this.formdata.get('daywise_itinerary')['controls'][l].get(html).setValue(data ? e.Text_html : ''); + }) + } + } else this.cleardayswiseitinerary() + } + }) + } + + cleardayswiseitinerary(){ + this.formdata.get('daywise_itinerary')['controls'].forEach(e => { + e.get('Text_html').setValue(''); + }) + }; + + CreateitineraryGroup(data) { + let controller = this.formdata.get('daywise_itinerary') as FormArray; + controller.push(this.fb.group({ + Text_html: [], + def_Text_html: [], + city_code: [data.city_code], + country_code: [data.country_code], + })); + }; + + SaveActivityLang(){ + let value = this.formdata.getRawValue(); + let postdata = new ActivityContent(); + postdata.activity_id = this.activity_id; + postdata.activity_name = value.activity_name; + postdata.supplier_id = '1232'; + postdata.language_code = value.language_code; + postdata.departure_point = value.departure_point; + postdata.meeting_point = value.meeting_point; + postdata.additional_pick_up_details = value.additional_pick_up_details; + postdata.drop_point = value.drop_point; + postdata.activity_highlight = value.activity_highlight; + postdata.activity_description = value.activity_description; + postdata.activity_restriction = value.activity_restriction; + postdata.activities_details = value.activities_details; + postdata.activity_inclusion = value.activity_inclusion; + postdata.activity_exclusion = value.activity_exclusion; + let dayswiseitinerary = [] + + if(value.daywise_itinerary){ + value.daywise_itinerary.forEach(e => { + dayswiseitinerary.push({ + 'Text_html' : e.Text_html, + 'country_code' : e.country_code, + 'city_code' : e.city_code, + }) + }) + } + postdata.daywise_itinerary = JSON.stringify(dayswiseitinerary); + this.ApiServ.Post('/Activity/SaveContentDetails' ,postdata).subscribe((res) => { + if(res){ + this.showToastrMsg(res); + } + }); + }; + + showToastrMsg(respData) { + this.MsgService.add({ + severity: respData['status'] ? 'success' : 'error', + detail: respData['message'], + }); + setTimeout(() => { + respData['status'] ? this.btnClick() : ''; + }, 500); + }; + + btnClick() { + this.router.navigateByUrl("/Services/ActivityServices/ExpServices/Search"); + }; + +} + diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-add/exp-services-add.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-add/exp-services-add.component.html new file mode 100644 index 0000000..4bebddd --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-add/exp-services-add.component.html @@ -0,0 +1,802 @@ +
    + + Back +
    +
    +
    Add Experience
    +
    +
    +
    + + + Please enter experience name + +
    +
    +
    +
    + + + + Please select experience category + +
    +
    + + + + Please select experience sub category + +
    +
    + +
    +
    + + + Please select + phone + code + +
    +
    + + Please enter + phone number + + accept only + number + +
    +
    +
    +
    +
    +
    + + + + Please select service language + +
    +
    + + + {{ item.lov_value }} + + Please select default language + +
    +
    + +
    +
    + + + Please select days + +
    +
    + + + Please select hours + +
    +
    + + + Please select minutes + +
    +
    +
    +
    +
    +
    + + + + Please + select country + +
    +
    + + + + Please select city + +
    +
    + + + +
    + +
    Starting City
    +
    + +
    +
    + Please select starting city + +
    +
    +
    +
    + + + + Please select pickup included + +
    +
    + + + + + Please select pickup point + +
    +
    + + + + + Please select hotel pickup + +
    +
    +
    + +
    + + + + +
    +
    +
    +
    +
    +
    + + + + + Please select hotels + +
    +
    + +
    + + + + +
    +
    +
    +
    +
    + + + +
    +
    + +
    + + + + +
    +
    +
    + +
    +
    + + + Please enter departure point + +
    +
    + +
    + + + + +
    +
    +
    +
    +
    + + + Please enter meeting point +
    +
    + +
    +
    + + + Please select hours + +
    +
    + + + Please select minutes +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + + + +
    +
    + + + Please enter drop off point + +
    +
    +
    +
    + + + + + Please select min travelers + +
    +
    + + + + + Please select Max travelers + +
    +
    + +
    + +
    Adult
    +
    +
    + +
    + + + + + +
    +
    +
    +
    + +
    Senior
    +
    +
    + +
    + + + + + + +
    +
    +
    +
    + +
    Youth
    +
    +
    + +
    + + + + + + +
    +
    +
    +
    + +
    Child
    +
    +
    + +
    + + + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + + + + +
    +
    +
    +
    + +
    Child Seat Included
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    Day Wise Itinerary
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + + +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + + +
    +
    +
    +
    +
    + +
    +
    date.PNG
    +
    490 B
    +
    + +
    +
    +
    +
    +
    +
    + Please choose image +
    +
    + +
    + + +
    +
    +
    +
    +
    date.PNG
    +
    490 B
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    + + +
    +
    +
    +
    +
    +
    Traveler Required Information
    +
    +
    +
    + {{group.get('header_name').value }} + +
    +
    + {{item.get('requirement_name').value }} + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-add/exp-services-add.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-add/exp-services-add.component.ts new file mode 100644 index 0000000..e2803c7 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-add/exp-services-add.component.ts @@ -0,0 +1,971 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { MessageService } from 'primeng/api'; +import { Observable, ReplaySubject } from 'rxjs'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ActivityContent, experience_add } from 'src/app/core/models/Experience-Service/experience-sevice-add/experience-service-add.model'; +import { API } from 'src/app/core/services/api.service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-exp-services-add', + templateUrl: './exp-services-add.component.html', +}) +export class ExpServicesAddComponent implements OnInit { + + selectedCities: string[] = []; + uploadedFiles: any[] = []; + // + user_id = '2205290611511299310' + // + formData: FormGroup; + Experience_Type; + SubCategory; + Service_Language; + CategroyDetails; + activity_id; + AllHotelContent; + HotelPickupPointType; + HotelPickupType; + showThumbnailImg: boolean; + allCityDetials = []; + Allstartingcity = []; + sequence = []; + AdultNoArray = []; + childNoArray = []; + InfantNoArray = []; + SaveBtn = false; + AllCountry; + AllActivityHotelZone; + PhoneCode; + constructor( + private messageService: MessageService, + public ApiServ: API, + public Fb: FormBuilder, + private route: ActivatedRoute, + private router: Router, + public validationService: ValidationService, + public CommonVari: StaticDataService + ) { } + + + ngOnInit(): void { + + this.GetCountryPhone(); + this.agelength(); + this.showThumbnailImg = false + this.ngOinitForm(); + this.allCityDetials.push(''); + this.GetAllRequirementView(); + this.GetLOVLanguage(); + this.getexperienceCate(); + this.GetAllHotel(); + this.GetLOVHotelPickupPointType(); + this.GetLOVHotelPickupType(); + this.getCountry(); + this.PickupIncludes('No'); + this.GetAllActivityHotelZone(); + this.getID(); + } + + + ngOinitForm(){ + this.formData = this.Fb.group({ + activity_name: this.validationService.required, + category_id: this.validationService.required, + Sub_Category: this.validationService.required, + emergency_phone_nbr: this.validationService.mobNo, + emergency_phone_code: this.validationService.required, + default_lang_code: this.validationService.required, + _service_language: this.validationService.required, + service_days: this.validationService.required, + service_hours: this.validationService.required, + service_minutes: this.validationService.required, + country_code: this.validationService.required, + starting_city: this.validationService.required, + city_id: this.validationService.required, + is_pickup_included: this.validationService.required, + additional_pick_up_details: [''], + Requirment: this.Fb.array([]), + pickup_hotel: [''], + is_drop_included: ['No'], + drop_point: [''], + min_pax: this.validationService.required, + max_pax: this.validationService.required, + + is_adult: [true], + adult_age_from: this.validationService.required, + adult_age_to: this.validationService.required, + + is_senior: [false], + senior_age_from: [null], + senior_age_to: [null], + + is_youth: [false], + youth_age_from: [null], + youth_age_to: [null], + + is_child: [false], + child_age_from: [null], + child_age_to: [null], + + max_child_count: [''], + free_child_age_from: [null], + free_child_age_to: [null], + is_child_seat: [false], + Itinerary: this.Fb.array([ + ]), + activity_highlight: [''], + activity_description: [''], + activity_restriction: [''], + activities_details: [''], + activity_inclusion: [''], + activity_exclusion: [''], + VideoURL: this.Fb.array([ + this.Fb.group({ activity_videos: [''] }) + ]), + thumnailImg: this.validationService.required, + images: this.Fb.array([]), + }) + } + getCountry() { + this.ApiServ.Get('/Country/GetCountry').subscribe(data => { + if (data) { + this.AllCountry = data; + } + }); + }; + + GetStartingCity(check) { + let val = this.formData.getRawValue(); + let allcity = []; + val.city_id.forEach(e => { + let city = this.allCityDetials[0].filter(a => a.city_id == e) + allcity.push(...city); + }); + this.Allstartingcity = allcity; + if (val.city_id.length > 1) { + check ? this.formData.get('starting_city').setValue('') : ''; + } else { + this.formData.get('starting_city').setValue(val.city_id.join(',')) + } + }; + + getID() { + this.route.queryParams.subscribe(d => { + if (d['id']) { + this.activity_id = d['id'] + this.ApiServ.Get('/Activity/GetActivity/' + d['id']).subscribe(data => { + if (data) { + this.AllSetvalue(data['responseObject']); + } + }); + } + }); + }; + getcity(countryId, check, ind , startcity) { + this.allCityDetials[ind] = []; + this.allCityDetials[ind].push(...[]); + let countrycode; + if (check == 'set') countrycode = countryId; + else { + let country_code = []; + countryId.map(d => { + country_code.push(d.alpha_2_code); + }); + countrycode = country_code; + } + if (check == 'CountryManda') this.formData.get('city_id').setValue(''); + if (countrycode.length > 0) { + this.ApiServ.Get('/City/GetCity/' + countrycode.join(',')).subscribe(data => { + if (data) { + this.allCityDetials[ind] = []; + this.allCityDetials[ind].push(...data); + startcity ? this.GetStartingCity(false) : ''; + } + }); + } + }; + + getexperienceCate() { + this.ApiServ.Get('/ActivityCategoryMaster/GetAllCategory').subscribe(data => { + if (data) { + this.Experience_Type = data['responseObject'] + } + }); + }; + + GetCountryPhone() { + this.ApiServ.Get('/CountryPhone/GetCountryPhone').subscribe(data => { + if (data) { + this.PhoneCode = data + } + }); + }; + + AllSetvalue(d) { + let value = this.formData.getRawValue() + Object.keys(value).forEach(e => { + if (e == 'thumnailImg') { + this.formData.get(e).setValue(d['thumbnail_image']) + d['thumbnail_image'] != "" ? this.showThumbnailImg = true : this.showThumbnailImg = false + } else if (e == 'images') { + let multiImgs = JSON.parse(d['activity_images']) + this.setmultiimage(multiImgs); + } else if (e == 'category_id') { + this.formData.get(e).setValue(d['category_id']); + let sub_category_id = d['sub_category_id'].split(','); + this.GetSubCategory(d['category_id']); + setTimeout(() => { + this.formData.get('Sub_Category').setValue(sub_category_id); + }, 50); + } else if (e == "country_code") { + let value = d[e] ? d[e].split(",") : null; + this.getcity(value, 'set', 0 , true); + this.formData.get(e).setValue(value); + let city = d['city_id'] ? d['city_id'].split(",") : null; + this.formData.get('city_id').setValue(city); + + this.formData.get('starting_city').setValue(d['starting_city']); + } + else if (e == '_service_language') { + let value = d[e] ? d[e].split(",") : null; + this.formData.get(e).setValue(value); + } else if (e == 'default_lang_code') { + this.formData.get(e).setValue(d[e]); + } + else if (e == 'VideoURL') { + this.setUrlLink(d['activity_videos']); + } + else if (e == 'activity_name' || e == 'departure_point' || e == 'activity_highlight' + || e == 'activity_description' || e == 'activity_restriction' || e == 'activities_details' || + e == 'activity_exclusion' || e == 'activity_inclusion' || e == 'drop_point' || e == 'additional_pick_up_details') { + this.formData.get(e).setValue(d['activityContents'][0][e] ? d['activityContents'][0][e] : ""); + } + else if (e == 'is_drop_included') { + if (e == 'is_drop_included') { + this.formData.get(e).setValue(d[e] ? 'Yes' : 'No'); + this.dropoffvalid(d[e] ? 'Yes' : 'No'); + } + } else if (e == 'is_pickup_included') { + this.formData.get(e).setValue(d[e] ? 'Yes' : 'No'); + this.PickupIncludes(d[e] ? 'Yes' : 'No'); + if (!d[e]) { + this.formData.get('meeting_before_hour').setValue(d['meeting_before_hour']); + this.formData.get('meeting_before_minute').setValue(d['meeting_before_minute']); + this.formData.get('meeting_point').setValue(d['activityContents'][0]['meeting_point']); + } else if (d[e]) { + this.formData.get('_pickup_point_type').setValue(parseInt(d['_pickup_point_type'])) + this.PickupPointValid(); + if (d['_pickup_point_type'] == '2') { + this.formData.get('departure_point').setValue(d['activityContents'][0]['departure_point']) + this.formData.get('departure_hour').setValue(d['pickup_before_hour']) + this.formData.get('departure_minute').setValue(d['pickup_before_minute']) + } else if (d['_pickup_point_type'] == '1') { + this.formData.get('_hotel_pickup_type').setValue(parseInt(d['_hotel_pickup_type'])); + this.Hotel_Type_AddPickupValid(); + if (d['_hotel_pickup_type'] == '1') { + this.formData.get('All_Hotel_hour').setValue(d['pickup_before_hour']) + this.formData.get('All_Hotel_minute').setValue(d['pickup_before_minute']) + } else if (d['_hotel_pickup_type'] == '2') { + let pickup_hotel = d['pickup_hotel'].split(','); + this.formData.get('pickup_hotel').setValue(pickup_hotel); + this.formData.get('Specific_Hotel_hour').setValue(d['pickup_before_hour']); + this.formData.get('Specific_Hotel_minute').setValue(d['pickup_before_minute']); + } else if (d['_hotel_pickup_type'] == '3') { + let hotel_zone = d['hotel_zone'].split(','); + this.formData.get('hotel_zone').setValue(hotel_zone); + this.formData.get('hotel_zone_hour').setValue(d['pickup_before_hour']); + this.formData.get('hotel_zone_minute').setValue(d['pickup_before_minute']); + } + } + } + } else if (e == "is_adult" || e == "is_senior" || e == "is_youth" || e == "is_child") { + if (e == "is_adult" && d['is_adult']) { + this.formData.get(e).setValue(d[e]); + this.adultValid(d[e]); + this.formData.get('adult_age_from').setValue(d['adult_age_from']); + this.formData.get('adult_age_to').setValue(d['adult_age_to']); + } else if (e == "is_senior" && d['is_senior']) { + this.formData.get(e).setValue(d[e]); + this.SeniorValid(d[e]); + this.formData.get('senior_age_from').setValue(d['senior_age_from']); + this.formData.get('senior_age_to').setValue(d['senior_age_to']); + } else if (e == "is_youth" && d['is_youth']) { + this.formData.get(e).setValue(d[e]); + this.YouthValid(d[e]); + this.formData.get('youth_age_from').setValue(d['youth_age_from']); + this.formData.get('youth_age_to').setValue(d['youth_age_to']); + } else if (e == "is_child" && d['is_child']) { + this.formData.get(e).setValue(d[e]); + this.ChildValid(d[e]); + this.formData.get('child_age_from').setValue(d['child_age_from']); + this.formData.get('child_age_to').setValue(d['child_age_to']); + } + } else if (e == 'Requirment') { + let required = d['requirements'] ? d['requirements'].split(',') : false; + if (required) { + this.Requirment.controls.forEach(x => { + Object.keys(x['controls']).forEach(l => { + let check = required.filter(m => m == x.get('header_id').value); + if (check.length > 0) { + x.get('is_header').setValue(true); + x.get('requirements')['controls'].forEach(re => { + Object.keys(re['controls']).forEach(li => { + let check = required.filter(m => m == re.get('requirement_id').value); + if (check.length > 0) re.get('is_requirement').setValue(true); + }) + }); + } + }) + }) + } + } + else if (e == 'max_pax' || e == 'min_pax' || e == 'emergency_phone_nbr' || e == 'emergency_phone_code' || e == 'service_minutes' || + e == 'service_hours' || e == 'is_child_seat' || e == 'max_child_count' + || e == 'free_child_age_to' || e == 'free_child_age_from') { + this.formData.get(e).setValue(d[e]); + } else if (e == 'service_days') { + this.formData.get(e).setValue(d[e]); + this.DaysItineryForm(d[e]); + let obj = JSON.parse(d['activityContents'][0]['daywise_itinerary']); + obj.forEach((z, i) => { + Object.keys(z).forEach((q) => { + if (q == 'Text_html') { + this.Itinerary.controls[i].get(q).setValue(z[q]); + } else if (q == 'country_code') { + this.Itinerary.controls[i].get(q).setValue(z[q]); + this.getcity(z[q], 'set', i + 1 , false); + this.Itinerary.controls[i].get('city_code').setValue(z['city_code']); + } + }) + }) + } + }); + }; + + + setUrlLink(URL) { + let val = JSON.parse(URL); + val.map((valLi, i) => { + i != 0 ? this.addvideo() : ""; + this.VideoURl.controls[i].get('activity_videos').setValue(valLi.activity_videos); + }); + }; + setmultiimage(image) { + this.MultiImageGallery = []; + image.map((valLi, i) => { + this.addPackageImgGallery(); + this.ImgGallery.controls[i].get('image_url').setValue(valLi.image_url); + this.MultiImageGallery.push(valLi.image_url); + }); + } + + + // get form controls + + get allFormGroup() { + return this.formData.getRawValue(); + }; + get VideoURl() { + return this.formData.get('VideoURL') as FormArray; + }; + get Requirment() { + return this.formData.get('Requirment') as FormArray; + }; + // GetDetailsByID(id) { + // this.ApiServ.Get('/GetHotel/{Id}') + // } + + GetAllHotel() { + this.ApiServ.Get('/HotelContent/GetAllHotelContent').subscribe(data => { + if (data) { + this.AllHotelContent = data['responseObject']; + } + }); + }; + + GetSubCategory(value) { + this.formData.get('Sub_Category').setValue('') + this.ApiServ.Get('/ActivityCategoryMaster/GetSubCategory?Id=' + value).subscribe(data => { + if (data) { + this.SubCategory = data['responseObject'] + } + }); + }; + + GetLOVHotelPickupPointType() { + let formdata = { + "lov_types": [{ "lov_type": "HotelPickupPointType" }], + "lov_lang": "en" + } + this.ApiServ.Post("/LovMaster/GetLov", formdata).subscribe(data => { + if (data) { + console.log(data) + this.HotelPickupPointType = data['responseObject']['0']['keys'] + console.log(this.HotelPickupPointType) + } + }); + }; + requirementCheck(check, formgroup) { + if (check) { + formgroup.get('requirements').controls.forEach(e => { + e.get('is_requirement').setValue(true); + }) + } else { + formgroup.get('requirements').controls.forEach(e => { + e.get('is_requirement').setValue(false); + }) + } + } + + + GetLOVHotelPickupType() { + let formdata = { + "lov_types": [{ "lov_type": "HotelPickupType" }], + "lov_lang": "en" + } + this.ApiServ.Post("/LovMaster/GetLov", formdata).subscribe(data => { + if (data) { + console.log(data) + this.HotelPickupType = data['responseObject']['0']['keys'] + console.log(this.HotelPickupPointType) + } + }); + }; + + GetLOVLanguage() { + let formdata = { + "lov_types": [{ "lov_type": "Language" }], + "lov_lang": "en" + } + this.ApiServ.Post("/LovMaster/GetLov", formdata).subscribe(data => { + if (data) { + console.log(data) + this.Service_Language = data['responseObject']['0']['keys'] + console.log(this.Service_Language) + } + }); + }; + + // save + + SaveFormData() { + let value = this.formData.getRawValue(); + if (this.formData.status == "INVALID") { + this.validationService.showValidationsMsg(this.formData); + const firstElementWithError = document.querySelector('.ng-invalid'); + if (firstElementWithError) { + firstElementWithError.scrollIntoView({ behavior: 'smooth' }); + } + return; + } + this.SaveBtn = true; + + let org_id = '2105311837100000021'; + let supplier_id = '2205221841391724322'; + + let dataArr = []; + let postArrayData = new ActivityContent(); + postArrayData.activity_name = value.activity_name; + postArrayData.meeting_point = value.is_pickup_included == 'No' ? value.meeting_point : ''; + postArrayData.drop_point = value.is_drop_included == 'Yes' ? value.drop_point : ""; + postArrayData.activity_highlight = value.activity_highlight; + postArrayData.activity_description = value.activity_description; + postArrayData.activity_restriction = value.activity_restriction; + postArrayData.activities_details = value.activities_details; + postArrayData.activity_inclusion = value.activity_inclusion; + postArrayData.activity_exclusion = value.activity_exclusion; + postArrayData.org_id = org_id; + let daysiternery = this.Itinerary.getRawValue(); + postArrayData.daywise_itinerary = JSON.stringify(daysiternery); + postArrayData.additional_pick_up_details = value.additional_pick_up_details; + + postArrayData.language_code = 'EN'; // + postArrayData.supplier_id = supplier_id; // + dataArr.push(postArrayData) + + // undefine hardcode + postArrayData.activity_content_id = ''; + postArrayData.activity_id = this.activity_id ? this.activity_id : ""; + postArrayData.created_by = 'Razzak'; + postArrayData.updated_by = 'Razzak'; + // + + // + let PostData = new experience_add(); + PostData.org_id = org_id; + PostData.category_id = value.category_id; + PostData._pickup_point_type = value.is_pickup_included == 'Yes' ? value._pickup_point_type.toString() : ''; + PostData._service_language = value._service_language.join(","); + PostData.default_lang_code = value.default_lang_code; + PostData.emergency_phone_code = value.emergency_phone_code; + PostData.emergency_phone_nbr = value.emergency_phone_nbr; + + PostData.service_days = value.service_days; + PostData.service_hours = value.service_hours; + PostData.service_minutes = value.service_minutes; + PostData.supplier_id = supplier_id; // + PostData.activity_id = this.activity_id ? this.activity_id : ""; + + // undefined hardcode + PostData.sub_category_id = value.Sub_Category.join(","); + PostData.activity_content_json = ''; + PostData.category_name = ''; + + this.Requirment.getRawValue(); + let AllReqirement = this.Requirment.getRawValue(); + let All_Id = []; + AllReqirement.forEach(e => { + if (e.is_header) { + All_Id.push(e.header_id); + if (e.requirements) { + e.requirements.forEach(d => { + d.is_requirement ? All_Id.push(d.requirement_id) : ''; + }); + }; + }; + }); + PostData.requirements = All_Id.length > 0 ? All_Id.join(',') : ''; + PostData.starting_city = value.starting_city; + // multi images + this.ImageGalleryArr = []; + value.images.map((galLi, i) => { + if (typeof (galLi.image_url) == 'object') { + this.fileArr.push(galLi.image_url); + this.fileInfo.push({ 'fileName': "Activity/Add_Act_Id_gallery_" + (i + 1) + "." + galLi.image_url.name.split('.')[1], 'pathToSave': 'ThemeImages/ORGID' }); + } + let imagedata = { + image_url: typeof (galLi.image_url) == 'object' ? environment.cdnFileUrl + "ThemeImages/ORGID/Activity/Add_Act_Id_gallery_" + (i + 1) + "." + galLi.image_url.name.split('.')[1] : galLi.image_url, + sequence: i + 1 + } + this.ImageGalleryArr.push(imagedata); + }); + PostData.activity_images = JSON.stringify(this.ImageGalleryArr); + + // thumnail images + + if (typeof (value.thumnailImg) == 'object') { + this.fileArr.push(value.thumnailImg); + this.fileInfo.push({ 'fileName': "Activity/Add_Act_Id." + value.thumnailImg.name.split('.')[1], 'pathToSave': 'ThemeImages/ORGID' }); + } + let thumnail_img = typeof (value.thumnailImg) == 'object' ? environment.cdnFileUrl + "ThemeImages/ORGID/Activity/Add_Act_Id." + value.thumnailImg.name.split('.')[1] : value.thumnailImg.split('.')[0]; + PostData.thumbnail_image = thumnail_img; + + PostData.created_by = '' + PostData.updated_by = '' + PostData.activity_videos = JSON.stringify(this.VideoURl.getRawValue()) + + PostData.country_code = value.country_code.join(","); + PostData.city_id = value.city_id.join(","); + + // condition based pickup before time + postArrayData.departure_point = ''; + PostData._hotel_pickup_type = ''; + PostData.pickup_hotel = ''; + PostData.hotel_zone = ''; + if (value.is_pickup_included == 'Yes') { + if (value._pickup_point_type == 2) { + postArrayData.departure_point = value.departure_point; + PostData.pickup_before_hour = value.departure_hour; + PostData.pickup_before_minute = value.departure_minute; + } else if (value._pickup_point_type == 1) { + PostData._hotel_pickup_type = value._hotel_pickup_type.toString(); + if (value._hotel_pickup_type == 1) { + PostData.pickup_before_hour = value.All_Hotel_hour; + PostData.pickup_before_minute = value.All_Hotel_minute; + } else if (value._hotel_pickup_type == 2) { + PostData.pickup_hotel = value.pickup_hotel.join(','); + PostData.pickup_before_hour = value.Specific_Hotel_hour; + PostData.pickup_before_minute = value.Specific_Hotel_minute; + } else if (value._hotel_pickup_type == 3) { + PostData.hotel_zone = value.hotel_zone.join(','); + PostData.pickup_before_minute = value.hotel_zone_hour; + PostData.pickup_before_hour = value.hotel_zone_minute; + } + } + } + + PostData.is_pickup_included = value.is_pickup_included == 'No' ? false : true; + PostData.meeting_before_hour = value.is_pickup_included == 'No' ? value.meeting_before_hour : 0; + PostData.meeting_before_minute = value.is_pickup_included == 'No' ? value.meeting_before_minute : 0; + ///// + PostData.is_drop_included = value.is_drop_included == 'No' ? false : true; + PostData.min_pax = value.min_pax; + PostData.max_pax = value.max_pax; + PostData.is_adult = value.is_adult; + PostData.adult_age_from = value.is_adult ? value.adult_age_from : 0; + PostData.adult_age_to = value.is_adult ? value.adult_age_to : 0; + PostData.is_senior = value.is_senior; + PostData.senior_age_from = value.is_senior ? value.senior_age_from : 0; + PostData.senior_age_to = value.is_senior ? value.senior_age_to : 0; + PostData.is_youth = value.is_youth; + PostData.youth_age_from = value.is_youth ? value.youth_age_from : 0; + PostData.youth_age_to = value.is_youth ? value.youth_age_to : 0; + PostData.is_child = value.is_child; + PostData.child_age_from = value.is_child ? value.child_age_from : 0; + PostData.child_age_to = value.is_child ? value.child_age_to : 0; + PostData.max_child_count = value.is_child ? value.max_child_count ? value.max_child_count : 0 : 0; + PostData.free_child_age_from = value.is_child ? value.free_child_age_from ? value.free_child_age_from : 0 : 0; + PostData.free_child_age_to = value.is_child ? value.free_child_age_to ? value.free_child_age_to : 0 : 0; + PostData.is_child_seat = value.is_child_seat; + PostData.activityContents = dataArr; + + + if (this.activity_id) { + this.ApiServ.Post('/Activity/UpdateActivity', PostData).subscribe(data => { + if (data) { + (data['status'] && this.fileInfo.length > 0) ? this.saveImg(data, this.fileArr, this.fileInfo) : this.showToastrMsg(data); + + } + }); + } else { + this.ApiServ.Post('/Activity/SaveActivity', PostData).subscribe(data => { + if (data) { + (data['status'] && this.fileInfo.length > 0) ? this.saveImg(data, this.fileArr, this.fileInfo) : this.showToastrMsg(data); + } + }); + } + } + + showToastrMsg(respData) { + this.messageService.add({ + severity: respData['status'] ? 'success' : 'error', + detail: respData['message'], + }); + this.SaveBtn = false; + setTimeout(() => { + respData['status'] ? this.btnClick() : ''; + }, 500); + } + // ng select + + + + option = [ + { id: 0, name: 'Yes' }, + { id: 1, name: 'No' }, + ]; + + optionDropOff = [ + { id: 0, name: 'Yes' }, + { id: 1, name: 'No' }, + ]; + selectOption = this.option[0].name; + + onUpload(event: { files: any }) { + for (let file of event.files) { + this.uploadedFiles.push(file); + } + + this.messageService.add({ + severity: 'info', + summary: 'File Uploaded', + detail: '', + }); + } + + addvideo() { + this.VideoURl.push(this.Fb.group({ activity_videos: [''] })) + } + removevideo(index: number) { + this.VideoURl.removeAt(index) + } + + + // hours and minutes option dropdown + + agelength() { + for (let i = 0; i <= 100; i++) { + i >= 0 && i <= 18 ? this.childNoArray.push({ value: i }) : ""; + i >= 0 && i <= 2 ? this.InfantNoArray.push({ value: i }) : ""; + this.AdultNoArray.push({ value: i }) + i != 0 ? this.sequence.push(i) : '' + }; + }; + + + + GetAllRequirementView() { + this.ApiServ.Get('/ActivityRequirement/GetAllRequirementView').subscribe(res => { + if (res) { + let requirementObj = res.responseObject.sort((a, b) => a.header_sequence - b.header_sequence); + requirementObj.forEach((e, i) => { + let req_menu = e.requirements.sort((a, b) => a.sub_sequence - b.sub_sequence) + this.Requirment.push( + this.Fb.group({ + header_name: [e.header_name], + header_id: [e.header_id], + is_header: [false], + requirements: this.Fb.array([ + ]) + }) + ) + if (req_menu) { + req_menu.forEach(d => { + let form = this.Requirment.controls[i].get('requirements') as FormArray; + form.push(this.Fb.group({ + requirement_id: [d.requirement_id], + requirement_name: [d.requirement_name], + is_requirement: [false] + })) + }) + } + }) + } + }) + } + + + + + + /// images save + fileArr = []; + fileInfo = []; + + // + MultiImageGallery = []; + ImageGalleryArr = []; + get ImgGallery() { + return this.formData.get('images') as FormArray; + } + get Itinerary() { + return this.formData.get('Itinerary') as FormArray; + } + + + getMultiGalleryImg(e) { + console.log(e) + if (e.currentFiles.length != 0) { + for (let i = 0; i < e.files.length; i++) { + this.addPackageImgGallery(); + let file = e.files[i]; + this.ImgGallery.controls[this.MultiImageGallery.length + i].get('image_url').setValue(file) + //base 64 + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => { + this.MultiImageGallery.push(reader.result) + }; + } + } + } + emptyImgGallery(i) { + this.ImgGallery.removeAt(i); + this.MultiImageGallery.splice(i, 1); + console.log(this.MultiImageGallery) + } + + + addPackageImgGallery() { + this.ImgGallery.push( + this.Fb.group({ + image_url: [''], + sequence: [''] + }) + ) + } + ///// + getThumnailImg(e) { + this.onFileSelected(e) + if (e.currentFiles.length != 0) { + let file = e.files[0]; + this.showThumbnailImg = true + this.formData.get('thumnailImg').setValue(file); + } + }; + base64Output; + onFileSelected(event) { + this.convertFile(event.files[0]).subscribe(base64 => { + if (base64) { + this.base64Output = 'data:image/png;base64,' + base64; + console.log(this.base64Output); + } + }); + } + convertFile(file: File): Observable { + const result = new ReplaySubject(1); + const reader = new FileReader(); + reader.readAsBinaryString(file); + reader.onload = (event) => result.next(btoa(event.target.result.toString())); + return result; + } + + emptyThunailImg() { + this.base64Output = ''; + this.showThumbnailImg = false + this.formData.get('thumnailImg').setValue(''); + }; + + + btnClick() { + this.router.navigate(['/Services/ActivityServices/ExpServices/Search']); + } + saveImg(respData, file_arr, file_info) { + var formdata = new FormData(); + file_arr.forEach(x => { + formdata.append("files", x); + }) + let Id = this.activity_id ? this.activity_id : respData['responseObject'].activity_id; + let a = JSON.stringify(file_info).replaceAll('Add_Act_Id', Id); + formdata.append("fileInfo", a); + + this.ApiServ.PostFile('/FileUpload/SaveFile', formdata).subscribe(imdata => { + if (imdata['status']) { + this.showToastrMsg(respData) + } + }); + } + + // add validation + PickupIncludes(val) { + if (val == 'No') { + this.formData.addControl('meeting_point', this.Fb.control('', Validators.required)); + this.formData.addControl('meeting_before_hour', this.Fb.control(null, Validators.required)); + this.formData.addControl('meeting_before_minute', this.Fb.control(null, Validators.required)); + this.formData.removeControl('_pickup_point_type'); + } else { + this.formData.addControl('_pickup_point_type', this.Fb.control(1, [Validators.required])); + this.formData.removeControl('meeting_point'); + this.formData.removeControl('meeting_before_hour'); + this.formData.removeControl('meeting_before_minute'); + this.PickupPointValid(); + } + + } + PickupPointValid() { + let val = this.formData.getRawValue(); + if (val._pickup_point_type == 1) { + this.formData.removeControl('departure_point'); + this.formData.removeControl('departure_hour'); + this.formData.removeControl('departure_minute'); + this.formData.addControl('_hotel_pickup_type', this.Fb.control(1, Validators.required)); + this.Hotel_Type_AddPickupValid(); + } else { + this.formData.removeControl('_hotel_pickup_type'); + this.formData.addControl('departure_point', this.Fb.control('', Validators.required)); + this.formData.addControl('departure_hour', this.Fb.control(null, Validators.required)); + this.formData.addControl('departure_minute', this.Fb.control(null, Validators.required)); + this.Hotel_Type_AddPickupValid(); + } + } + Hotel_Type_AddPickupValid() { + let val = this.formData.getRawValue(); + this.formData.removeControl('All_Hotel_hour'); + this.formData.removeControl('All_Hotel_minute'); + this.formData.removeControl('pickup_hotel'); + this.formData.removeControl('Specific_Hotel_hour'); + this.formData.removeControl('Specific_Hotel_minute'); + this.formData.removeControl('hotel_zone'); + this.formData.removeControl('hotel_zone_hour'); + this.formData.removeControl('hotel_zone_minute'); + if (val._hotel_pickup_type == 1) { + this.formData.addControl('All_Hotel_hour', this.Fb.control(null, Validators.required)); + this.formData.addControl('All_Hotel_minute', this.Fb.control(null, Validators.required)); + } else if (val._hotel_pickup_type == 2) { + this.formData.addControl('pickup_hotel', this.Fb.control(null, Validators.required)); + this.formData.addControl('Specific_Hotel_hour', this.Fb.control(null, Validators.required)); + this.formData.addControl('Specific_Hotel_minute', this.Fb.control(null, Validators.required)); + } else if (val._hotel_pickup_type == 3) { + this.formData.addControl('hotel_zone', this.Fb.control(null, Validators.required)); + this.formData.addControl('hotel_zone_hour', this.Fb.control(null, Validators.required)); + this.formData.addControl('hotel_zone_minute', this.Fb.control(null, Validators.required)); + } + } + /// check box validation + adultValid(check) { + if (check) { + this.addvalid("adult_age_from", 'add'); + this.addvalid("adult_age_to", 'add'); + } else { + this.addvalid("adult_age_from", 'remove'); + this.addvalid("adult_age_to", 'remove'); + } + + } + SeniorValid(check) { + if (check) { + this.addvalid("senior_age_from", 'add'); + this.addvalid("senior_age_to", 'add'); + } else { + this.addvalid("senior_age_from", 'remove'); + this.addvalid("senior_age_to", 'remove'); + } + } + YouthValid(check) { + if (check) { + this.addvalid("youth_age_from", 'add'); + this.addvalid("youth_age_to", 'add'); + } else { + this.addvalid("youth_age_from", 'remove'); + this.addvalid("youth_age_to", 'remove'); + } + }; + ChildValid(check) { + if (check) { + this.addvalid("child_age_from", 'add'); + this.addvalid("child_age_to", 'add'); + } else { + this.addvalid("child_age_from", 'remove'); + this.addvalid("child_age_to", 'remove'); + } + }; + InfantValid(check) { + if (check) { + this.addvalid("infant_age_from", 'add'); + this.addvalid("infant_age_to", 'add'); + } else { + this.addvalid("infant_age_from", 'remove'); + this.addvalid("infant_age_to", 'remove'); + } + + }; + dropoffvalid(val) { + if (val == 'No') { + this.addvalid("drop_point", 'remove'); + } else { + this.addvalid("drop_point", 'add'); + } + }; + + addvalid(name, type) { + if (type == 'add') { + this.formData.controls[name].addValidators([Validators.required]); + this.formData.controls[name].updateValueAndValidity(); + } else { + this.formData.controls[name].clearValidators(); + this.formData.controls[name].updateValueAndValidity(); + this.formData.controls[name].markAsUntouched(); + } + }; + + GetAllActivityHotelZone() { + let SearchObj = { + city_id: '', + country_code: '', + zone_name: '', + } + this.ApiServ.Post('/ActivityHotelZone/GetAllActivityHotelZone', SearchObj).subscribe(res => { + if (res) { + this.AllActivityHotelZone = res.result.responseObject; + } + }) + } + + DaysItineryForm(ind) { + let val = this.formData.getRawValue(); + this.Itinerary.clear() + for (let i = 0; i < ind; i++) { + this.Itinerary.push(this.Fb.group({ + Text_html: [''], + country_code: [''], + city_code: [''], + })); + } + } + +} + diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.component.html new file mode 100644 index 0000000..7d562b9 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.component.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.component.ts new file mode 100644 index 0000000..f53ad12 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.component.ts @@ -0,0 +1,11 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-exp-services-manage', + templateUrl: './exp-services-manage.component.html', +}) +export class ExpServicesManageComponent implements OnInit { + constructor() {} + + ngOnInit(): void {} +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.module.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.module.ts new file mode 100644 index 0000000..f094743 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/exp-services-manage.module.ts @@ -0,0 +1,163 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { TabsComponent } from './tabs/tabs.component'; +import { OverviewComponent } from './tabs-content/Overview/Overview.component'; + +import { TabViewModule } from 'primeng/tabview'; +import { TreeModule } from 'primeng/tree'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { FileUploadModule } from 'primeng/fileupload'; +import { ProductService } from 'src/app/core/services/product.service'; +import { ConfirmationService, MessageService } from 'primeng/api'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { InputNumberModule } from 'primeng/inputnumber'; +import { InputTextModule } from 'primeng/inputtext'; +import { CalendarModule } from 'primeng/calendar'; +// import { ExpServicesManageComponent } from './activity-services-manage.component'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { DialogModule } from 'primeng/dialog'; +import { RadioButtonModule } from 'primeng/radiobutton'; +import { ListboxModule } from 'primeng/listbox'; +import { CheckboxModule } from 'primeng/checkbox'; +import { DropdownModule } from 'primeng/dropdown'; +import { CarouselModule } from 'primeng/carousel'; +import { MenuModule } from 'primeng/menu'; +import { MatButtonModule } from '@angular/material/button'; +import { + MatRadioModule, + MAT_RADIO_DEFAULT_OPTIONS, +} from '@angular/material/radio'; +import { MatMenuModule } from '@angular/material/menu'; +import { FullCalendarModule } from '@fullcalendar/angular'; +import { ToastModule } from 'primeng/toast'; +import { MatCheckbox, MatCheckboxModule, MAT_CHECKBOX_DEFAULT_OPTIONS } from '@angular/material/checkbox'; +import { ExpServicesManageComponent } from './exp-services-manage.component'; +import { SlotsComponent } from './tabs-content/slots/slots.component'; +import { AddOptionalAddOnComponent } from './tabs-content/optional-addOns/add-optional-add-on/add-optional-add-on.component'; +import { OptionalAddOnsComponent } from './tabs-content/optional-addOns/optional-addOns.component'; +import { AddRateConfigComponent } from './tabs-content/rate-config/add-rate-config/add-rate-config.component'; +import { EditAllocationComponent } from './tabs-content/rate-config/edit-allocation/edit-allocation.component'; +import { EditCancelletionPolicyComponent } from './tabs-content/rate-config/edit-cancelletion-policy/edit-cancelletion-policy.component'; +import { EditModifyRateComponent } from './tabs-content/rate-config/edit-modify-rate/edit-modify-rate.component'; +import { RateConfigComponent } from './tabs-content/rate-config/rate-config.component'; +import { AddNewSeasonComponent } from './tabs-content/season-creation/add-new-season/add-new-season.component'; +import { SeasonCreationComponent } from './tabs-content/season-creation/season-creation.component'; +import { AddSlotsComponent } from './tabs-content/slots/add-slots/add-slots.component'; +import { EditDetailsComponent } from './tabs-content/rate-config/edit-details/edit-details.component'; +import { ModifyDetailsComponent } from './tabs-content/rate-config/modify-details/modify-details.component'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: '', + component: ExpServicesManageComponent, + }, + { + path: 'Add', + component: AddRateConfigComponent, + }, + { + path: 'EditCancelletionPolicy', + component: EditCancelletionPolicyComponent, + }, + { + path: 'EditDetails', + component: ModifyDetailsComponent, + }, + { + path: 'EditAllocation', + component: EditAllocationComponent, + }, + { + path: 'EditModifyRate', + component: EditModifyRateComponent, + }, + { + path: 'AddOptionalAddOn', + component: AddOptionalAddOnComponent, + }, + { + path: 'AddNewSeason', + component: AddNewSeasonComponent, + }, + { + path: 'AddSlots', + component: AddSlotsComponent, + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'Search', + }, +]; + +@NgModule({ + declarations: [ + TabsComponent, + OverviewComponent, + SeasonCreationComponent, + RateConfigComponent, + OptionalAddOnsComponent, + ExpServicesManageComponent, + AddRateConfigComponent, + EditModifyRateComponent, + EditAllocationComponent, + EditCancelletionPolicyComponent, + AddOptionalAddOnComponent, + AddNewSeasonComponent, + SlotsComponent, + AddSlotsComponent, + EditDetailsComponent, + ModifyDetailsComponent, + ], + imports: [ + CommonModule, + TabViewModule, + TreeModule, + NgSelectModule, + FormsModule, + ReactiveFormsModule, + ToastModule, + FileUploadModule, + TranslateModule, + InputNumberModule, + InputTextModule, + CalendarModule, + CarouselModule, + TableModule, + ToolbarModule, + DialogModule, + TooltipModule, + ListboxModule, + CheckboxModule, + MatCheckboxModule, + DropdownModule, + MenuModule, + MatMenuModule, + MatButtonModule, + RadioButtonModule, + MatRadioModule, + FullCalendarModule, + RouterModule.forChild(routes), + ], + providers: [ + ProductService, + ConfirmationService, + StaticDataService, + MessageService, + TranslateService, + { + provide: MAT_RADIO_DEFAULT_OPTIONS, + useValue: { color: 'primary' }, + }, + { + provide: MAT_CHECKBOX_DEFAULT_OPTIONS, + useValue: { color: 'primary' }, + }, + ], +}) +export class ExpServicesManageModule {} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/Overview/Overview.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/Overview/Overview.component.html new file mode 100644 index 0000000..756cb2e --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/Overview/Overview.component.html @@ -0,0 +1,549 @@ +
    Overview
    +
    + +
    +
    + {{ActivityData.activityContents[0].activity_name}} +
    +
    +
    + +
    +
    +
    +
    Allocation
    +
    +
    +
    + + + +
    +
    + + + + {{ item.start_time | date : 'HH:mm'}} to {{item.end_time| date : 'HH:mm'}} + + +
    +
    +
    +
    + + + {{ date.day }} +
    + +
    +
    +
    + Allocated: + Booked: + Remaining: +
    +
    + +
    + + add_circle + + + + remove_circle + +
    +
    + {{Calender.get(convertproperadate(date)).get('booking_count').value}} + {{Calender.get(convertproperadate(date)).get('_allocation_type').value == '1' ? 'Free Sale' : + Calender.get(convertproperadate(date)).get('_allocation_type').value == '2' ? 'Stop Sale' : + Calender.get(convertproperadate(date)).get('remaining_count').value}} + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    Season
    +
    + + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Season Name + + + + Season Date Range + + + + Status + + + + Action + + + + + + + {{ season.activitySeason.season_name }} + + 12 Feb 2022 - 02 Mar 2022 + + + + {{ + season.activitySeason.is_active ? "Active" : "Deactive" + }} + + +
    + + + + + +
    + + +
    +
    +
    +
    +
    +
    Slots
    +
    + + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Slot Id + + + + Slot Start Time + + + + Slot End Time + + + + Cut-Off Time (in Hrs) + + + + Status + + + + Action + + + + + + + {{ AllSlotsData.activity_slot_id }} + + {{ + AllSlotsData.start_time | date: "H:mm" + }} + + + {{ + AllSlotsData.end_time | date: "H:mm" + }} + + + {{ + AllSlotsData.cut_off_time | date: "H:mm" + }} + + + + {{ AllSlotsData.is_active ? "Active" : "Deactive" }} + + +
    + + + + + +
    + + +
    + + + + No data found + + + +
    +
    +
    +
    +
    Rates
    +
    + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Option Name + + + + Nationality + + + + Date Range/Season + + + + Currency + + + + Slot + + + + Pickup Included + + + + Drop Off Included + + + + Status + + + Action + + + + + + {{rateDetails.option_name}} + {{rateDetails.nationality}} + + + {{rateDetails.date + == null ? '' : + item | date: 'dd MMM YYYY' }} {{ + + + i == 0 && rateDetails.date.split(',').length > 1? '-' : ''}} + + + {{rateDetails.currency_code}} + + {{item.date}} + + {{rateDetails.is_pickup_included ? "Yes" : "No"}} + {{rateDetails.is_drop_off_included? "Yes" : "No"}} + + {{ + rateDetails.is_active ? + 'Active' : 'Deactive' }} + + + +
    + + + + + + + + + +
    + + +
    +
    +
    +
    +
    +
    Optional Add-Ons
    +
    + + + + +
    + + + + + +
    +
    + +
    + + + + +
    +
    +
    +
    + + + + Add-On + + + + Description + + + + Rate Type + + + + Currency + + + + + Status + + + Action + + + + + {{ ons.add_on_name }} + {{ ons.add_on_description }} + {{ ons.rate_type }} + {{ ons.currency_code }} + + {{ ons.is_active ? "Active" : "Deactive" }} + + +
    + + + + + +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/Overview/Overview.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/Overview/Overview.component.ts new file mode 100644 index 0000000..4ef0e54 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/Overview/Overview.component.ts @@ -0,0 +1,616 @@ + + +const colors: any = { + red: { + primary: '#ad2121', + secondary: '#FAE3E3', + }, + blue: { + primary: '#1e90ff', + secondary: '#D1E8FF', + }, + yellow: { + primary: '#e3bc08', + secondary: '#FDF1BA', + }, +}; + +import { + Component, + OnInit, + ViewChild +} from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import * as FileSaver from 'file-saver'; +import jsPDF from 'jspdf'; +import 'jspdf-autotable'; +import * as moment from 'moment'; +import { + MessageService +} from 'primeng/api'; +import { Table } from 'primeng/table/table'; +import { AllocationOverview } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-allocation/edit-allocation.model'; +import { ActivityAllContract, GetRateDetails } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-rate-confi/edit-rate-confi.model'; +import { GetActivitySlot } from 'src/app/core/models/Experience-Service/slot/add-slots-model'; +import { API } from 'src/app/core/services/api.service'; +import { BreakpointsService } from 'src/app/core/services/breakpoints.services'; +import { CommonService } from 'src/app/core/services/common.service'; +@Component({ + selector: 'Overview', + // changeDetection: ChangeDetectionStrategy.OnPush, + + templateUrl: './Overview.component.html', +}) +export class OverviewComponent implements OnInit { + // items!: MenuItem[]; + dateValue!: Date; + // responsive code + isMobile = false; + DateList: any[] = [] + responsiveOptions; + activityId; + // modal: any; + constructor( + // private confirmationService: ConfirmationService, + private messageService: MessageService, + // responsive constructor + public MobileBreakpoints: BreakpointsService, + // private cd: ChangeDetectorRef, // responsive constructor + public ApiServ: API, + public MsgService: MessageService, + private router: Router, + private fb: FormBuilder + ) { + // this.MobileBreakpoints.IsMobile.subscribe({ + // next: (val) => { + // this.isMobile = val; + // // this.cd.detectChanges(); + // }, + // }); + } + + date14!: Date; + + cities = [ + { id: 1, name: 'Vilnius' }, + { id: 2, name: 'Kaunas' }, + { id: 3, name: 'Pavilnys', disabled: true }, + { id: 4, name: 'Pabradė' }, + { id: 5, name: 'Klaipėda' }, + ]; + + cols!: any[]; + exportColumns!: any[]; + datelist; + formgroup: FormGroup; + OptAddData; + rateDetails; + ActivityData; + activityImages; + SeasonData; + AllocationDetails; + AllSlotsData; + AllSlots + ngOnInit() { + // this.cols = [ + // { field: 'code', header: 'Code', customExportHeader: 'Product Code' }, + // { field: 'name', header: 'Name' }, + // { field: 'category', header: 'Category' }, + // { field: 'quantity', header: 'Quantity' }, + // ]; + // this.exportColumns = this.cols.map((col) => ({ + // title: col.header, + // dataKey: col.field, + // })); + this.activityId = CommonService.getSessionStoage('activity_id'); + this.ngOinitForm(); + this.GetActivityData(); + this.GetallrateDetails(true); + this.SearchSeason(); + this.GetAllSlot(); + } + + /** + * @author Abdul Razzak + * to create form group + */ + ngOinitForm() { + this.formgroup = this.fb.group({ + slot_id: [''], + option_name: [''], + Calender: this.fb.group({ + }) + }); + } + + /** + * @author Abdul Razzak + * to get form controller + */ + get Calender() { + return this.formgroup.get('Calender') as FormGroup + } + + + /** + * @author Abdul razzak + * to get all allocation details + */ + getAllocationDetails() { + let value = this.formgroup.getRawValue(); + let postdata = new GetRateDetails(); + postdata.from_date = ''; + postdata.to_date = ''; + postdata.dates = ''; + postdata.slot_id = value.slot_id; + postdata.seasonId = []; + postdata.days = ''; + postdata.contract_id = value.option_name; + this.ApiServ.Post('/ActivityContract/GetAllocationDetails', postdata).subscribe(data => { + if (data) { + this.AllocationDetails = data.responseObject; + this.SetTimeAvali(this.AllocationDetails); + } + }); + }; + + // ------------------------------------------------ date overview ---------------------------------------- + + + updateinputvalue(group) { + // console.log('asfdgujvfi') + // this.SaveAllocation() + } + + /** + * @author Abdul Razzak + * for plus allocation count + * @param group + */ + handleMinus(group) { + let value = this.Calender.get(group).get('allocation_count').value - 1; + if (value >= 0) { + this.Calender.get(group).get('allocation_count').setValue(value); + this.SaveAllocation(this.Calender.get(group)); + } + } + + /** + * @author Abdul Razzak + * for minus allocation count + * @param group + */ + handlePlus(group) { + let value = this.Calender.get(group).get('allocation_count').value + 1; + this.Calender.get(group).get('allocation_count').setValue(value); + this.SaveAllocation(this.Calender.get(group)); + } + + /** + * @author Abdul Razzak + * for save allocation details + * @param group + */ + SaveAllocation(group) { + let value = group.getRawValue(); + let contractDetails = this.formgroup.getRawValue(); + let postdata = new AllocationOverview(); + postdata._allocation_type = value.allocation_count > 0 ? '3' : value._allocation_type; + postdata.allocation_count = value.allocation_count ? value.allocation_count : 0; + postdata.activity_allocation_id = value.activity_allocation_id; + postdata.activity_contract_id = contractDetails.option_name; + postdata.activity_slot_id = contractDetails.slot_id; + this.ApiServ.Post('/ActivityContract/UpdateAllocationViewTab', postdata).subscribe((res) => { + if (res) { + this.setvalue(res.responseObject, group) + } + }) + } + + /** + * @author Abdul Razzak + * for set value when allocation count plus and minus + * @param data + * @param group + */ + setvalue(data, group) { + group.get('allocation_count').setValue(data.allocation_count); + group.get('_allocation_type').setValue(data._allocation_type); + group.get('booking_count').setValue(data.booking_count); + group.get('remaining_count').setValue(data.remaining_count); + } + + /** + * for binding + * @param date + * @returns + */ + bindAllocationdate(date) { + let d = new Date(date.year, date.month, date.day); + let validate; + validate = false; + let format = moment(d).format('MM-DD-YYYY') + let valid = this.datelist.filter(e => e == format); + if (valid.length > 0) { + validate = true; + } + return validate; + } + + /** + * @author Abdul Razzak + * to convert date format MM-DD-YYYY + */ + convertproperadate(date) { + let d = new Date(date.year, date.month, date.day); + let format = moment(d).format('MM-DD-YYYY'); + return format + } + + /** + * @author Abdul Razzak + * to create form controls and set value + * @param allDate + */ + SetTimeAvali(allDate) { + this.datelist = allDate.map(e => moment(e._date).format('MM-DD-YYYY')); + allDate.map(e => { + let date = moment(e._date).format('MM-DD-YYYY'); + this.Calender.addControl(date, this.fb.group({ + activity_allocation_id: e.activity_allocation_id, + allocation_count: e.allocation_count, + booking_count: e.booking_count, + remaining_count: e.remaining_count, + _allocation_type: e._allocation_type, + })); + }); + } + + /** + * @author Abdul Razzak + * to stop sale in allocation + * @param group + */ + StopSale(group) { + group.get('_allocation_type').setValue('2'); + group.get('allocation_count').setValue(0); + this.SaveAllocation(group); + } + + + + // ----------------------------------------------------- ------------------------------------------------------ + /** + * @author Abdul Razzak + * to get activity details by Id + */ + GetActivityData() { + let activityid = CommonService.getSessionStoage('activity_id'); + this.ApiServ.Get('/Activity/GetActivity/' + activityid).subscribe((e) => { + if (e) { + this.ActivityData = e.responseObject; + this.activityImages = JSON.parse(e.responseObject.activity_images); + CommonService.setSessionStorage('Def_Lang_code', e.responseObject.default_lang_code); + this.GetActivityAddOn(); + } + }); + } + + // ----------------------------------------------------- Season Details ------------------------------------------------------ + + UpdateSeasonStatus(exp_id, status) { + let obj = { id: exp_id, status: status ? false : true, updatedBy: '' }; + this.ApiServ.Post('/ActivitySeason/UpdateStatus', obj).subscribe((data) => { + if (data) { + this.MsgService.add({ + severity: data['status'] ? 'success' : 'error', + detail: data['message'], + }); + this.SearchSeason(); + } + }); + } + + SearchSeason() { + this.ApiServ.Get('/ActivitySeason/GetAllActivitySeason?activityId=' + this.activityId + '&seasonName=' + '').subscribe((e) => { + if (e) { + this.SeasonData = e['responseObject']; + } + }); + } + + EditSeason(sea_id) { + let obj = { id: sea_id }; + this.router.navigate(['/Services/ExpServices/Manage/AddNewSeason'], { + queryParams: obj, + }); + } + + exportseasonExcel() { + import('xlsx').then((xlsx) => { + console.log(xlsx); + const worksheet = xlsx.utils.json_to_sheet(this.SeasonData); + const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: 'xlsx', + type: 'array', + }); + this.saveAsExcelFile( + excelBuffer, + 'Season_Data_export_' + new Date().getTime() + ); + }); + } + + exportseasonPdf() { + // const doc = new jsPDF(); + const doc = new jsPDF('p', 'pt'); + doc['autoTable'](this.exportColumns, this.SeasonData); + doc.save('Season_Data_export_' + new Date().getTime() + '.pdf'); + } + + // ----------------------------------------------------- Add Optional Add-Ons ------------------------------------------------------ + + + + + GetActivityAddOn() { + let obj = { + activityId: this.activityId, + _add_on_name: "", + _language_code: CommonService.getSessionStoage('Def_Lang_code') + } + this.ApiServ.Post('/ActivityAddOn/GetActivityAddOn', obj).subscribe(e => { + if (e) { + this.OptAddData = e['responseObject']; + } + }) + } + + EditOpt(pk_id) { + let obj = { id: pk_id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/AddOptionalAddOn'], { queryParams: obj }) + } + + UpdateOptStatus(exp_id, status) { + let obj = { id: exp_id, status: status ? false : true, updatedBy: '' }; + this.ApiServ.Post('/ActivityAddOn/UpdateStatus', obj).subscribe((data) => { + if (data) { + this.MsgService.add({ + severity: data['status'] ? 'success' : 'error', + detail: data['message'], + }); + this.GetActivityAddOn(); + } + }); + } + + exportOptPdf() { + const doc = new jsPDF('p', 'pt'); + doc['autoTable'](this.exportColumns, this.OptAddData); + doc.save('Option_Add_Ons_export_' + new Date().getTime() + '.pdf'); + } + + exportOptExcel() { + import('xlsx').then((xlsx) => { + console.log(xlsx); + const worksheet = xlsx.utils.json_to_sheet(this.OptAddData); + const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: 'xlsx', + type: 'array', + }); + this.saveAsExcelFile(excelBuffer, 'Option_Add_Ons'); + }); + } + + // ----------------------------------------------------- rate Details ------------------------------------------------------ + + EditCancelPoli(Id) { + let obj = { id: Id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/EditCancelletionPolicy'], { queryParams: obj }) + } + EditAllocation(Id) { + let obj = { id: Id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/EditAllocation'], { queryParams: obj }) + } + EditRateConfig(Id) { + let obj = { id: Id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/EditModifyRate'], { queryParams: obj }) + } + + EditDetails(Id) { + let obj = { id: Id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/EditDetails'], { queryParams: obj }) + } + + + UpdateRateStatus(ID, Status) { + let Obj = { + id: ID, + updatedBy: "", + "status": Status ? false : true + } + this.ApiServ.Post('/ActivityContract/UpdateStatus', Obj).subscribe(data => { + if (data) { + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + this.GetallrateDetails(false); + } + }); + }; + + SoltsDetailsConvParse(data) { + let obj = data ? JSON.parse(data) : ''; + let html = []; + obj ? obj.forEach(e => html.push({ 'date': moment(e.start_time).format('hh:mm') + '-' + moment(e.end_time).format('hh:mm') })) : '' + return html + } + + GetallrateDetails(check) { + let activityid = CommonService.getSessionStoage('activity_id'); + let postdata = new ActivityAllContract(); + postdata.activity_id = activityid; + postdata.is_drop_off_included = false; + postdata.is_pickup_included = false; + postdata.option_name = ''; + this.ApiServ.Post('/ActivityContract/GetAllActivityRates', postdata).subscribe(data => { + if (data) { + this.rateDetails = data.responseObject; + if (check) { + this.formgroup.get('option_name').setValue(this.rateDetails[0].activity_contract_id); + this.GetSlotsById(this.rateDetails[0].activity_contract_id, true); + } + } + }) + } + + // ----------------------------------------------------- rate Details ------------------------------------------------------ + + + GetAllSlot() { + let post = new GetActivitySlot(); + post.activity_id = this.activityId; + post.from_hour = null; + post.from_minute = null; + post.to_hour = null; + post.to_minute = null; + console.log(post) + this.ApiServ.Post('/ActivitySlot/GetAllSlot', post).subscribe(res => { + if (res) { + this.AllSlotsData = res['responseObject']; + } + }); + } + + EditSlot(pk_id) { + let obj = { id: pk_id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/AddSlots'], { queryParams: obj }); + } + + UpdateStatusSlot(slot_id, status) { + let obj = { Id: slot_id, Status: status ? false : true } + this.ApiServ.Post('/ActivitySlot/UpdateStatus', obj).subscribe(data => { + if (data) { + this.GetAllSlot(); + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + } + }) + } + + /** + * @author Abdul Razzak + * to get slot data by contract id + * @param Id + */ + GetSlotsById(Id, check) { + this.formgroup.get('slot_id').setValue('') + this.ApiServ.Get('/ActivityContract/GetSlotsById/' + Id).subscribe(res => { + if (res) { + this.AllSlots = res.responseObject; + if (check) { + this.formgroup.get('slot_id').setValue(this.AllSlots[0].activity_slot_id); + this.getAllocationDetails(); + } + } + }) + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ViewChild('dt') + table!: Table; + + // exportExcel() { + // import('xlsx').then((xlsx) => { + // console.log(xlsx); + // const worksheet = xlsx.utils.json_to_sheet(this.products); + // const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + // const excelBuffer: any = xlsx.write(workbook, { + // bookType: 'xlsx', + // type: 'array', + // }); + // this.saveAsExcelFile(excelBuffer, 'products'); + // }); + // } + + saveAsExcelFile(buffer: any, fileName: string): void { + import('file-saver').then((abc) => { + let EXCEL_TYPE = + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; + let EXCEL_EXTENSION = '.xlsx'; + const data: Blob = new Blob([buffer], { + type: EXCEL_TYPE, + }); + console.log(FileSaver); + FileSaver.saveAs( + data, + fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION + ); + }); + } + + +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/add-optional-add-on/add-optional-add-on.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/add-optional-add-on/add-optional-add-on.component.html new file mode 100644 index 0000000..e4bd82e --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/add-optional-add-on/add-optional-add-on.component.html @@ -0,0 +1,145 @@ +
    + + Back +
    +
    Add Optional Add-Ons
    +
    +
    +
    +
    + + + + Please enter add on + +
    +
    + + +
    +
    +
    + +
    + + +
      +
    • + {{ file.name }} - {{ file.size }} bytes +
    • +
    +
    +
    +
    +
    +
    +
    + +
    +
    date.PNG
    +
    490 B
    +
    + +
    +
    +
    +
    + + Please choose add on image + +
    +
    +
    +
    + + + + + Please select rate on + +
    +
    + + + + + Please select currency + +
    +
    + + + + Please enter numbers only + + + Please enter amount + +
    +
    + + + + Accept numbers only + + + Please enter adult amount + +
    + +
    + + + + Accept numbers only + + + Please enter youth amount + +
    +
    + + + + Accept numbers only + + + Please enter child amount + +
    +
    + + + + Accept numbers only + + + Please enter senior amount + +
    +
    +
    + +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/add-optional-add-on/add-optional-add-on.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/add-optional-add-on/add-optional-add-on.component.ts new file mode 100644 index 0000000..2f49578 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/add-optional-add-on/add-optional-add-on.component.ts @@ -0,0 +1,225 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ActivityAddOn, ActivityAddOnDetails } from 'src/app/core/models/optional-ons/optional-ons.model' +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-add-optional-add-on', + templateUrl: './add-optional-add-on.component.html', +}) +export class AddOptionalAddOnComponent implements OnInit { + uploadedFiles: any[] = []; + fileArr = []; + fileInfo = []; + AddOptForm: FormGroup; + showImgBox; + RateTypes; + Currency; + addOne_Id; + constructor( + private router: Router, + private ApiServ: API, + private MsgService: MessageService, + private route: ActivatedRoute, + public validationService: ValidationService, + private fb: FormBuilder + ) { } + + ngOnInit(): void { + this.initForm(); + this.GetRateType(); + this.GetCurrency(); + + this.route.queryParams.subscribe(obj => { + if (obj['id']) { + this.showImgBox = true; + this.ApiServ.Get('/ActivityAddOn/GetActivityAddOn/' + obj['id']).subscribe(d => { + this.SetValue(d['responseObject']); + + this.addOne_Id = obj['id']; + }); + } + }) + } + + SetValue(val) { + Object.keys(val).forEach(li => { + if (li == "rate" || li == "currency_code") { + this.AddOptForm.get(li).setValue(val[li]); + } else if (li == "_rate_type") { + this.AddOptForm.get(li).setValue(parseInt(val[li])); + this.RateTypesCheck(); + if (parseInt(val[li]) == 1) { + this.AddOptForm.get('adult_rate').setValue(val['adult_rate']); + this.AddOptForm.get('senior_rate').setValue(val['senior_rate']); + this.AddOptForm.get('youth_rate').setValue(val['youth_rate']); + this.AddOptForm.get('child_rate').setValue(val['child_rate']); + } else if (parseInt(val[li]) == 2) this.AddOptForm.get('per_service_rate').setValue(val['per_service_rate']); + } + if (li == 'activityAddOnDetails') { + this.setAddOnsDetail(val[li]); + } + }) + } + + setAddOnsDetail(val) { + val.map(obj => { + Object.keys(obj).forEach(li => { + if (li == "add_on_image" || li == "add_on_description" || li == "add_on_name" || li == 'activity_add_on_id') { + this.AddOptForm.get(li).setValue(obj[li]); + } + }) + }) + } + + GetRateType() { + this.ApiServ.Get('/LovMaster/GetLovByType/AddOnRateType').subscribe(obj => { + if (obj) { + this.RateTypes = obj['responseObject']; + } + }) + } + + GetCurrency() { + this.ApiServ.Get('/Currency/GetCurrency').subscribe(obj => { + if (obj) { + this.Currency = obj; + } + }) + } + + RateTypesCheck() { + let val = this.AddOptForm.getRawValue(); + if (val._rate_type == '1') { + this.AddOptForm.addControl('adult_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[0-9]*$/)])); + this.AddOptForm.addControl('senior_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[0-9]*$/)])); + this.AddOptForm.addControl('youth_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[0-9]*$/)])); + this.AddOptForm.addControl('child_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[0-9]*$/)])); + this.AddOptForm.removeControl('per_service_rate'); + } else if (val._rate_type == '2') { + this.AddOptForm.addControl('per_service_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + this.AddOptForm.removeControl('adult_rate'); + this.AddOptForm.removeControl('senior_rate'); + this.AddOptForm.removeControl('youth_rate'); + this.AddOptForm.removeControl('child_rate'); + } + } + + initForm() { + this.AddOptForm = this.fb.group({ + activity_add_on_id: [''], + add_on_name: this.validationService.required, + add_on_description: [''], + add_on_image: this.validationService.required, + supplier_id: ['2205221841391724322'], + _rate_type: this.validationService.required, + currency_code: this.validationService.required, + // per_service_rate: this.validationService.decimal, + }) + } + + getImage(e) { + if (e.currentFiles.length != 0) { + let file = e.files[0]; + this.AddOptForm.get('add_on_image').setValue(file); + } + } + + emptyValue() { + this.showImgBox = false; + this.AddOptForm.get('add_on_image').setValue(''); + } + + SaveOpt() { + if (this.AddOptForm.status == "INVALID") { + this.validationService.showValidationsMsg(this.AddOptForm); + return; + } + this.fileArr = []; + this.fileInfo = []; + let value = this.AddOptForm.getRawValue(); + this.showImgBox = false; + let ActAddOnModel = new ActivityAddOn(); + let ActAddOnDetailArr = new Array(); + let ActAddOnDetailObj = new ActivityAddOnDetails(); + debugger + ActAddOnModel._rate_type = value._rate_type.toString(); + ActAddOnModel.currency_code = value.currency_code; + ActAddOnModel.per_service_rate = value.per_service_rate ? parseInt(value.per_service_rate) : 0; + ActAddOnModel.activity_add_on_id = value.activity_add_on_id; + ActAddOnModel.supplier_id = value.supplier_id; + ActAddOnModel.org_id = '2105311837100000021'; + ActAddOnModel.is_deleted = false; + ActAddOnModel.activity_id = CommonService.getSessionStoage('activity_id'); + + if (value._rate_type == '1') { + ActAddOnModel.adult_rate = value.adult_rate; + ActAddOnModel.child_rate = value.child_rate; + ActAddOnModel.senior_rate = value.senior_rate; + ActAddOnModel.youth_rate = value.youth_rate; + } else if (value._rate_type == '2') ActAddOnModel.per_service_rate = value.per_service_rate; + + ActAddOnDetailObj.is_deleted = false; + ActAddOnDetailObj.org_id = '2105311837100000021'; + ActAddOnDetailObj.activity_id = CommonService.getSessionStoage('activity_id'); + ActAddOnDetailObj.add_on_description = value.add_on_description; + if (typeof (value.add_on_image) == 'object') { + this.fileArr.push(value.add_on_image); + this.fileInfo.push({ 'fileName': "AddOns/Add_Act_Id." + value.add_on_image.name.split('.')[1], 'pathToSave': 'ThemeImages/ORGID' }); + } + ActAddOnDetailObj.add_on_image = typeof (value.add_on_image) == 'object' ? environment.cdnFileUrl + "ThemeImages/ORGID/AddOns/Add_Act_Id." + value.add_on_image.name.split('.')[1] : value.add_on_image.split('?')[0]; + ActAddOnDetailObj.add_on_name = value.add_on_name; + ActAddOnDetailObj.language_code = CommonService.getSessionStoage('Def_Lang_code'); + ActAddOnDetailObj.supplier_id = value.supplier_id; + ActAddOnDetailArr.push(ActAddOnDetailObj) + ActAddOnModel.activityAddOnDetails = ActAddOnDetailArr; + if (this.addOne_Id) { + this.ApiServ.Post('/ActivityAddOn/UpdateActivityAddOn', ActAddOnModel).subscribe(data => { + if (data) { + (data['status'] && this.fileInfo.length > 0) ? this.saveImg(data, this.fileArr, this.fileInfo) : this.showToastrMsg(data); + } + }) + } else { + this.ApiServ.Post('/ActivityAddOn/SaveActivityAddOn', ActAddOnModel).subscribe(data => { + if (data) { + (data['status'] && this.fileInfo.length > 0) ? this.saveImg(data, this.fileArr, this.fileInfo) : this.showToastrMsg(data); + } + }) + } + } + + showToastrMsg(respData) { + this.MsgService.add({ + severity: respData['status'] ? 'success' : 'error', + detail: respData['message'], + }); + setTimeout(() => { + respData['status'] ? this.btnClick() : ''; + }, 500); + } + saveImg(respData, file_arr, file_info) { + var formdata = new FormData(); + file_arr.forEach(x => { + formdata.append("files", x); + }) + let Id = this.addOne_Id ? this.addOne_Id : respData['responseObject'].activity_add_on_id; + let a = JSON.stringify(file_info).replaceAll('Add_Act_Id', Id); + formdata.append("fileInfo", a); + + this.ApiServ.PostFile('/FileUpload/SaveFile', formdata).subscribe(imdata => { + if (imdata['status']) { + this.showToastrMsg(respData); + } + }) + } + + btnClick() { + this.router.navigateByUrl("/Services/ActivityServices/ExpServices/Manage"); + } + +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/optional-addOns.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/optional-addOns.component.html new file mode 100644 index 0000000..6c69d75 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/optional-addOns.component.html @@ -0,0 +1,130 @@ +
    +
    Optional Add-Ons
    + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + +
    + + + + +
    + + + + + +
    +
    + +
    + + + + +
    +
    +
    +
    + + + + Add-On + + + + Description + + + + Rate Type + + + + Currency + + + + + Status + + + Action + + + + + {{ ons.add_on_name }} + {{ ons.add_on_description }} + {{ ons.rate_type }} + {{ ons.currency_code }} + + {{ ons.is_active ? "Active" : "Deactive" }} + + +
    + + + + + +
    + + +
    + + + + No data found + + + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/optional-addOns.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/optional-addOns.component.ts new file mode 100644 index 0000000..047cce7 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/optional-addOns/optional-addOns.component.ts @@ -0,0 +1,118 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import * as FileSaver from 'file-saver'; +import { API } from 'src/app/core/services/api.service'; +import jsPDF from "jspdf"; +import "jspdf-autotable"; +import { MessageService } from 'primeng/api'; +import { CommonService } from 'src/app/core/services/common.service'; + +@Component({ + selector: 'optional-addOns', + templateUrl: './optional-addOns.component.html', +}) + +export class OptionalAddOnsComponent implements OnInit { + @Input() content + OptAddData; + add_on; + constructor( + private router: Router, + private ApiServ: API, + private MsgService: MessageService + ) { } + + cols!: any[]; + exportColumns!: any[]; + + ngOnInit(): void { + + // console.log(this.content.data) + this.cols = [ + { field: 'add_on_name', header: 'Add-On', customExportHeader: 'Option_Add_Ons_export_' + new Date().getTime() }, + { field: 'add_on_description', header: 'Description' }, + { field: 'rate_type', header: 'Rate Type' }, + { field: 'currency_code', header: 'Currency' }, + { field: 'rate', header: 'Amount' }, + { field: 'is_active', header: 'Status' }, + ]; + + this.exportColumns = this.cols.map((col) => ({ + title: col.header, + dataKey: col.field, + })); + } + + exportPdf() { + // const doc = new jsPDF(); + const doc = new jsPDF('p', 'pt'); + doc['autoTable'](this.exportColumns, this.OptAddData); + // doc.autoTable(this.exportColumns, this.products); + doc.save("Option_Add_Ons_export_" + new Date().getTime() + ".pdf"); + } + + Edit(pk_id) { + let obj = { id: pk_id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/AddOptionalAddOn'], { queryParams: obj }) + } + + UpdateStatus(exp_id, status) { + let obj = { id: exp_id, status: status ? false : true, updatedBy: '' } + this.ApiServ.Post('/ActivityAddOn/UpdateStatus', obj).subscribe((data) => { + if (data) { + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + this.SearchExp(); + } + }); + } + + SearchExp() { + let activityid = CommonService.getSessionStoage('activity_id') + let obj = { + activityId: activityid, + _add_on_name: this.add_on ? this.add_on : "", + _language_code: CommonService.getSessionStoage('Def_Lang_code') + } + this.ApiServ.Post('/ActivityAddOn/GetActivityAddOn', obj).subscribe(e => { + if (e) { + this.OptAddData = e['responseObject']; + } + }) + } + + ResetExp() { + this.add_on = ''; + } + + exportExcel() { + import('xlsx').then((xlsx) => { + console.log(xlsx); + const worksheet = xlsx.utils.json_to_sheet(this.OptAddData); + const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: 'xlsx', + type: 'array', + }); + this.saveAsExcelFile(excelBuffer, 'Option_Add_Ons'); + }); + } + + saveAsExcelFile(buffer: any, fileName: string): void { + import('file-saver').then((abc) => { + let EXCEL_TYPE = + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; + let EXCEL_EXTENSION = '.xlsx'; + const data: Blob = new Blob([buffer], { + type: EXCEL_TYPE, + }); + console.log(FileSaver); + FileSaver.saveAs( + data, + fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION + ); + }); + } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/add-rate-config/add-rate-config.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/add-rate-config/add-rate-config.component.html new file mode 100644 index 0000000..b5dcb4a --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/add-rate-config/add-rate-config.component.html @@ -0,0 +1,1120 @@ +
    + + Back +
    +
    +
    Add Rate Config
    +
    +
    +
    + + +
    +
    + + + +
    +
    + + + +
    +
    + + + Please enter option name +
    +
    + + + Please select currency +
    +
    +
    Applicable Nationality
    +
    + +
    +
    + All Nationality +
    +
    + Specific Nationality +
    +
    +
    + + + + Please select nationality +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + Exclude Nationality + +
    +
    +
    +
    + + + + Please select nationality +
    +
    +
    +
    +
    +
    +
    + + + + Please select period type +
    +
    +
    +
    +
    +
    + + + Please select start date + +
    +
    + + + + Please select end date +
    +
    + + +
    +
    +
    +
    +
    + +
    + + + + {{ activity_obj.activitySeason.season_name }} + + Please select + season +
    +
    +
    +
    + {{ activities[0].activitySeason.season_name }} +
    +
    + {{ date_range_obj.fromDate | date: "dd MMM YYYY" }} - + {{ date_range_obj.toDate | date: "dd MMM YYYY" }} +
    +
    +
    +
    +
    +
    + Pickup Included +
    +
    + Drop Off Included + +
    +
    +
    Experience Time Slot
    +
    +
    +
    +
    + + + {{ item.start_time | date : 'HH:mm'}} to {{item.end_time| date : 'HH:mm'}} + + + Please select + slot +
    +
    + + + +
    +
    + + + +
    +
    +
    +
    +
    + Is Private Transfer Price Included + + Is Shared Transfer Price Included +
    +
    + +
    +
    +
    + + + + Please select + supplier +
    +
    + + + + + Please select + vehicle selection +
    +
    + + + +
    +
    +
    + + + Please select + supplier + Accept number only +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + + + +
    + +
    +
    + + + + Please select + supplier +
    +
    +
    + + + +
    +
    + + + Please enter + adult + accept number only + +
    +
    + + + Please enter + senior + accept number only + +
    +
    + + + Please enter + youth + accept number only + +
    +
    + + + Please enter + child + accept number only + +
    +
    +
    + + Show Slot-wise Cancellation Policy + +
    + +
    +
    +
    +
    Slots Pricing
    + +
    +
    + +
    + + + + Please select + apply rate on +
    +
    + + + + Please select + slots +
    + +
    + + + + {{ item.start_time | date : 'HH:mm'}} to {{item.end_time| date : 'HH:mm'}} + + + Please select + slots +
    +
    + + + + Please select + applicable days +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + + Please + enter + from + accept + number only + +
    +
    +
    + + Please + enter + to + accept + number only + +
    +
    +
    +
    + + + Please + enter + pricing per pax + accept + number only + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + + Please + enter + from + accept + number only + +
    +
    +
    + + Please + enter + to + accept + number only + +
    +
    +
    +
    + + + Please + enter + pricing per pax + accept + number only + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + + Please + enter + from + accept + number only + +
    +
    +
    + + Please + enter + to + accept + number only + +
    +
    +
    +
    + + + Please + enter + pricing per pax + accept + number only + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + + Please + enter + from + accept + number only + +
    +
    +
    + + Please + enter + to + accept + number only + +
    +
    +
    +
    + + + Please + enter + pricing per pax + accept + number only + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + Free Sale +
    + + + Please enter + allocation + accept number + only +
    +
    + + + Please enter + release days + accept number + only +
    +
    +
    +
    + +
    + + +
    +
    + +
    +
    +
    +
    +
    +
    + + + Please + enter + adult + + accept + number + only + +
    +
    + + + Please + enter + senior + + accept number + only + +
    +
    + + + Please + enter + youth + + accept + number + only + +
    +
    + + + Please + enter + child + + accept + number + only + +
    +
    +
    + + Free Sale +
    + + + Please enter + allocation + accept number + only +
    +
    + + + Please enter + release days + accept number + only +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + Please + select vehicle supplier +
    +
    + + + + + Please + select vehicle +
    +
    + + +
    +
    + + + Please + select vehicle + accept number only + +
    + +
    +
    + + Free Sale +
    + + + Please enter + allocation + accept number + only +
    +
    + + + Please enter + release days + accept number + only +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    Cancelletion Policy
    +
    +
    +
    +
    +
    + + + + please selct + type + +
    +
    +
    +
    + + + Please + enter From + accept number + only + +
    +
    + + + Please + enter To + accept number + only + +
    +
    +
    +
    +
    +
    +
    + + + + Please + cancellation type +
    +
    +
    +
    +
    + + + Please + enter value + accept number only + +
    +
    + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    +
    + Tourist Guide Included +
    + + + +
    +
    +
    +
    +
    Cancelletion Policy
    +
    +
    +
    +
    +
    + + + + please selct type + +
    +
    +
    +
    + + + Please + enter From + accept number only + +
    +
    + + + Please + enter To + accept number only + +
    +
    +
    +
    +
    +
    +
    + + + + Please + cancellation type +
    +
    +
    +
    +
    + + + Please + enter value + accept number only + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    No Show Policy
    +
    +
    +
    + + + + Please select No Show Type +
    +
    + + + Please enter value + accept number only +
    +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/add-rate-config/add-rate-config.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/add-rate-config/add-rate-config.component.ts new file mode 100644 index 0000000..9eb714e --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/add-rate-config/add-rate-config.component.ts @@ -0,0 +1,1206 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { Router } from '@angular/router'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ActivityCancellationDetails, ActivityContract, ActivityDetails, ActivityPaxRate, ActivityPrivateTransfer, ActivitySharedTransfer, ActivityVehicleRate, AgeRange, AllocationDetails, DateRange, RateRange, SaveActivityContractDetails, SlotDetails, Slots, Specific } from 'src/app/core/models/Experience-Service/experience-rate-config/experience-rate-config.model'; +import { GetActivitySlot } from 'src/app/core/models/Experience-Service/slot/add-slots-model'; +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; +interface grp { + name: string; + code: string; +} +@Component({ + selector: 'app-add-rate-config', + templateUrl: './add-rate-config.component.html', +}) +export class AddRateConfigComponent implements OnInit { + minDate = new Date(); + RateConfigForm: FormGroup; + currencyList; + LangList = []; + slotList = []; + activityData; + include_nationality_list; + exclude_nationality_list; + all_nationality_list; + season_list = []; + fil_season_list = []; + PhoneCode; + allCityDetials; + AgeRange:FormGroup; + lovKeyDataObj = { + RatePeriodType: [], + RateSlotType: [], + CancellationPolicyType: [], + NoShowType: [], + Language: [], + RateConfigType: [], + DaySelect: [], + ActivityNoShowPolicyType: [], + ActivityCancellationPolicyType: [], + ActivityCancellationChargeType: [], + }; + Vehicle_Selection = [ + { id: 1, name: 'Mercedes S Class' }, + { id: 2, name: 'Coach 20 Seater' }, + { id: 3, name: 'Helicopter' } + ]; + Day = [ + { id: 1, name: 'Mon' }, + { id: 2, name: 'Tue' }, + { id: 3, name: 'Wed' }, + { id: 4, name: 'Thu' }, + { id: 5, name: 'Fri' }, + { id: 6, name: 'Sat' }, + { id: 0, name: 'Sun' }, + { id: 7, name: 'Select All' }, + ]; + DayList = this.Day[0].name; + TransferType = [ + { id: 1, name: 'Private' }, + { id: 2, name: 'Shared' }, + { id: 3, name: 'Without Transfer' }, + ]; + constructor( + public fb: FormBuilder, + public validationService: ValidationService, + public APIServ: API, + public CommonVari: StaticDataService, + public MsgService: MessageService, + private router: Router, + ) { } + + ngOnInit(): void { + this.GetAllCurrency(); + this.GetPhoneCode(); + this.GetAllNationality(); + this.GetAllActivitySeason(); + this.GetAllVehicleSupplier(); + this.getCountry(); + this.initRateConfigForm(); + // this.CancellationPlicyformCheck(false); + this.GetAllSlot(); + // this.GetAllVehicle(); + this.GetLOVKeys('RatePeriodType,RateSlotType,CancellationPolicyType,NoShowType,RateConfigType,Language,DaySelect,ActivityNoShowPolicyType,ActivityCancellationPolicyType,ActivityCancellationChargeType'); + this.AgeRange = this.fb.group({ + from_count: [''], + to_count: [''], + sequence: [''], + rate: [''], + }); + } + + // CONTROL + get DateControl() { + return this.RateConfigForm.get('datesForRates') as FormArray; + } + + get DaysControl() { + return this.RateConfigForm.get('contract_days') as FormArray; + } + + get SlotsDetail() { + return this.RateConfigForm.get('slotDetails') as FormArray; + } + + get CancelControl() { + return this.RateConfigForm.get('activityCancellationDetails') as FormArray; + } + + get SlotsControl() { + return this.RateConfigForm.get('slots') as FormArray; + } + + get privateTransferDataList() { + return this.RateConfigForm.get('privateTransferDataList') as FormArray; + } + + VehicleControl(i) { + return this.SlotsControl.controls[i].get('activityVehicleRate') as FormArray; + } + + PaxControl(i) { + return this.SlotsControl.controls[i].get('activityPaxRate') as FormArray; + } + get activityPaxRateGroup() { + return this.RateConfigForm.get('activityPaxRate') as FormGroup; + } + + TieredControl(i) { + return this.SlotsControl.controls[i].get('allSlotRateRange') as FormArray; + } + + AdultTControl(i, ind) { + return this.TieredControl(i).controls[ind].get("adultAgeRange") as FormArray; + } + + YouthTControl(i, ind) { + return this.TieredControl(i).controls[ind].get("youthAgeRange") as FormArray; + } + + SeniorTControl(i, ind) { + return this.TieredControl(i).controls[ind].get("seniorAgeRange") as FormArray; + } + + ChildTControl(i, ind) { + return this.TieredControl(i).controls[ind].get("childAgeRange") as FormArray; + } + + InfantTControl(i, ind) { + return this.TieredControl(i).controls[ind].get("infantAgeRange") as FormArray; + } + + + initRateConfigForm() { + this.RateConfigForm = this.fb.group({ + experience_name: [''], + org_id: ['2105311837100000021'], + supplier_id: ['2205221841391724322'], + pricing_slots: [''], + currency_code: this.validationService.required, + country_name: [''], + city_name: [''], + option_name: this.validationService.required, + rate_inclusion: [''], + contract_remark: [''], + _period_type: this.validationService.required, + is_pickup_included: [false], + is_drop_off_included: [false], + is_guide_included: [false], + + _nationality_type: ['1'], + is_exclude_nationality: [false], + + is_private_transfer_price_included: [false], + is_shared_transfer_price_included: [false], + is_slot_wise_cancellation_policy: [false], + _no_show_policy_type: this.validationService.required, + + slotDetails: this.fb.array([ + this.fb.group({ + slots: this.validationService.required, + transfer_type: [''], + }) + ]), + slots: this.fb.array([ + this.fb.group({ + applicableDays: this.validationService.required, + _rate_type: this.validationService.required, + _pricing_type: this.validationService.required, + SlotId: [''], + // activityPaxRate: + // this.fb.group({ + // date: [''], + // allocation_count: [''], + // release_days: [''], + // is_free_sales: [false], + // }), + // allSlotRateRange: this.fb.array([ + // this.fb.group({ + // allocation_count: [''], + // release_days: [''], + // is_free_sales: [false], + // }) + // ]), + // activityVehicleRate: + // this.fb.array([ + // this.fb.group({ + // rate: this.validationService.decimal, + // vehicleSupplier: this.validationService.required, + // vehicle: this.validationService.required, + // vehicle_max_occupancy: [''], + // allocation_count: [''], + // release_days: [''], + // is_free_sales: [false], + // }) + // ]), + // activityCancellationDetails: this.fb.array([ + // this.fb.group({ + // from: [''], + // to: [''], + // CP_Type: [''], + // CP_Value: [''], + // cancellation_Type: [''], + // }) + // ]) + }) + ]), + guide_languages: [''] + }); + this.CancellationPlicyformCheck(false); + } + + + addSlotForm() { + this.RateConfigForm.get('slots') + } + + AddContolsForRateType(val) { + if (val == 1) { + this.SlotsControl.controls.forEach((e, i) => { + let form = e as FormGroup + form.addControl('allSlotRateRange', this.fb.array([ + this.fb.group({ + allocation_count: this.validationService.mobNo, + release_days: this.validationService.mobNo, + is_free_sales: [false], + }) + ])); + this.addcontolsforpax(this.SlotsControl.controls[i], 'allSlotRateRange') + form.removeControl('activityVehicleRate') + form.removeControl('activityPaxRate') + }) + } else if (val == 2) { + this.SlotsControl.controls.forEach((e, i) => { + let form = e as FormGroup + form.addControl('activityPaxRate', + this.fb.group({ + date: [''], + allocation_count: this.validationService.mobNo, + release_days: this.validationService.mobNo, + is_free_sales: [false], + }) + ) + this.addcontolsforpax(this.SlotsControl.controls[i], 'activityPaxRate') + form.removeControl('activityVehicleRate'); + form.removeControl('allSlotRateRange'); + }) + } else if (val == 3) { + this.SlotsControl.controls.forEach((e, i) => { + let form = e as FormGroup + form.addControl('activityVehicleRate', + this.fb.array([ + this.fb.group({ + rate: this.validationService.decimal, + vehicleSupplier: this.validationService.required, + vehicle: this.validationService.required, + vehicle_max_occupancy: [''], + allocation_count: this.validationService.mobNo, + release_days: this.validationService.mobNo, + is_free_sales: [false], + }) + ]), + ); + this.addcontolsforpax(this.SlotsControl.controls[i], '') + form.removeControl('allSlotRateRange'); + form.removeControl('activityPaxRate'); + }) + } + } + + AddSharedTransferControls(check) { + if (check) { + this.RateConfigForm.addControl('vehicle_supplier_id', this.fb.control('', [Validators.required])); + if (this.PaxCheck.is_adult.value) this.RateConfigForm.addControl('adult_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.PaxCheck.is_senior.value) this.RateConfigForm.addControl('senior_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.PaxCheck.is_youth.value) this.RateConfigForm.addControl('youth_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.PaxCheck.is_child.value) this.RateConfigForm.addControl('child_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } else { + this.RateConfigForm.removeControl('vehicle_supplier_id'); + if (this.PaxCheck.is_adult.value) this.RateConfigForm.removeControl('adult_rate'); + if (this.PaxCheck.is_senior.value) this.RateConfigForm.removeControl('senior_rate'); + if (this.PaxCheck.is_youth.value) this.RateConfigForm.removeControl('youth_rate'); + if (this.PaxCheck.is_child.value) this.RateConfigForm.removeControl('child_rate'); + } + } + + AddactivityVehicleRateGroup(group) { + group.get('activityVehicleRate').push(this.fb.group({ + rate: this.validationService.decimal, + vehicleSupplier: this.validationService.required, + vehicle: this.validationService.required, + vehicle_max_occupancy: [''], + allocation_count: this.validationService.mobNo, + release_days: this.validationService.mobNo, + is_free_sales: [false], + })); + } + RemoveactivityVehicleRateGroup(group, ind) { + group.get('activityVehicleRate').removeAt(ind); + } + addSlotCancelPolicy(group) { + group.get('activityCancellationDetails').push(this.fb.group({ + cancellation_Type: [''], + from: [''], + to: [''], + CP_Type: [''], + CP_Value: [''], + })); + } + + + removeSlotCancelPolicy(group, ind) { + group.get('activityCancellationDetails').removeAt(ind); + } + CancellationPlicyformCheck(check) { + if (!check) { + this.RateConfigForm.addControl('activityCancellationDetails', this.fb.array([ + this.fb.group({ + from: this.validationService.mobNo, + to: this.validationService.mobNo, + CP_Type: this.validationService.required, + cancellation_Type: this.validationService.required, + }) + ])); + this.SlotsControl.controls.forEach(obj => { + let form = obj as FormGroup; + form.removeControl('activityCancellationDetails'); + }) + } else { + this.SlotsControl.controls.forEach(obj => { + let form = obj as FormGroup; + form.addControl('activityCancellationDetails', this.fb.array([ + this.fb.group({ + from: this.validationService.mobNo, + to: this.validationService.mobNo, + CP_Type: this.validationService.required, + cancellation_Type: this.validationService.required, + }) + ])) + }) + this.RateConfigForm.removeControl('activityCancellationDetails'); + } + } + + Cancellation_Type(group, ind) { + if (ind != 1) { + group.addControl('CP_Value', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } else { + group.removeControl('CP_Value'); + } + } + No_Show_Type(ind) { + if (ind != 1) { + this.RateConfigForm.addControl('no_show_charge_value', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } else { + this.RateConfigForm.removeControl('no_show_charge_value'); + } + } + AddPrivateTransferControls(check) { + if (check) { + this.RateConfigForm.addControl('privateTransferDataList', this.fb.array([ + this.fb.group({ + vehicle_supplier_id: this.validationService.required, + vehicle_id: this.validationService.required, + vehicle_occupancy: [''], + rate: this.validationService.decimal, + }) + ])) + } else { + this.RateConfigForm.removeControl('privateTransferDataList'); + } + } + AddPrivateTransferGroup() { + this.privateTransferDataList.push(this.fb.group({ + vehicle_supplier_id: this.validationService.required, + vehicle_id: this.validationService.required, + vehicle_occupancy: [''], + rate: this.validationService.decimal, + })) + } + + + + + + // ADD FUNCTION + AddSlots() { + let val = this.RateConfigForm.get('is_slot_wise_cancellation_policy').value; + if (val) { + this.SlotsControl.push( + this.fb.group({ + SlotId: [''], + applicableDays: [''], + activityCancellationDetails: this.fb.array([ + this.fb.group({ + cancellation_Type: [''], + from: [''], + to: [''], + CP_Type: [''], + CP_Value: [''], + }) + ]) + }) + ) + } else { + this.SlotsControl.push( + this.fb.group({ + SlotId: [''], + applicableDays: [''], + }) + ) + } + let formgroup = this.SlotsControl.controls[0].get('_rate_type').value; + this.AddContolsForRateType(formgroup); + } + + addcontolsforpax(formgroup, name) { + if (this.PaxCheck.is_adult.value) { + if (name == 'allSlotRateRange') { + formgroup.get('allSlotRateRange')['controls'][0].addControl('adultAgeRange', + this.fb.array([this.fb.group({ + from_count: this.validationService.mobNo, + to_count: this.validationService.mobNo, + sequence: [''], + rate: this.validationService.decimal, + })]), + ); + } + if (name == 'activityPaxRate') { + formgroup.get('activityPaxRate').addControl('adult_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } + } + if (this.PaxCheck.is_child.value) { + if (name == 'allSlotRateRange') { + formgroup.get('allSlotRateRange')['controls'][0].addControl('childAgeRange', + this.fb.array([this.fb.group({ + from_count: this.validationService.mobNo, + to_count: this.validationService.mobNo, + sequence: [''], + rate: this.validationService.decimal, + })]), + ); + } + if (name == 'activityPaxRate') { + formgroup.get('activityPaxRate').addControl('senior_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } + } + if (this.PaxCheck.is_senior.value) { + if (name == 'allSlotRateRange') { + formgroup.get('allSlotRateRange')['controls'][0].addControl('seniorAgeRange', + this.fb.array([this.fb.group({ + from_count: this.validationService.mobNo, + to_count: this.validationService.mobNo, + sequence: [''], + rate: this.validationService.decimal, + })]), + ); + } + if (name == 'activityPaxRate') { + formgroup.get('activityPaxRate').addControl('youth_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } + } + + if (this.PaxCheck.is_youth.value) { + if (name == 'allSlotRateRange') { + formgroup.get('allSlotRateRange')['controls'][0].addControl('youthAgeRange', + this.fb.array([this.fb.group({ + from_count: this.validationService.mobNo, + to_count: this.validationService.mobNo, + sequence: [''], + rate: this.validationService.decimal, + })]), + ); + } + if (name == 'activityPaxRate') { + formgroup.get('activityPaxRate').addControl('child_rate', this.fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } + } + + } + addDateCont() { + this.DateControl.push( + this.fb.group({ + start: this.validationService.required, + end: this.validationService.required + }) + ) + } + + addCancel() { + this.CancelControl.push(this.fb.group({ + from: this.validationService.mobNo, + to: this.validationService.mobNo, + CP_Type: this.validationService.required, + // CP_Value: [''], + // cancellation_Type: this.validationService.required, + })) + } + + addSlotsDetail() { + this.SlotsDetail.push( + this.fb.group({ + slots: this.validationService.required, + transfer_type: [''], + }) + ) + } + + AllSelectedSlots = [] + AddRateSlots(obj, ind) { + let id = this.AllSlot.filter(li => li.activity_slot_id == obj); + let newslot = this.AllSelectedSlots.filter(e => e.activity_slot_id == id[0].activity_slot_id); + if (newslot.length <= 0) { + this.AllSelectedSlots[ind] = []; + this.AllSelectedSlots[ind] = id[0]; + } + } + + selectedSlots(obj, ind) { + this.slotList = []; + // this.RateConfigForm.get('slotDetails').value.map(li => { + // if (li.startHour && li.startMin && li.endHour && li.endMin) { + // this.slotList.push(li) + // } + // }) + } + addAdultAge(i, ind) { + if (this.AdultTControl(i, ind).length <= 5) { + this.AdultTControl(i, ind).push(this.fb.group({ + from_count: this.validationService.mobNo, + to_count: this.validationService.mobNo, + sequence: [''], + rate: this.validationService.decimal, + })) + } + } + + addYouthAge(i, ind) { + if (this.YouthTControl(i, ind).length <= 5) { + this.YouthTControl(i, ind).push(this.fb.group({ + from_count: this.validationService.mobNo, + to_count: this.validationService.mobNo, + sequence: [''], + rate: this.validationService.decimal, + })) + } + } + + addChildAge(i, ind) { + if (this.ChildTControl(i, ind).length <= 5) { + this.ChildTControl(i, ind).push(this.fb.group({ + from_count: this.validationService.mobNo, + to_count: this.validationService.mobNo, + sequence: [''], + rate: this.validationService.decimal, + })) + } + } + + addSeniordAge(i, ind) { + if (this.SeniorTControl(i, ind).length <= 5) { + this.SeniorTControl(i, ind).push(this.fb.group({ + from_count: this.validationService.mobNo, + to_count: this.validationService.mobNo, + sequence: [''], + rate: this.validationService.decimal, + })) + } + } + + // REMOVE FUNCTION + + removePrivateTransferGroup(ind) { + this.privateTransferDataList.removeAt(ind); + } + removeSlotCont(ind) { + this.SlotsControl.removeAt(ind) + } + + removeDateCont(ind) { + this.DateControl.removeAt(ind) + } + + removeCancel(i) { + this.CancelControl.removeAt(i) + } + + removeSlotsDetail(ind) { + this.SlotsDetail.removeAt(ind) + } + + removeAdultAge(i, ind, secI) { + this.AdultTControl(i, ind).removeAt(secI) + } + + removeYouthAge(i, ind, secI) { + this.YouthTControl(i, ind).removeAt(secI) + } + + removeChildAge(i, ind, secI) { + this.ChildTControl(i, ind).removeAt(secI) + } + + removeSeniordAge(i, ind, secI) { + this.SeniorTControl(i, ind).removeAt(secI) + } + + removeInfantAge(i, ind, secI) { + this.InfantTControl(i, ind).removeAt(secI) + } + + isExcludeNationality(check) { + if (check) { + this.RateConfigForm.addControl('excNationalityCodes', this.fb.control([], Validators.required)); + this.remove_nationality('include') + } else this.RateConfigForm.removeControl('excNationalityCodes'); + } + + isIncludeNationality(val) { + if (val == '2') { + this.RateConfigForm.addControl('incNationalityCodes', this.fb.control([], Validators.required)); + this.RateConfigForm.get('incNationalityCodes').setValue([]); + } else if (val == '1') { + this.RateConfigForm.removeControl('incNationalityCodes'); + this.remove_nationality('exclude'); + } + } + + + // FUNCTIONS + checkFunc(check, controlName, val, arr) { + check ? this.addvalid(controlName, 'add', val, arr) : this.addvalid(controlName, 'remove', val, arr) + } + + addvalid(name, type, val, arr) { + if (type == 'add') { + let checkCont = arr != 'arr' ? this.fb.control(val, [Validators.required]) : this.fb.array([val], [Validators.required]) + this.RateConfigForm.addControl(name, checkCont) + this.RateConfigForm.controls[name].updateValueAndValidity(); + } else this.RateConfigForm.removeControl(name); + }; + + periodType(val) { + if (val == '1') { + this.checkFunc(false, 'seasonIdsForRateDates', '', '') + this.checkFunc(true, 'datesForRates', this.fb.group({ start: this.validationService.required, end: this.validationService.required }), 'arr') + } else { + this.checkFunc(true, 'seasonIdsForRateDates', '', '') + this.checkFunc(false, 'datesForRates', '', '') + } + } + + SeasonFilter(val) { + this.fil_season_list = [] + val.map(num => { + this.fil_season_list.push(this.season_list.filter(obj => obj.activitySeason.activity_season_id == num)) + }) + } + + startDateChange(ind) { + this.DateControl.controls[ind].get('end').setValue(this.DateControl.controls[ind].value.start) + } + + daysChange(e) { + e.option.id == 7 ? this.DaysControl.setValue(this.Day.map(ul => ul.id)) : + this.DaysControl.value.map((li, i) => li == 7 ? this.DaysControl.value.splice(i, 1) : ''); + } + + SlotChange(e) { + if (e == 1) this.AddSlotsControlValidations('SlotId', false); + else if (e == 2) this.AddSlotsControlValidations('SlotId', true); + if (e == 1 && this.SlotsControl.value.length != 1) { + this.SlotsControl.controls.splice(1, this.SlotsControl.controls.length) + } + } + + AddSlotsControlValidations(name, check) { + if (check) { + this.SlotsControl.controls[0].get(name).addValidators([Validators.required]); + this.SlotsControl.controls[0].get(name).updateValueAndValidity(); + this.SlotsControl.controls[0].get(name).markAsUntouched(); + } else { + this.SlotsControl.controls[0].get(name).clearValidators(); + this.SlotsControl.controls[0].get(name).updateValueAndValidity(); + this.SlotsControl.controls[0].get(name).markAsUntouched(); + } + }; + + GetAllCurrency() { + this.APIServ.Get('/Currency/GetCurrency').subscribe(d => { + if (d) this.currencyList = d; + }); + } + + GetPhoneCode() { + this.APIServ.Get('/CountryPhone/GetCountryPhone').subscribe(data => { + if (data) this.PhoneCode = data; + }); + } + + + + GetAllNationality() { + this.APIServ.Get('/Country/GetCountry').subscribe(res => { + if (res) { + this.all_nationality_list = res; + this.include_nationality_list = res; + this.exclude_nationality_list = res; + } + }); + } + AllSlot; + GetAllSlot() { + let post = new GetActivitySlot(); + let activity_id = CommonService.getSessionStoage('activity_id'); + post.activity_id = activity_id; + post.from_hour = null; + post.from_minute = null; + post.to_hour = null; + post.to_minute = null; + this.APIServ.Post('/ActivitySlot/GetAllSlot', post).subscribe(res => { + if (res) { + this.AllSlot = res['responseObject']; + } + }); + } + AllCountry; + getCountry() { + this.APIServ.Get('/Country/GetCountry').subscribe(data => { + if (data) { + this.AllCountry = data; + } + }); + }; + + GetAllActivitySeason() { + this.APIServ.Get('/ActivitySeason/GetAllActivitySeason?activityId=' + CommonService.getSessionStoage('activity_id')).subscribe(d => { + if (d && d.status) { + this.season_list = d.responseObject; + } + }); + } + AllVehicleSupplier; + GetAllVehicleSupplier() { + this.APIServ.Get('/Vehicle/GetAllVehicleSupplier').subscribe(res => { + if (res) { + this.AllVehicleSupplier = res.responseObject; + } + }); + } + + AllVehicleBySupplierId = { + Shared: [], + Slots: [] + };; + GetAllVehicleBySupplierId(Id, name, i) { + this.APIServ.Get('/Vehicle/GetAllVehicleBySupplier/' + Id).subscribe(res => { + if (res) { + this.AllVehicleBySupplierId[name][i] = [] + this.AllVehicleBySupplierId[name][i] = res.responseObject; + } + }); + } + Set_Max_Occcupancy(obj, formgroup) { + formgroup.get('vehicle_max_occupancy').setValue(obj.max_passenger_capacity); + } + + setprivateOccupancy(obj, formgroup) { + formgroup.get('vehicle_occupancy').setValue(obj.max_passenger_capacity); + } + + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + } + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.APIServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + this.GetActivityById(); + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + } + + PaxCheck = { + is_youth: { + form: '', + to: '', + value: false + }, + is_senior: { + form: '', + to: '', + value: false + }, + is_adult: { + form: '', + to: '', + value: false + }, + is_child: { + form: '', + to: '', + value: false + }, + } + GetActivityById() { + let activity_id = CommonService.getSessionStoage('activity_id'); + this.APIServ.Get('/Activity/GetActivity/' + activity_id).subscribe(d => { + if (d && d.status) { + if (d.responseObject.activityContents && d.responseObject.activityContents.length > 0) { + this.activityData = d.responseObject; + this.PaxCheck.is_adult.value = this.activityData.is_adult; + this.PaxCheck.is_adult.to = this.activityData.adult_age_to; + this.PaxCheck.is_adult.form = this.activityData.adult_age_from; + + this.PaxCheck.is_child.value = this.activityData.is_child; + this.PaxCheck.is_child.form = this.activityData.child_age_from; + this.PaxCheck.is_child.to = this.activityData.child_age_to; + + this.PaxCheck.is_senior.value = this.activityData.is_senior; + this.PaxCheck.is_senior.form = this.activityData.senior_age_from; + this.PaxCheck.is_senior.to = this.activityData.senior_age_to; + + this.PaxCheck.is_youth.value = this.activityData.is_youth; + this.PaxCheck.is_youth.form = this.activityData.youth_age_from; + this.PaxCheck.is_youth.to = this.activityData.youth_age_to; + this.initRateConfigForm(); + this.RateConfigForm.get('experience_name').setValue(d.responseObject.activityContents[0].activity_name); + let county = this.activityData.country_code.split(',') + this.RateConfigForm.get('country_name').setValue(county); + this.getcity(this.activityData.country_code); + let city = this.activityData.city_id.split(','); + this.RateConfigForm.get('city_name').setValue(city); + let lang = d.responseObject._service_language.split(','); + lang.map(ln => { + this.lovKeyDataObj['Language'].map(li => { + if (ln == li.lov_value) { + this.LangList.push(li) + } + }) + }) + + + + } + console.log(this.PaxCheck) + } + }); + } + FreeSalesCheck(group, check) { + if (!check) { + group.addControl('allocation_count', this.fb.control('', [Validators.required, Validators.pattern(/^[0-9]*$/)])); + } else group.removeControl('allocation_count'); + } + getcity(code) { + this.APIServ.Get('/City/GetCity/' + code).subscribe(data => { + if (data) { + this.allCityDetials = data; + } + }); + }; + + // select_nataionality_type(nationality_type) { + // (nationality_type == 'all_nationality') ? + // this.RateConfigForm.removeControl('incNationalityCodes') : + // this.RateConfigForm.addControl('incNationalityCodes', this.fb.control('')); + // } + + remove_nationality(type) { + let con = type == 'exclude' ? 'incNationalityCodes' : 'excNationalityCodes' + type == 'exclude' ? this.exclude_nationality_list = [...this.all_nationality_list] : this.include_nationality_list = [...this.all_nationality_list]; + let list = type == 'exclude' ? this.exclude_nationality_list : this.include_nationality_list; + let nationality_arr = this.RateConfigForm.get(con).value ? this.RateConfigForm.get(con).value : []; + nationality_arr.forEach(nationality_code => { + let ind = list.findIndex(nationality_obj => nationality_obj.alpha_2_code == nationality_code); + (ind != -1) ? list.splice(ind, 1) : ''; + type == 'exclude' ? this.exclude_nationality_list = [...list] : this.include_nationality_list = [...list]; + }); + } + + SaveRate() { + let value = this.RateConfigForm.getRawValue(); + console.log(this.RateConfigForm) + if (this.RateConfigForm.status == 'INVALID') { + this.validationService.showValidationsMsg(this.RateConfigForm); + return; + }; + + let RateConfigModel = new SaveActivityContractDetails(); + let RateContract = new ActivityContract(); + let ArrRateContractDetail = new Array(); + let ArrRateDateRange = new Array(); + + // RATE CONTRACT + RateContract.org_id = value.org_id; + RateContract.activity_id = CommonService.getSessionStoage('activity_id'); + RateContract.supplier_id = value.supplier_id; + RateContract.currency_code = value.currency_code; + RateContract._nationality_type = value._nationality_type; + RateContract.is_exclude_nationality = value.is_exclude_nationality; + RateContract._period_type = value._period_type.toString(); + RateContract.season_id = value.seasonIdsForRateDates ? value.seasonIdsForRateDates.join(',') : ''; + RateContract._rate_type = value.slots[0]._rate_type.toString(); + RateContract._pricing_type = value.slots[0]._pricing_type.toString(); + RateContract.is_pickup_included = value.is_pickup_included; + RateContract.is_drop_off_included = value.is_drop_off_included; + RateContract.is_guide_included = value.is_guide_included; + RateContract.is_slot_wise_cancellation_policy = value.is_slot_wise_cancellation_policy; + RateContract._no_show_policy_type = value._no_show_policy_type.toString(); + RateContract.no_show_charge_value = value._no_show_policy_type != 1 ? value.no_show_charge_value : 0; + RateContract.guide_languages = value.guide_languages ? value.guide_languages.join(',') : ''; + RateContract.is_private_transfer_price_included = value.is_private_transfer_price_included; + RateContract.reviewed_by = 'Razzak' + RateContract.reviewer_comments = 'Razzak' + RateContract.reviewer_user_type = 'Razzak' + + // Private Tranfer Price Included + RateConfigModel.privateTransfer = []; + if (value.is_private_transfer_price_included) { + let val = this.privateTransferDataList.getRawValue() + let postarr = [] + val.forEach(e => { + let privateArr = new ActivityPrivateTransfer(); + privateArr.rate = e.rate; + privateArr.vehicle_id = e.vehicle_id; + privateArr.vehicle_occupancy = e.vehicle_occupancy; + privateArr.vehicle_supplier_id = e.vehicle_supplier_id; + postarr.push(privateArr); + }); + RateConfigModel.privateTransfer = postarr; + } + + // Shared Transfer Price Included + RateContract.is_shared_transfer_price_included = value.is_shared_transfer_price_included; + RateConfigModel.sharedTransfer = null; + if (value.is_shared_transfer_price_included) { + let SharetransferArr = new ActivitySharedTransfer(); + SharetransferArr.vehicle_supplier_id = value.vehicle_supplier_id + SharetransferArr.adult_rate = value.adult_rate ? value.adult_rate : 0; + SharetransferArr.senior_rate = value.senior_rate ? value.senior_rate : 0; + SharetransferArr.youth_rate = value.youth_rate ? value.youth_rate : 0; + SharetransferArr.child_rate = value.child_rate ? value.child_rate : 0; + RateConfigModel.sharedTransfer = SharetransferArr; + } + + + // Rate Period Type + RateConfigModel.datesForRates = []; + if (value._period_type == 1) { + value.datesForRates.map(li => { + let RateDateRange = new DateRange(); + RateDateRange.Start = moment(li.start, "HH:mm:ss").utc().format(''); + RateDateRange.End = moment(li.end, "HH:mm:ss").utc().format(''); + ArrRateDateRange.push(RateDateRange) + }) + RateConfigModel.datesForRates = ArrRateDateRange; + } + + RateConfigModel.seasonIdsForRateDates = []; + if (value._period_type == 2) { + RateConfigModel.seasonIdsForRateDates = value.seasonIdsForRateDates; + } + + + // ACTIVITY DETAILS + let RateContractDetail = new ActivityDetails(); + RateContractDetail.contract_remark = value.contract_remark; + RateContractDetail.language_code = CommonService.getSessionStoage('Def_Lang_code'); + RateContractDetail.option_name = value.option_name; + RateContractDetail.rate_inclusion = value.rate_inclusion; + ArrRateContractDetail.push(RateContractDetail); + + // Solts Details + let slotsDetaisl = [] + RateConfigModel.slotDetails = []; + value.slots.forEach(e => { + + let postDataArr = new SlotDetails(); + postDataArr.applicableDays = e.applicableDays.join(','); + if (value.slots[0]._rate_type == '1') { + + let slotDetail = e.allSlotRateRange[0]; + let RateTieredPricing = new RateRange(); + let ArrAdultAgeRange = new Array(); + let ArrYouthAgeRange = new Array(); + let ArrSeniorAgeRange = new Array(); + let ArrChildAgeRange = new Array(); + + // Adult + slotDetail.adultAgeRange ? slotDetail.adultAgeRange.map((li, i) => { + let AdultAgeRange = new AgeRange(); + AdultAgeRange.from_count = li.from_count; + AdultAgeRange.to_count = li.to_count; + AdultAgeRange.rate = li.rate; + AdultAgeRange.sequence = i + 1; + ArrAdultAgeRange.push(AdultAgeRange) + }) : ''; + // Youth + slotDetail.youthAgeRange ? slotDetail.youthAgeRange.map((li, i) => { + let YouthAgeRange = new AgeRange(); + YouthAgeRange.from_count = li.from_count; + YouthAgeRange.to_count = li.to_count; + YouthAgeRange.rate = li.rate; + YouthAgeRange.sequence = i + 1; + + ArrYouthAgeRange.push(YouthAgeRange) + }) : ''; + // Senior + slotDetail.seniorAgeRange ? slotDetail.seniorAgeRange.map((li, i) => { + let SeniorAgeRange = new AgeRange(); + SeniorAgeRange.from_count = li.from_count; + SeniorAgeRange.to_count = li.to_count; + SeniorAgeRange.rate = li.rate; + SeniorAgeRange.sequence = i + 1; + + ArrSeniorAgeRange.push(SeniorAgeRange) + }) : ''; + // Child + slotDetail.childAgeRange ? slotDetail.childAgeRange.map((li, i) => { + let ChildAgeRange = new AgeRange(); + ChildAgeRange.from_count = li.from_count; + ChildAgeRange.to_count = li.to_count; + ChildAgeRange.rate = li.rate; + ChildAgeRange.sequence = i + 1; + + ArrChildAgeRange.push(ChildAgeRange) + }) : ''; + + RateTieredPricing.adultAgeRange = ArrAdultAgeRange; + RateTieredPricing.childAgeRange = ArrChildAgeRange; + RateTieredPricing.seniorAgeRange = ArrSeniorAgeRange; + RateTieredPricing.youthAgeRange = ArrYouthAgeRange; + let post = new AllocationDetails(); + post._allocation_type = slotDetail.is_free_sales ? '1' : '3'; + post.allocation_count = slotDetail.is_free_sales ? 0 : slotDetail.allocation_count; + post.release_days = slotDetail.release_days; + post._release_type = '1'; + post.vehicle_id = 'er'; + RateTieredPricing.allocationDetails = post; + postDataArr.rateRange = RateTieredPricing; + } + if (value.slots[0]._rate_type == '2') { + let slotDetail = value.slots[0].activityPaxRate; + let RatePerPerson = new ActivityPaxRate(); + RatePerPerson.adult_rate = slotDetail.adult_rate; + RatePerPerson.child_rate = slotDetail.child_rate; + RatePerPerson.senior_rate = slotDetail.senior_rate; + RatePerPerson.youth_rate = slotDetail.youth_rate; + + let post = new AllocationDetails(); + post._allocation_type = slotDetail.is_free_sales ? '1' : '3'; + post.allocation_count = slotDetail.is_free_sales ? 0 : slotDetail.allocation_count; + post.release_days = slotDetail.release_days; + post._release_type = '1'; + post.vehicle_id = 'er'; + RatePerPerson.allocationDetails = post; + postDataArr.activityPaxRate = RatePerPerson; + } + if (value.slots[0]._rate_type == '3') { + let slotDetail = e.activityVehicleRate; + let postdata = []; + slotDetail.forEach(li => { + let RateVehicle = new ActivityVehicleRate(); + RateVehicle.rate = slotDetail[0].rate ? li.rate : 0; + // RateVehicle.vehicle_max_occupancy = li.vehicle_max_occupancy ? parseInt(li.vehicle_max_occupancy) : 0; + RateVehicle.vehicle_max_occupancy = li.vehicle_max_occupancy; + RateVehicle.vehicle_id = li.vehicle; + RateVehicle.vehicle_supplier_id = li.vehicleSupplier; + let post = new AllocationDetails(); + post._allocation_type = slotDetail.is_free_sales ? '1' : '3'; + post.allocation_count = slotDetail.is_free_sales ? 0 : slotDetail.allocation_count; + post.release_days = slotDetail.release_days; + post._release_type = '1'; + post.vehicle_id = 'er'; + RateVehicle.allocationDetails = post; + postdata.push(RateVehicle); + }) + postDataArr.activityVehicleRate = postdata; + } + if (value.is_slot_wise_cancellation_policy) { + let slotspolicy = e.activityCancellationDetails; + let postdata = []; + slotspolicy.forEach(li => { + let arr = new ActivityCancellationDetails(); + arr.CP_Type = li.CP_Type.toString(); + arr.CP_Value = li.CP_Type != 1 ? li.CP_Value : 0; + arr.cancellation_Type = slotspolicy[0].cancellation_Type.toString(); + arr.from = li.from; + arr.to = li.to; + postdata.push(arr); + }) + postDataArr.activityCancellationDetails = postdata; + } + if (value.slots[0]._pricing_type == 1) { + let allslots = []; + value.slotDetails.forEach(li => { + let post = new Slots(); + post.slotId = li.slots + post.is_private_transfer = false; + post.is_without_transfer = false; + post.is_shared_transfer = false; + li.transfer_type.forEach(q => { + if (q == 1) post.is_private_transfer = true; + if (q == 2) post.is_without_transfer = true; + if (q == 3) post.is_shared_transfer = true; + }) + allslots.push(post); + }) + postDataArr.slot = allslots; + } + else if (value.slots[0]._pricing_type == 2) { + let allslots = []; + e.SlotId.forEach(q => { + let arr = value.slotDetails.filter(li => li.slots == q); + let post = new Slots(); + post.slotId = arr[0].slots; + post.is_private_transfer = false; + post.is_without_transfer = false; + post.is_shared_transfer = false; + arr[0].transfer_type.forEach(z => { + if (z == 1) post.is_private_transfer = true; + if (z == 2) post.is_without_transfer = true; + if (z == 3) post.is_shared_transfer = true; + }) + allslots.push(post); + postDataArr.slot = allslots; + }); + } + slotsDetaisl.push(postDataArr); + }) + RateConfigModel.slotDetails = slotsDetaisl; + + // Activity Cancellation Details + RateConfigModel.activityCancellationDetails = []; + if (!value.is_slot_wise_cancellation_policy) { + let policyDetails = value.activityCancellationDetails; + let postdata = []; + policyDetails.forEach(li => { + let arr = new ActivityCancellationDetails(); + arr.cancellation_Type = policyDetails[0].cancellation_Type.toString(); + arr.CP_Type = li.CP_Type.toString(); + arr.CP_Value = li.CP_Type != 1 ? li.CP_Value : 0; + arr.from = li.from; + arr.to = li.to; + postdata.push(arr); + }) + RateConfigModel.activityCancellationDetails = postdata; + }; + + RateConfigModel.activityContract = RateContract; + RateConfigModel.incNationalityCodes = value.incNationalityCodes ? value.incNationalityCodes : []; + RateConfigModel.excNationalityCodes = value.excNationalityCodes ? value.excNationalityCodes : []; + RateConfigModel.activityContractDetails = ArrRateContractDetail; + console.log(RateConfigModel); + this.APIServ.Post('/ActivityContract/SaveActivityContract', RateConfigModel).subscribe(res => { + if (res) { + this.showToastrMsg(res) + } + }) + } + + showToastrMsg(respData) { + this.MsgService.add({ + severity: respData['status'] ? 'success' : 'error', + detail: respData['message'], + }); + setTimeout(() => { + respData['status'] ? this.btnClick() : ''; + }, 500); + } + btnClick() { + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage']) + } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-allocation/edit-allocation.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-allocation/edit-allocation.component.html new file mode 100644 index 0000000..21f26cf --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-allocation/edit-allocation.component.html @@ -0,0 +1,137 @@ +
    + + Back +
    +
    Modify Allocation
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    + + + + {{ item.start_time | date : 'HH:mm'}} to {{item.end_time| date : 'HH:mm'}} + + + Please select Slot +
    +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + + {{ activity_obj.activitySeason.season_name}} + +
    +
    + + + +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
    +
    Date
    +
    +
    + Allocation + +
    +
    +
    + Release Days + +
    +
    +
    Free Sale
    +
    +
    Stop Sale
    +
    {{data._date | date : "dd MMM YYYY"}} + + + + + + + + + +
    +
    + +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-allocation/edit-allocation.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-allocation/edit-allocation.component.ts new file mode 100644 index 0000000..4c0bed9 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-allocation/edit-allocation.component.ts @@ -0,0 +1,410 @@ +import { Component, OnInit, ElementRef, ViewChild } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { AllocationItems, UpdateAllocation } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-allocation/edit-allocation.model'; +import { GetCancellationPolicy } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-cancellation-policy/edit-cancellation-policy.model'; +import { GetRateDetails } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-rate-confi/edit-rate-confi.model'; +// import { AllocationItems, UpdateAllocation } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-allocation/edit-allocation.model'; +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; +interface grp { + name: string; + code: string; +} +@Component({ + selector: 'app-edit-allocation', + templateUrl: './edit-allocation.component.html', +}) +export class EditAllocationComponent implements OnInit { + + FormData: FormGroup + activityContractId; + activityContract; + DaySelect; + NoShowPolicyType; + AllSlotData; + AllocationDetails; + SoltDate; + slot_wise_cancellation_policy; + RateConfigdata + AllSlots; + lovKeyDataObj = { + RatePeriodType: [], + DaySelect: [], + ActivityNoShowPolicyType: [], + ActivityCancellationPolicyType: [], + ActivityCancellationChargeType: [], + }; + season_list; + constructor(private router: Router, private route: ActivatedRoute, public ApiServ: API, public Fb: FormBuilder, public MsgService: MessageService, public validationService: ValidationService) { } + ngOnInit(): void { + this.NgOinitFrom(); + this.GetSlotData(); + this.GetRateConfig(); + this.GetAllActivitySeason(); + this.GetLOVKeys('RatePeriodType,DaySelect,ActivityNoShowPolicyType,ActivityCancellationPolicyType,ActivityCancellationChargeType'); + }; + + + /** + * @author Abdul Razzak + * To create form group + */ + NgOinitFrom() { + this.FormData = this.Fb.group({ + option_name: [''], + activity_name: [''], + period_type: [''], + seasonId: [''], + dates: [''], + days: [''], + Allocation_list: this.Fb.array([ + this.Fb.group({ + allocation_count: [''], + release_days: [''], + FreeSale: [false], + StopSale: [false], + }) + ]) + }); + } + + /** + * @author Abdul Razzak + * to get activity contract data by contract id and set value + */ + GetRateConfig() { + this.route.queryParams.subscribe(obj => { + if (obj['id']) { + this.GetActivityById(); + this.activityContractId = obj['id']; + this.GetSlotsById(obj['id']); + this.ApiServ.Get('/ActivityContract/GetRateConfig/' + obj['id']).subscribe(d => { + if (d && d.status) { + this.RateConfigdata = d.responseObject; + d.responseObject.is_slot_wise_cancellation_policy; + if (d.responseObject.is_slot_wise_cancellation_policy) { + this.FormData.addControl('slot_id', this.Fb.control('',[Validators.required])); + } + this.FormData.get('option_name').setValue(d.responseObject.option_name); + + } + }) + } + }); + } + + /** + * @author Abdul Razzak + * to get slot data by contract id + * @param Id + */ + GetSlotsById(Id) { + this.ApiServ.Get('/ActivityContract/GetSlotsById/' + Id).subscribe(res => { + if (res) { + this.AllSlots = res.responseObject; + } + }) + } + + + /** + * @author Abdul Razzak + * to get activity details + */ + GetActivityById() { + let activity_id = CommonService.getSessionStoage('activity_id'); + this.ApiServ.Get('/Activity/GetActivity/' + activity_id).subscribe(res => { + if (res) { + this.FormData.get('activity_name').setValue(res.responseObject.activityContents[0].activity_name); + } + }) + } + + /** + * @author Abdul razzak + * to set value + */ + CopyOnUi() { + console.log('this.allocationValue.nativeElement.value') + let Group = this.Allocation_list.getRawValue(); + let newgroup = Group.splice(0, 1) + + Group.map((e, i) => { + !newgroup[0].FreeSale ? this.Allocation_list.controls[i + 1].get('allocation_count').setValue(newgroup[0].allocation_count) : ''; + this.StopSalecheck(newgroup[0].StopSale, i + 1); + this.freesalecheck(newgroup[0].FreeSale, i + 1); + this.Allocation_list.controls[i + 1].get('StopSale').setValue(newgroup[0].StopSale); + this.Allocation_list.controls[i + 1].get('FreeSale').setValue(newgroup[0].FreeSale); + this.Allocation_list.controls[i + 1].get('release_days').setValue(newgroup[0].release_days); + }); + + } + + + /** + * @author Abdul Razzak + * to get data from LOV + * @param lov_key_names + */ + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + } + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.ApiServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + this.GetActivityById(); + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + } + + + /** + * @author Abdul Razzak + * to get all activity season data + */ + GetAllActivitySeason() { + this.ApiServ.Get('/ActivitySeason/GetAllActivitySeason?activityId=' + CommonService.getSessionStoage('activity_id')).subscribe(d => { + if (d && d.status) { + this.season_list = d.responseObject; + } + }); + } + + /** + * @author Abdul Razzak + * to get form group controls + */ + get Allocation_list() { + return this.FormData.get('Allocation_list') as FormArray + }; + + /** + * @author Abdul Razzak + * to set value for each form list + * @param data + */ + setValue(data) { + this.Allocation_list.clear(); + this.addForm(); + for (let i = 0; i < data.length; i++) { + this.addForm(); + let formval = this.Allocation_list.controls[i + 1].value; + Object.keys(formval).forEach(a => { + if (a == 'StopSale' || a == 'FreeSale') { + if (data[i]['_allocation_type'] == '1') { + this.Allocation_list.controls[i + 1].get('FreeSale').setValue(true); + this.freesalecheck(true, i + 1); + } + if (data[i]['_allocation_type'] == '2') { + this.Allocation_list.controls[i + 1].get('StopSale').setValue(true); + this.StopSalecheck(true, i + 1); + } + } + else { + this.Allocation_list.controls[i + 1].get(a).setValue(data[i][a]); + } + }); + } + }; + + /** + * @author Abdul Razzak + * to create allocation form group + * + */ + addForm() { + this.Allocation_list.push(this.Fb.group({ + allocation_count: [''], + release_days: [''], + FreeSale: [false], + StopSale: [false], + _date: [''], + activity_allocation_id: [''], + })); + }; + + /** + * @author Abdul Razzak + * to get slots list by contract id + */ + GetSlotData() { + this.ApiServ.Get('/ActivityContract/GetSlotsById/' + this.activityContractId).subscribe(data => { + if (data) { + this.AllSlotData = data.responseObject; + } + }); + }; + + /** + * @author Abdul Razzak + * to clear input field + */ + ClearSearchField() { + let val = this.FormData.getRawValue() + if (val.period_type == 2) this.FormData.get('dates').setValue(''); + else if (val.period_type == 1) this.FormData.get('seasonId').setValue([]); + } + + Months = [ + { id: 1, name: 'Jan' }, + { id: 2, name: 'Feb' }, + { id: 3, name: 'Mar' }, + { id: 4, name: 'Apr' }, + { id: 5, name: 'Jun' }, + { id: 6, name: 'Jun' }, + { id: 7, name: 'Jul' }, + { id: 8, name: 'Aug' }, + { id: 9, name: 'Sep' }, + { id: 10, name: 'Oct' }, + { id: 11, name: 'Nov' }, + { id: 12, name: 'Dec' }, + ]; + MonthsList = this.Months[0].name; + + /** + * @author Abdul razzak + * to get all allocation details + */ + getAllocationDetails() { + let val = this.FormData.getRawValue(); + let postdata = new GetRateDetails(); + postdata.from_date = val.dates[0] ? moment(val.dates[0]).format('YYYY-MM-DD') : ''; + postdata.to_date = val.dates[1] ? moment(val.dates[1]).format('YYYY-MM-DD') : ''; + postdata.dates = ''; + postdata.slot_id = val.slot_id ? val.slot_id : ''; + postdata.seasonId = val.seasonId ? val.seasonId : []; + postdata.days = val.days ? val.days.join(',') : ''; + postdata.contract_id = this.activityContractId; + + this.ApiServ.Post('/ActivityContract/GetAllocationDetails', postdata).subscribe(data => { + if (data) { + this.AllocationDetails = data.responseObject; + data.responseObject ? this.setValue(data.responseObject) : ''; + } + }); + }; + + + + /** + * @author Abdul Razzak + * to update allocation value + * @returns + */ + updateAllocation() { + if (this.FormData.status == "INVALID") { + this.validationService.showValidationsMsg(this.FormData); + const firstElementWithError = document.querySelector('.ng-invalid'); + if (firstElementWithError) { + firstElementWithError.scrollIntoView({ behavior: 'smooth' }); + } + return; + } + let value = this.FormData.getRawValue(); + let postArr = []; + value.Allocation_list.splice(0, 1) + value.Allocation_list.map((e, i) => { + let items = new AllocationItems(); + if (value.Allocation_list[i].FreeSale) { + items._allocation_type = '1'; + } else if (value.Allocation_list[i].StopSale) { + items._allocation_type = '2'; + } else items._allocation_type = '3'; + items.allocation_count = value.Allocation_list[i].allocation_count ? value.Allocation_list[i].allocation_count : 0; + items.release_days = value.Allocation_list[i].release_days ? value.Allocation_list[i].release_days : 0; + items.activity_allocation_id = value.Allocation_list[i].activity_allocation_id; + postArr.push(items) + }) + + let PostData = new UpdateAllocation(); + PostData.activity_contract_id = this.activityContractId; + PostData.activity_slot_id = value.slot_id ? value.slot_id : ''; + PostData.allocationItems = postArr; + this.ApiServ.Post('/ActivityContract/UpdateActivityAllocation', PostData).subscribe((res) => { + if (res) { + this.showToastrMsg(res) + } + }); + }; + + /** + * @author Abdul Razzak + * to show toaster + * @param respData + */ + showToastrMsg(respData) { + this.MsgService.add({ + severity: respData['status'] ? 'success' : 'error', + detail: respData['message'], + }); + setTimeout(() => { + respData['status'] ? this.btnClick() : ''; + }, 500); + } + /** + * @author Abdul Razzak + * to navigate overview + */ + btnClick() { + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage']) + } + + /** + * @author Abdul Razzak + * to disable checkbox + * @param Check + * @param Ind + */ + freesalecheck(Check, Ind) { + if (Check) { + this.Allocation_list.controls[Ind].get('StopSale').disable(); + this.Allocation_list.controls[Ind].get('allocation_count').disable(); + this.Allocation_list.controls[Ind].get('allocation_count').setValue(''); + } else { + this.Allocation_list.controls[Ind].get('allocation_count').enable(); + this.Allocation_list.controls[Ind].get('StopSale').enable(); + } + }; + + /** + * @author Abdul Razzak + * to disable checkbox + * @param Check + * @param Ind + */ + StopSalecheck(Check, Ind) { + if (Check) { + this.Allocation_list.controls[Ind].get('FreeSale').disable(); + } else { + this.Allocation_list.controls[Ind].get('FreeSale').enable(); + } + }; + + /** + * @author Abdul Razzak + * to reset search value + */ + reset() { + this.FormData.get('seasonId').setValue([]); + this.FormData.get('dates').setValue(''); + this.FormData.get('period_type').setValue(''); + this.FormData.get('slot_id').setValue(''); + this.FormData.get('slot_id').markAsUntouched(); + this.FormData.get('days').setValue(''); + } + +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-cancelletion-policy/edit-cancelletion-policy.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-cancelletion-policy/edit-cancelletion-policy.component.html new file mode 100644 index 0000000..e93531c --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-cancelletion-policy/edit-cancelletion-policy.component.html @@ -0,0 +1,161 @@ +
    + + Back +
    +
    Modify Cancellation
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + + + Please select No Show Type +
    +
    + + + Please enter value + accept number only +
    +
    +
    +
    +
    +
    + + + + {{ item.start_time | date : 'HH:mm'}} to {{item.end_time| date : 'HH:mm'}} + + +
    +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + + {{ activity_obj.activitySeason.season_name}} + +
    +
    + + + +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + +
    +
    Date
    +
    +
    Days
    +
    +
    Policy Type
    +
    +
    Cancellation Type
    +
    +
    Range
    +
    +
    + Value + +
    +
    {{data.get('_date').value| date: 'dd MMM YYYY'}}{{data.get('_date').value| date : 'EEEE'}} +
    + + +
    +
    +
    + + +
    +
    {{data.get('_from').value}} to {{data.get('_to').value}} + + + +
    +
    +
    + +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-cancelletion-policy/edit-cancelletion-policy.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-cancelletion-policy/edit-cancelletion-policy.component.ts new file mode 100644 index 0000000..b2e41b3 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-cancelletion-policy/edit-cancelletion-policy.component.ts @@ -0,0 +1,472 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { API } from 'src/app/core/services/api.service'; +import * as moment from 'moment'; +import { ValidationService } from 'src/app/core/common/validation.service'; +// import { CancellationDisplay, GetCancellationPolicy, UpdateCancellationPolicy } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-cancellation-policy/edit-cancellation-policy.model'; +import { MessageService } from 'primeng/api'; +import { CommonService } from 'src/app/core/services/common.service'; +import { CancellationDisplay, GetCancellationPolicy, UpdateCancellationPolicy } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-cancellation-policy/edit-cancellation-policy.model'; +interface grp { + name: string, + code: string +} +@Component({ + selector: 'app-edit-cancelletion-policy', + templateUrl: './edit-cancelletion-policy.component.html', +}) +export class EditCancelletionPolicyComponent implements OnInit { + Pickup: string[] = []; + date1!: Date; + date2!: Date; + CommonCalender!: string; + FromData: FormGroup + Data; + AllSlots; + activityContractId; + RateConfigdata; + season_list; + slot_wise_cancellation_policy; + lovKeyDataObj = { + RatePeriodType: [], + DaySelect: [], + ActivityNoShowPolicyType: [], + ActivityCancellationPolicyType: [], + ActivityCancellationChargeType: [], + }; + + constructor(private route: ActivatedRoute, + public ApiServ: API, public Fb: FormBuilder, + public validationService: ValidationService, + private MsgService: MessageService, + private router: Router,) { } + + ngOnInit(): void { + this.GetLOVKeys('RatePeriodType,DaySelect,ActivityNoShowPolicyType,ActivityCancellationPolicyType,ActivityCancellationChargeType'); + this.GetRateConfig(); + this.ngOninForm(); + this.GetAllActivitySeason(); + } + + + /** + * @author Abdul Razzak + * to create form group + */ + ngOninForm() { + this.FromData = this.Fb.group({ + activity_name: [''], + option_name: [''], + period_type: [''], + slot_id: [''], + dates: [''], + days: [''], + seasonId: [''], + _no_show_policy_type: this.validationService.required, + cancellationDisplays: this.Fb.array([ + ]) + }); + } + + /** + * @author Abdul Razzak + * to get activity contract data by contract id and set value + */ + GetRateConfig() { + this.route.queryParams.subscribe(obj => { + if (obj['id']) { + this.GetActivityById(); + this.activityContractId = obj['id']; + this.GetSlotsById(obj['id']); + this.ApiServ.Get('/ActivityContract/GetRateConfig/' + obj['id']).subscribe(d => { + if (d && d.status) { + this.RateConfigdata = d.responseObject; + this.slot_wise_cancellation_policy = d.responseObject.is_slot_wise_cancellation_policy; + this.FromData.get('option_name').setValue(d.responseObject.option_name); + this.FromData.get('_no_show_policy_type').setValue(parseInt(d.responseObject._no_show_policy_type)); + if (d.responseObject._no_show_policy_type != 1) { + this.No_Show_Type(d.responseObject._no_show_policy_type); + this.FromData.get('no_show_charge_value').setValue(d.responseObject.no_show_charge_value); + } + } + }) + } + }); + } + + /** + * @author Abdul Razzak + * to get slot data by contract id + * @param Id + */ + GetSlotsById(Id) { + this.ApiServ.Get('/ActivityContract/GetSlotsById/' + Id).subscribe(res => { + if (res) { + this.AllSlots = res.responseObject; + } + }) + } + /** + * @author Abdul Razzak + * to get form controls + */ + get cancelDisplay() { + return this.FromData.get('cancellationDisplays') as FormArray; + }; + + // AddFormDate() { + // this.cancelDisplay.push(this.Fb.group({ + // _charge_type: this.validationService.required, + // charge_value: [''], + // _from: [''], + // _to: [''], + // _date: [''], + // activity_cancellation_policy_id: [''], + // // _cancellation_policy_type: this.validationService.required, + // })) + // } + + // cancellationDisplays; + // SetValue(d) { + // let value = this.FromData.getRawValue(); + // this.cancellationDisplays = d.cancellationDisplays; + // this.setinputVal(d.cancellationDisplays); + // // Object.keys(value).forEach(e => { + // // if (e != 'cancellationDisplays') { + // // this.FromData.get(e).setValue(d[e]); + // // } + // // }); + + + // } + + + + // setinputVal(data) { + // for (let i = 0; i < data.length; i++) { + // console.log(i); + // this.AddFormDate() + // let formval = this.cancelDisplay.controls[i].value + // Object.keys(formval).forEach(a => { + // console.log(a) + // if (a == "_charge_type") { + // this.cancelDisplay.controls[i].get('_charge_type').setValue(parseInt(data[i][a])); + // } + // // else if (a == '_cancellation_policy_type') { + // // this.cancelDisplay.controls[i].get(a).setValue(parseInt(data[i][a])); + // // } + // else if (a == 'charge_value') { + // this.cancelDisplay.controls[i].get('charge_value').setValue(this.cancelDisplay.controls[i].get('_charge_type').value == '1' ? '' : data[i][a]); + // } + // else { + // this.cancelDisplay.controls[i].get(a).setValue(data[i][a]); + // } + // }); + // }; + // }; + + // LOVCancallationData; + // LOVCancallationPolicy; + // GetLOVMater() { + // let formdata = { + // "lov_types": [ + // { "lov_type": "NoShowType" }, + // { "lov_type": "CancellationPolicyType" } + // ], + // "lov_lang": "EN" + // } + + // this.ApiServ.Post("/LovMaster/GetLov", formdata).subscribe(data => { + // if (data) { + // this.LOVCancallationData = data.responseObject[0].keys; + // this.LOVCancallationPolicy = data.responseObject[1].keys; + // } + + + + /** + * @author Abdul Razzak + * to check cancellation type if full amount is selected then + * @param val + * @param ind + */ + InputClear(val, ind, group) { + if (val == '1') { + this.cancelDisplay.controls[ind].get('charge_value').setValue(''); + this.addvalidNum('charge_value', val, group); + } else this.addvalidNum('charge_value', val, group); + }; + + + addvalidNum(name, val, group) { + if (val == '1') { + group.controls[name].clearValidators(); + group.controls[name].updateValueAndValidity(); + group.controls[name].markAsUntouched(); + } else { + group.controls[name].addValidators([Validators.required, Validators.pattern(/^[0-9.]*$/)]); + group.controls[name].updateValueAndValidity(); + } + }; + + /** + * @author Abdul Razzak + * to empty value + * @param ind + */ + No_Show_Type(ind) { + if (ind != 1) { + this.FromData.addControl('no_show_charge_value', this.Fb.control('', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } else { + this.FromData.removeControl('no_show_charge_value'); + } + } + + /** + * @author Abdul Razzak + * to get data from LOV + * @param lov_key_names + */ + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + } + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.ApiServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + this.GetActivityById(); + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + } + + /** + * @author Abdul Razzak + * to get activity details + */ + GetActivityById() { + let activity_id = CommonService.getSessionStoage('activity_id'); + this.ApiServ.Get('/Activity/GetActivity/' + activity_id).subscribe(res => { + if (res) { + this.FromData.get('activity_name').setValue(res.responseObject.activityContents[0].activity_name); + } + }) + } + + /** + * @author Abdul Razzak + * to remove specific row of cancellation policy list + * @param ind + */ + remove(ind) { + this.cancelDisplay.removeAt(ind); + } + + CopyValue() { + let val = this.cancelDisplay.getRawValue(); + for (let i = 1; i < val.length; i++) { + this.cancelDisplay.controls[i].get('charge_value').setValue(this.cancelDisplay.controls[i].get('_charge_type').value != '1' ? val[0].charge_value : ''); + } + } + + CopyBlocksValue() { + let val = this.cancelDisplay.getRawValue(); + for (let i = 1; i < val.length; i++) { + this.cancelDisplay.controls[i].get('_cancellation_policy_type').setValue(val[0]._cancellation_policy_type); + this.cancelDisplay.controls[i].get('_charge_type').setValue(val[0]._charge_type); + this.cancelDisplay.controls[i].get('charge_value').setValue(this.cancelDisplay.controls[i].get('_charge_type').value != '1' ? val[0].charge_value : ''); + + } + } + + /** + * @author Abdul Razzak + * to get all activity season data + */ + GetAllActivitySeason() { + this.ApiServ.Get('/ActivitySeason/GetAllActivitySeason?activityId=' + CommonService.getSessionStoage('activity_id')).subscribe(d => { + if (d && d.status) { + this.season_list = d.responseObject; + } + }); + } + + /** + * @author Abdul Razzak + * to get all cancellation details + */ + SearchCancellationPolicy() { + let val = this.FromData.getRawValue(); + let postdata = new GetCancellationPolicy(); + postdata.from_date = val.dates[0] ? moment(val.dates[0]).format('YYYY-MM-DD') : ''; + postdata.to_date = val.dates[1] ? moment(val.dates[1]).format('YYYY-MM-DD') : ''; + postdata.slot_id = val.slot_id ? val.slot_id : ''; + postdata.seasonId = val.seasonId ? val.seasonId : []; + postdata.days = val.days ? val.days.join(',') : ''; + postdata.contract_id = this.activityContractId; + this.ApiServ.Post('/ActivityContract/GetCancellationPolicy', postdata).subscribe(res => { + if (res) { + this.SetPolicyValue(res.responseObject) + } + }) + } + /** + * @author Abdul Razzak + * method to create form group controler and set value + * @param data + */ + SetPolicyValue(data) { + this.cancelDisplay.clear() + data.forEach(d => { + this.cancelDisplay.push(this.Fb.group({ + _charge_type: [parseInt(d._charge_type), [Validators.required]], + charge_value: parseInt(d._charge_type) == 1 ? [''] : [d.charge_value, [Validators.required, Validators.pattern(/^[0-9.]*$/)]], + _from: [d._from], + _to: [d._to], + _date: [d._date], + activity_cancellation_policy_id: [d.activity_cancellation_policy_id], + _cancellation_policy_type: [parseInt(d._cancellation_policy_type), [Validators.required]] + })) + }) + } + + /** + * @author Abdul Razzak + * method to update cancellation details + */ + UpdateCancellationDetails() { + let postArrayData = []; + if (this.FromData.status == 'INVALID') { + this.validationService.showValidationsMsg(this.FromData); + const firstElementWithError = document.querySelector('.ng-invalid'); + if (firstElementWithError) { + firstElementWithError.scrollIntoView({ behavior: 'auto' }); + } + return; + }; + let val = this.FromData.getRawValue() + let ValArr = this.cancelDisplay.getRawValue(); + ValArr.map(e => { + let PostArray = new CancellationDisplay(); + PostArray._cancellation_policy_type = e._cancellation_policy_type.toString(); + PostArray._charge_type = JSON.stringify(e._charge_type); + PostArray.charge_value = e.charge_value ? e.charge_value : 0; + PostArray.activity_cancellation_policy_id = e.activity_cancellation_policy_id; + PostArray.date = e.date; + PostArray.from = e.from; + PostArray.to = e.to; + postArrayData.push(PostArray); + }) + let PostData = new UpdateCancellationPolicy(); + PostData.activity_contract_id = this.activityContractId; + PostData._no_show_policy_type = val._no_show_policy_type.toString(); + PostData.no_show_value = val.no_show_charge_value ? val.no_show_charge_value : 0; + PostData.cancellation_policy = postArrayData; + this.ApiServ.Post('/ActivityContract/UpdateActivityCancellation', PostData).subscribe(data => { + if (data) { + this.showToastrMsg(data) + } + }); + }; + /** + * @author Abdul Razzak + * to show toastr + * @param respData + */ + showToastrMsg(respData) { + this.MsgService.add({ + severity: respData['status'] ? 'success' : 'error', + detail: respData['message'], + }); + setTimeout(() => { + respData['status'] ? this.btnClick() : ''; + }, 500); + } + + /** + * @author Abdul razzak + * to navigate overview tab + */ + btnClick() { + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage']) + } + + + + /** + * @author Abdul Razzak + * to clear hide field value + */ + ClearSearchField() { + let val = this.FromData.getRawValue() + if (val.period_type == 2) this.FromData.get('dates').setValue(''); + else if (val.period_type == 1) this.FromData.get('seasonId').setValue([]); + } + + + + AllMonths = [] + Checkdate() { + let date = this.FromData.get('dates').value + console.log(date) + if (date.length > 1) { + // var result = eachMonthOfInterval({ + // start: new Date(date[0]), + // end: new Date(date[1]) + // }); + // console.log(result); + let allname = [] + // this.AllMonths = result.map(e => allname.push(moment(e).format("MMM"))) + this.AllMonths = [...new Set(allname)]; + } + } + + checkMonthOfSeason() { + this.season_list + console.log(this.season_list) + let alldate = []; + let val = this.FromData.get('seasonId').value; + val.forEach(ID => { + this.season_list.forEach(q => { + if (q.activitySeason.activity_season_id == ID) { + q.seasondateRange.forEach(t => { + // var result = eachMonthOfInterval({ + // start: new Date(t.fromDate), + // end: new Date(t.toDate) + // }); + // let list = result.map(r => moment(r).format("MMM")); + // alldate.push(...list); + }); + }; + }); + }); + let AllDateName = [...new Set(alldate)]; + this.AllMonths = AllDateName; + } + + MonthCheck(data) { + console.log(data) + } + + /** + * @author Abdul Razzak + * to reset search value + */ + reset() { + this.FromData.get('seasonId').setValue([]); + this.FromData.get('dates').setValue(''); + this.FromData.get('period_type').setValue(''); + this.FromData.get('slot_id').setValue(''); + this.FromData.get('days').setValue(''); + } + + +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-details/edit-details.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-details/edit-details.component.html new file mode 100644 index 0000000..a1b6c6c --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-details/edit-details.component.html @@ -0,0 +1,183 @@ +
    + + Back +
    +
    Edit Details
    +
    +
    +
    + + + Please enter option name +
    +
    + + +
    +
    + + + +
    + +
    Currency
    +
    + +
    +
    + Please select currency +
    +
    +
    Applicable Nationality
    +
    + +
    +
    + All Nationality +
    +
    + Specify Nationality +
    +
    +
    + + + +
    + +
    Nationality
    +
    + +
    +
    + Please select Nationality + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + Is Exclude Nationality + +
    +
    +
    + + + +
    + +
    Nationality
    +
    + +
    +
    + Please select currency +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + Tourist Guide Included +
    +
    + + + + Please select tourist guide languages +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-details/edit-details.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-details/edit-details.component.ts new file mode 100644 index 0000000..28f0df7 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-details/edit-details.component.ts @@ -0,0 +1,479 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { ActivatedRoute } from '@angular/router'; +import * as moment from 'moment'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { EditActivityContractDetail } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-details/edit-deatils.model'; +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; + +@Component({ + selector: 'app-edit-details', + templateUrl: './edit-details.component.html', +}) +export class EditDetailsComponent implements OnInit { + constructor( + private route: ActivatedRoute, + public Fb: FormBuilder, + public APIServ: API, + public validationService: ValidationService + ) {} + Pickup: string[] = []; + CommonCalender: string[] = []; + // + FormData: FormGroup; + currencyList; + activityContractId; + PhoneCode; + include_nationality_list; + exclude_nationality_list; + fil_exclude_nationality_list; + PaxDetails; + vahicleDetails; + LangList = []; + DaySelect = []; + AllSlotData; + SoltDate; + @ViewChild('Vehicle_Rate_copy') Vehicle_Rate_copy: ElementRef; + @ViewChild('myCalendar') datePicker; + ngOnInit(): void { + this.FormData = this.Fb.group({ + option_name: this.validationService.required, + emergency_phone_code: this.validationService.required, + emergency_phone: this.validationService.mobNo, + currency_code: this.validationService.required, + is_exclude_nationality: [false], + include_nationality_code: [''], + exclude_nationality_code: [''], + contract_remark: [''], + rate_inclusion: [''], + _nationality_type: [''], + Solt_data: [''], + Search_date: [''], + Days: [''], + is_pickup_included: [false], + is_drop_off_included: [false], + is_guide_included: [false], + guide_languages: [''], + + PaxDetails: this.Fb.array([ + this.Fb.group({ + adult_rate: [''], + child_rate: [''], + infant_rate: [''], + senior_rate: [''], + youth_rate: [''], + }), + ]), + vahicle_list: this.Fb.array([]), + }); + this.GetLOVMater(); + this.GetAllCurrency(); + this.GetAllNationality(); + this.getRateConfig(); + this.GetPhoneCode(); + // hard code + // this.getVehicleRateDetails() + // this.getPerPaxDetails() + this.getPaxType(); + } + + // form get + get paxform() { + return this.FormData.get('PaxDetails') as FormArray; + } + get Vahicleform() { + return this.FormData.get('vahicle_list') as FormArray; + } + Months = [ + { id: 1, name: 'Jan' }, + { id: 2, name: 'Feb' }, + { id: 3, name: 'Mar' }, + { id: 4, name: 'Apr' }, + { id: 5, name: 'Jun' }, + { id: 6, name: 'Jun' }, + { id: 7, name: 'Jul' }, + { id: 8, name: 'Aug' }, + { id: 9, name: 'Sep' }, + { id: 10, name: 'Oct' }, + { id: 11, name: 'Nov' }, + { id: 12, name: 'Dec' }, + ]; + MonthsList = this.Months[0].name; + + getRateConfig() { + this.route.queryParams.subscribe((obj) => { + if (obj['id']) { + this.activityContractId = obj['id']; + this.GetSlotData(); + this.APIServ.Get( + '/ActivityContract/GetRateConfig/' + obj['id'] + ).subscribe((data) => { + if (data) { + // this.activityContract = data.responseObject; + console.log(data); + console.log(data.result.responseObject); + this.SetValueConfi(data.result.responseObject); + } + }); + } + }); + } + + SetValueConfi(d) { + let value = this.FormData.getRawValue(); + Object.keys(value).map((e) => { + if (e == 'guide_languages') { + let value = d[e] ? d[e].split(',') : null; + let Arr = []; + value.map((e) => Arr.push(parseInt(e))); + setTimeout(() => { + this.FormData.get(e).setValue(Arr); + }, 100); + } else if (e == 'is_guide_included') { + this.FormData.get(e).setValue(d[e]); + d[e] ? this.is_guideLang('guide_languages') : ''; + } else if ( + e == 'include_nationality_code' || + e == 'exclude_nationality_code' + ) { + let value = d[e] ? d[e].split(',') : null; + this.FormData.get(e).setValue(value); + } else if (e == '_nationality_type') { + this.FormData.get(e).setValue(d[e]); + d[e] == 'specific_nationality' + ? this.is_Nationality('specific_nationality') + : ''; + } else if (e == 'is_exclude_nationality') { + this.FormData.get(e).setValue(d[e]); + d[e] ? this.is_exclude(true) : ''; + } else if ( + e == 'PaxDetails' || + e == 'vahicle_list' || + e == 'Solt_data' || + e == 'Search_date' || + e == 'Days' + ) { + console.log('nice razzak '); + } else this.FormData.get(e).setValue(d[e]); + }); + } + + GetAllCurrency() { + this.APIServ.Get('/Currency/GetCurrency').subscribe((d) => { + if (d) this.currencyList = d; + }); + } + + GetAllNationality() { + this.APIServ.Get('/Country/GetCountry').subscribe((d) => { + this.include_nationality_list = d; + this.exclude_nationality_list = d; + this.fil_exclude_nationality_list = d; + }); + } + + GetLOVMater() { + let formdata = { + lov_types: [{ lov_type: 'Language' }, { lov_type: 'DaySelect' }], + lov_lang: 'EN', + }; + + this.APIServ.Post('/LovMaster/GetLov', formdata).subscribe((data) => { + if (data) { + this.LangList = data.responseObject[0].keys; + this.DaySelect = data.responseObject[1].keys; + } + }); + } + + GetSlotData() { + // this.APIServ.Get('/ActivityContract/GetSlotsById/' + this.activityContractId).subscribe(data => { + // if (data) { + // this.AllSlotData = data.responseObject; + // console.log(data) + // } + // }); + + this.APIServ.Get( + '/ActivityContract/GetSlotsById/' + '2207140719598616047' + ).subscribe((data) => { + if (data) { + this.AllSlotData = data.responseObject; + } + }); + } + + GetSoltDetails(val) { + // this.SoltDate = val.date.split(",") + this.getPerPaxDetails(); + } + + getPerPaxDetails() { + let val = this.FormData.getRawValue(); + let obj = { + contract_id: this.activityContractId, + slot_id: val.Solt_data.activity_slot_id, + dates: val.Search_date + ? moment(val.Search_date[0]).format('dd MMM YYYY') + + 'to' + + moment(val.Search_date[1]).format('dd MMM YYYY ') + : val.Solt_data.date, + days: val.Days ? val.Days.join(',') : '7', + }; + + // hard code + let new_obj = { + contract_id: '2206290724107915812', + slot_id: '2206290724110863052', + dates: '2022-05-30,2022-05-31', + days: '1,2', + }; + + this.APIServ.Post('/ActivityContract/GetRatePerPax', new_obj).subscribe( + (data) => { + if (data) { + console.log(data); + if (data.result.responseObject) { + this.PaxDetails = data.result.responseObject; + this.setpaxValue(data.result.responseObject); + } + } + } + ); + + /// GetVehicleRate + + // hard code + + // let vahicle_obj = { + // "contract_id": "2206290730562842277", + // "slot_id": "2206290730584999007", + // "dates": "2022-06-01,2022-06-02", + // "days": "0,1,2,3,4,5" + // } + + this.APIServ.Post('/ActivityContract/GetVehicleRate', obj).subscribe( + (data) => { + if (data) { + console.log(data); + if (data.result.responseObject) { + this.vahicleDetails = data.result.responseObject; + this.setvahicleValue(data.result.responseObject); + } + } + } + ); + } + + // getVehicleRateDetails() { + // let new_obj = { + // "contract_id": "2206290730562842277", + // "slot_id": "2206290730584999007", + // "dates": "2022-06-01,2022-06-02", + // "days": "0,1,2,3,4,5" + // } + // let val = this.FormData.getRawValue(); + // let obj = { + // "contract_id": this.activityContractId, + // "slot_id": val.Solt_data.activity_slot_id, + // "dates": val.Search_date ? val.Search_date.join(',') : val.Solt_data.date, + // "days": val.Days ? val.Days.join(',') : '7' + // } + // console.log(obj) + // // this.APIServ.Post('/ActivityContract/GetVehicleRate', new_obj).subscribe(data => { + // // if (data) { + // // console.log(data) + // // this.vahicleDetails = data.result.responseObject; + // // this.setvahicleValue(data.result.responseObject); + // // } + // // }); + // }; + + setpaxValue(data) { + for (let i = 0; i < data.length; i++) { + this.AddPaxGroup(); + Object.keys(data[i]).map((e) => { + this.paxform.controls[i + 1].get(e).setValue(data[i][e]); + }); + } + } + + setvahicleValue(data) { + for (let i = 0; i < data.length; i++) { + this.addvahicleGroup(); + Object.keys(data[i]).map((e) => { + this.Vahicleform.controls[i].get(e).setValue(data[i][e]); + }); + } + } + + AddPaxGroup() { + this.paxform.push( + this.Fb.group({ + date: [''], + adult_rate: [''], + child_rate: [''], + infant_rate: [''], + senior_rate: [''], + youth_rate: [''], + }) + ); + } + + addvahicleGroup() { + this.Vahicleform.push( + this.Fb.group({ + date: [''], + rate: [''], + }) + ); + } + + getPaxType() { + this.APIServ.Get( + '/Activity/GetActivity/' + CommonService.getSessionStoage('activity_id') + ).subscribe((data) => { + if (data) { + // this.AllSetvalue(data['responseObject']); + console.log(data); + } + }); + } + + // vehicle selection + + Vehicle_Selection = [ + { id: 1, name: 'Mercedes S Class' }, + { id: 2, name: 'Coach 20 Seater' }, + { id: 3, name: 'Helicopter' }, + ]; + + GetPhoneCode() { + this.APIServ.Get('/CountryPhone/GetCountryPhone').subscribe((data) => { + if (data) { + this.PhoneCode = data; + } + }); + } + + UpdateRateConfi() { + let value = this.FormData.getRawValue(); + console.log(this.FormData); + console.log(value); + let PostData = new EditActivityContractDetail(); + PostData.contract_id = this.activityContractId; + PostData.option_name = value.option_name; + PostData.currency_code = value.currency_code; + PostData.include_nationality_code = value.include_nationality_code + ? value.include_nationality_code.join(',') + : ''; + PostData.exclude_nationality_code = value.exclude_nationality_code + ? value.exclude_nationality_code.join(',') + : ''; + PostData._nationality_type = value._nationality_type; + PostData.is_exclude_nationality = value.is_exclude_nationality; + PostData.rate_inclusion = value.rate_inclusion; + PostData.contract_remark = value.contract_remark; + PostData.is_pickup_included = value.is_pickup_included; + PostData.is_drop_off_included = value.is_drop_off_included; + PostData.is_guide_included = value.is_guide_included; + PostData.guide_languages = value.guide_languages + ? value.guide_languages.join(',') + : ''; + } + + addvalid(name, type, num) { + if (type == 'add') { + if (num == 'number') { + this.FormData.controls[name].addValidators([ + Validators.pattern(/^[0-9]*$/), + ]); + this.FormData.controls[name].updateValueAndValidity(); + } else { + this.FormData.controls[name].addValidators([Validators.required]); + this.FormData.controls[name].updateValueAndValidity(); + } + } else { + this.FormData.controls[name].clearValidators(); + this.FormData.controls[name].updateValueAndValidity(); + this.FormData.controls[name].markAsUntouched(); + } + } + is_exclude(check) { + check + ? this.addvalid('exclude_nationality_code', 'add', 'required') + : this.addvalid('exclude_nationality_code', 'remove', ''); + } + + is_Nationality(val) { + val == 'specific_nationality' + ? this.addvalid('include_nationality_code', 'add', 'required') + : this.addvalid('include_nationality_code', 'remove', 'required'); + } + + is_guideLang(check) { + check + ? this.addvalid('guide_languages', 'add', 'required') + : this.addvalid('guide_languages', 'remove', ''); + } + + SetVahicleValCopyUi() { + let value = this.Vehicle_Rate_copy.nativeElement.value; + if (value != '') { + let obj = this.Vahicleform.getRawValue(); + obj.map((e) => { + Object.keys(e).forEach((ol, i) => { + this.Vahicleform.controls[i].get('rate').setValue(value); + }); + }); + } + } + + checkcleander() { + let value = this.FormData.getRawValue(); + if (value.Search_date[0] && value.Search_date[1]) { + this.datePicker.overlayVisible = false; + this.getPerPaxDetails(); + } + } + + setpaxValueFromUi() { + let val = this.paxform.getRawValue(); + if (val[0].adult_rate != '') { + this.setValueFormUi('adult_rate'); + } + if (val[0].senior_rate != '') { + this.setValueFormUi('senior_rate'); + } + if (val[0].youth_rate != '') { + this.setValueFormUi('youth_rate'); + } + if (val[0].child_rate != '') { + this.setValueFormUi('child_rate'); + } + if (val[0].infant_rate != '') { + this.setValueFormUi('infant_rate'); + } + } + + setValueFormUi(name) { + let obj = this.paxform.getRawValue(); + for (let i = 1; i < obj.length; i++) { + Object.keys(obj[i]).map((e) => { + if (e == name) { + this.paxform.controls[i].get(e).setValue(obj[0][name]); + } + }); + } + } + + Pax_Type = [ + { id: 0, name: 'Adult' }, + { id: 1, name: 'Senior' }, + { id: 2, name: 'Youth' }, + { id: 3, name: 'Child' }, + { id: 4, name: 'Infant' }, + ]; +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-modify-rate/edit-modify-rate.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-modify-rate/edit-modify-rate.component.html new file mode 100644 index 0000000..2a17dd7 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-modify-rate/edit-modify-rate.component.html @@ -0,0 +1,398 @@ +
    + + Back +
    +
    +
    Edit Rate Config
    +
    +
    +
    + + +
    +
    + + +
    +
    + + + +
    +
    + +
    +
    + +
    +
    +
    + + + + Please select + supplier + +
    +
    + + + + + Please select + vehicle selection +
    +
    + + + Please select + private transfer occupancy +
    +
    + + + Please select + supplier + Accept number only +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + + + + Please select + supplier +
    +
    +
    + + +
    +
    + + + Please enter + adult + accept number only + +
    +
    + + + Please enter + senior + accept number only + +
    +
    + + + Please enter + youth + accept number only + +
    +
    + + + Please enter + child + accept number only + +
    +
    +
    +
    +
    +
    +
    + + + {{ item.start_time | date: "h:mm" }} to {{ item.end_time | date: "h:mm" }} + +
    +
    + + + +
    +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + + {{ activity_obj.activitySeason.season_name}} + +
    +
    + + + +
    +
    + + +
    +
    +
    + +
    + + +
    +
    Per Person Pricing
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
    +
    Date
    +
    +
    Days
    +
    +
    + Adult Rate + +
    +
    +
    + Senior Rate + +
    +
    +
    + Youth Rate + +
    +
    +
    + Child Rate + +
    +
    {{ item.date | date: "dd MMM YYYY" }}{{ item.date | date: "EEEE" }} + + + + + + + +
    +
    + +
    +
    +
    + + +
    +
    Per Vehicle Pricing
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    Date
    +
    +
    Days
    +
    +
    + +
    +
    {{ item.date | date: "dd MMM YYYY" }}{{ item.date | date: "EEEE" }} +
    + +
    +
    +
    + +
    +
    +
    + + + +
    Tiered Pricing
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
    +
    Date
    +
    +
    Days
    +
    +
    + Adult + ({{controls.from_adult_count}} to + {{controls.to_adult_count}}) + + +
    +
    +
    + Senior + ({{controls.from_senior_count}} to + {{controls.to_senior_count}}) + + +
    +
    +
    + Youth + ({{controls.from_youth_count}} to + {{controls.to_youth_count}}) + + +
    +
    +
    + Child + ({{controls.from_child_count}} to + {{controls.to_child_count}}) + + +
    +
    {{ group.date | date: "dd MMM YYYY" }}{{ group.date | date: "EEEE" }} + + + + + + + +
    +
    + +
    +
    +
    + +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-modify-rate/edit-modify-rate.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-modify-rate/edit-modify-rate.component.ts new file mode 100644 index 0000000..5531f27 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/edit-modify-rate/edit-modify-rate.component.ts @@ -0,0 +1,861 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { EditActivityContractRate, GetRateDetails, PaxPricing, PaxRates, TieredPricingList, VehicleRates } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-rate-confi/edit-rate-confi.model'; +import { ActivityPrivateTransfer, ActivitySharedTransfer } from 'src/app/core/models/Experience-Service/experience-rate-config/experience-rate-config.model'; +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; + +@Component({ + selector: 'app-edit-modify-rate', + templateUrl: './edit-modify-rate.component.html', +}) +export class EditModifyRateComponent implements OnInit { + constructor( + private route: ActivatedRoute, + public Fb: FormBuilder, + public ApiServ: API, + public validationService: ValidationService, + public MsgService: MessageService, + private router: Router, + ) { } + Pickup: string[] = []; + CommonCalender: string[] = []; + // + FormData: FormGroup; + currencyList; + activityContractId; + PaxDetails; + vahicleDetails; + activityData; + AllSlots; + AllVehicleBySupplierId = { + Shared: [], + Slots: [] + };; + lovKeyDataObj = { + RatePeriodType: [], + DaySelect: [], + RateConfigType: [], + ActivityNoShowPolicyType: [], + ActivityCancellationPolicyType: [], + ActivityCancellationChargeType: [], + }; + season_list; + AllVehicleSupplier; + AllContractTieredRate; + HeaderTieredRateGroup = { + adult_range: [], + youth_range: [], + senior_range: [], + child_range: [], + } + TieredRatedynamicgroup: FormGroup; + + + ngOnInit(): void { + this.ngOninitform(); + this.GetAllCurrency(); + this.GetAllVehicleSupplier(); + this.GetLOVKeys('RatePeriodType,DaySelect,ActivityNoShowPolicyType,RateConfigType,ActivityCancellationPolicyType,ActivityCancellationChargeType'); + this.GetAllActivitySeason(); + } + + /** + * @author Abdul Razzak + * to create a form group + */ + ngOninitform() { + this.FormData = this.Fb.group({ + activity_name: [''], + option_name: [''], + currency_code: [''], + searchgroup: this.Fb.group({ + slot_id: [''], + _rate_type: [''], + period_type: [''], + dates: [''], + seasonId: [[]], + days: [''], + }) + }); + } + + /** + * @author Abdul Razzak + * to get form controller + */ + + get privateTransfer() { + return this.FormData.get('privateTransfer') as FormArray; + } + + get sharedTransfer() { + return this.FormData.get('sharedTransfer') as FormGroup; + } + + get paxformGroup() { + return this.FormData.get('PaxDetails') as FormArray; + } + get tieredPricingsGroup() { + return this.FormData.get('tieredPricings') as FormArray; + } + + get VahicleformGroup() { + return this.FormData.get('vahicle_list') as FormArray; + } + + + /** + * @author Abdul Razzak + * to get activity details + */ + GetActivityById() { + let activity_id = CommonService.getSessionStoage('activity_id'); + this.ApiServ.Get('/Activity/GetActivity/' + activity_id).subscribe(res => { + if (res) { + this.activityData = res.responseObject; + this.FormData.get('activity_name').setValue(res.responseObject.activityContents[0].activity_name); + this.getRateConfig(); + } + }) + } + + /** + * @author Abdul razzak + * to get contract details + */ + getRateConfig() { + this.route.queryParams.subscribe((obj) => { + if (obj['id']) { + this.activityContractId = obj['id']; + this.GetSlotsById(obj['id']) + this.ApiServ.Get('/ActivityContract/GetRateConfig/' + obj['id']).subscribe((res) => { + if (res) { + this.FormData.get('option_name').setValue(res.responseObject.option_name); + this.FormData.get('currency_code').setValue(res.responseObject.currency_code); + let val = parseInt(res.responseObject._rate_type) + this.FormData.get('searchgroup').get('_rate_type').setValue(val); + if (val == 2) { + this.FormData.addControl('PaxDetails', this.Fb.array([ + this.Fb.group({ + activity_rate_per_pax_id: [''], + date: [''], + }) + ])) + this.AddPaxController(this.paxformGroup.controls[0], false); + } else if (val == 3) { + this.FormData.addControl('vahicle_list', this.Fb.array([ + this.Fb.group({ + date: [''], + vehicle_rates: this.Fb.array([ + this.Fb.group({ + activity_rate_per_vehicle_id: [''], + rate: [''], + vehicle_id: [''], + vehicle_name: [''], + }) + ]) + }) + ])) + } else if (val == 1) { + this.ApiServ.Get('/ActivityContract/GetTieredRateTableView/' + this.activityContractId).subscribe(res => { + if (res) { + this.FormData.addControl('tieredPricings', this.Fb.array([ + ])) + res.responseObject.forEach((e, i) => { + this.tieredPricingsGroup.push(this.Fb.group({ + date: [''], + activity_rate_tiered_id: [''], + })) + let controls = this.tieredPricingsGroup.controls[0] as FormGroup + if (e.adult_range) { + let adult_range = JSON.parse(e.adult_range); + this.HeaderTieredRateGroup.adult_range = adult_range; + adult_range.forEach((r, i) => { + controls.addControl('adult_rate_range_' + (i + 1), this.Fb.control('')); + }) + } + if (e.youth_range) { + let youth_range = JSON.parse(e.youth_range); + this.HeaderTieredRateGroup.youth_range = youth_range; + youth_range.forEach((r, i) => { + controls.addControl('youth_rate_range_' + (i + 1), this.Fb.control('')); + }) + } + if (e.senior_range) { + let senior_range = JSON.parse(e.senior_range); + this.HeaderTieredRateGroup.senior_range = senior_range; + senior_range.forEach((r, i) => { + controls.addControl('senior_rate_range_' + (i + 1), this.Fb.control('')); + }) + } + if (e.child_range) { + let child_range = JSON.parse(e.child_range); + this.HeaderTieredRateGroup.child_range = child_range; + child_range.forEach((r, i) => { + controls.addControl('child_rate_range_' + (i + 1), this.Fb.control('')); + }) + } + }) + } + }); + } + if (res.responseObject.is_shared_transfer) this.AddSharedTransferControls(true, res.responseObject.shared_transfer); + if (res.responseObject.is_private_transfer) this.AddPrivateTransferControls(true, res.responseObject.private_transfer); + } + }); + } + }); + } + + + /** + * @author Abdul Razzak + * to get slot data by contract id + * @param Id + */ + GetSlotsById(Id) { + this.ApiServ.Get('/ActivityContract/GetSlotsById/' + Id).subscribe(res => { + if (res) { + this.AllSlots = res.responseObject; + } + }) + } + + /** + * @author Abdul Razzak + * to create Tiered Pricings FormGroup + * @param ind + */ + createTieredGroup(ind) { + this.tieredPricingsGroup.push(this.Fb.group({ + date: [''], + activity_rate_tiered_id: [''], + })) + let controls = this.tieredPricingsGroup.controls[ind] as FormGroup + if (this.HeaderTieredRateGroup.adult_range) { + this.HeaderTieredRateGroup.adult_range.forEach((r, i) => { + controls.addControl('adult_rate_range_' + (i + 1), this.Fb.control('')); + }) + } + if (this.HeaderTieredRateGroup.youth_range) { + this.HeaderTieredRateGroup.youth_range.forEach((r, i) => { + controls.addControl('youth_rate_range_' + (i + 1), this.Fb.control('')); + }) + } + if (this.HeaderTieredRateGroup.senior_range) { + this.HeaderTieredRateGroup.senior_range.forEach((r, i) => { + controls.addControl('senior_rate_range_' + (i + 1), this.Fb.control('')); + }) + } + if (this.HeaderTieredRateGroup.child_range) { + this.HeaderTieredRateGroup.child_range.forEach((r, i) => { + controls.addControl('child_rate_range_' + (i + 1), this.Fb.control('')); + }) + } + } + + + + /** + * @author Abdul Razzak + * To Get All Activity Season + */ + GetAllActivitySeason() { + this.ApiServ.Get('/ActivitySeason/GetAllActivitySeason?activityId=' + CommonService.getSessionStoage('activity_id')).subscribe(d => { + if (d && d.status) { + this.season_list = d.responseObject; + } + }); + } + + + /** + * @author Abdul Razzak + * To Get All Vehicle Supplier + */ + GetAllVehicleSupplier() { + this.ApiServ.Get('/Vehicle/GetAllVehicleSupplier').subscribe((res) => { + if (res) { + this.AllVehicleSupplier = res.responseObject; + } + }); + } + + /** + * @author Abdul Razzak + * To get all curency + */ + GetAllCurrency() { + this.ApiServ.Get('/Currency/GetCurrency').subscribe((d) => { + if (d) this.currencyList = d; + }); + } + + + /** + * @author Abdul Razzak + * TO get Get All Vehicle details by supplier Id + * @param Id + * @param name + * @param i + */ + GetAllVehicleBySupplierId(Id, name, i) { + this.ApiServ.Get('/Vehicle/GetAllVehicleBySupplier/' + Id).subscribe((res) => { + if (res) { + this.AllVehicleBySupplierId[name][i] = [] + this.AllVehicleBySupplierId[name][i] = res.responseObject; + } + }); + } + + + /** + * @author Abdul Razzak + * to get data from LOV + * @param lov_key_names + */ + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + } + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.ApiServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + this.GetActivityById(); + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + } + + + /** + * @author Abdul Razzak + * to get Per Pax Details , Vehicle Rate and Tiered Rate + */ + Search() { + let val = this.FormData.get('searchgroup').get('_rate_type').value; + let searchform = this.FormData.get('searchgroup').value; + let postdata = new GetRateDetails(); + postdata.contract_id = this.activityContractId; + postdata.slot_id = searchform.slot_id; + postdata.from_date = searchform.dates[0] ? moment(searchform.dates[0]).format('YYYY-MM-DD') : ''; + postdata.to_date = searchform.dates[1] ? moment(searchform.dates[1]).format('YYYY-MM-DD') : ''; + postdata.seasonId = searchform.seasonId; + postdata.days = searchform.days ? searchform.days.join(',') : ''; + if (val == 2) { + this.getPerPaxDetails(postdata); + } else if (val == 3) { + this.GetVehicleRate(postdata); + } else if (val == 1) { + this.GetActivityTieredRate(postdata); + } + } + + // private Transfer -------------------------------------------------------------------- + + /** + * @author Abdul Razzak + * to create private Transfer form array + * @param check + * @param Data + */ + AddPrivateTransferControls(check, Data) { + if (check) { + this.FormData.addControl('privateTransfer', this.Fb.array([ + ])) + let Obj = JSON.parse(Data) + Obj.forEach((e, i) => { + this.AddPrivateTransferGroup(e, i); + }); + } + } + + /** + * @author Abdul Razzak + * to create pax controls on form group + * @param Data + * @param ind + */ + AddPrivateTransferGroup(Data, ind) { + Data ? this.GetAllVehicleBySupplierId(Data.vehicle_supplier_id, 'Shared', ind) : '' + this.privateTransfer.push(this.Fb.group({ + // activity_pvt_transfer_add_on_id: [Data.activity_pvt_transfer_add_on_id], + vehicle_supplier_id: [Data ? Data.vehicle_supplier_id : '', Validators.required], + vehicle_id: [Data ? Data.vehicle_id : '', Validators.required], + vehicle_occupancy: [Data ? Data.vehicle_occupancy : '', Validators.required], + rate: [Data ? Data.rate : '', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)]], + })) + } + + /** + * @author Abdul Razzak + * to remove form group on privete transfer + * @param ind + */ + RemovePrivateformGroup(ind) { + this.privateTransfer.removeAt(ind); + } + + /** + * @author Abdul Razzak + * to clear formcontrols value when period type change + */ + ClearDateAndSeason() { + let val = this.FormData.get('searchgroup').get('period_type').value; + if (val == 2) this.FormData.get('searchgroup').get('dates').setValue(''); + else if (val == 1) this.FormData.get('searchgroup').get('seasonId').setValue([]); + } + + // shared transfer -------------------------------------------------------------------- + + /** + * @author Abdul Razzak + * to add contols on shared transfer + * @param check + */ + AddSharedTransferControls(check, data) { + if (check) { + this.FormData.addControl('sharedTransfer', this.Fb.group({})) + let obj = JSON.parse(data) + this.sharedTransfer.addControl('vehicle_supplier_id', this.Fb.control(obj[0].vehicle_supplier_id, [Validators.required])); + this.sharedTransfer.addControl('activity_shared_transfer_add_on_id', this.Fb.control(obj[0].activity_shared_transfer_add_on_id, [Validators.required])); + if (this.activityData.is_adult) this.sharedTransfer.addControl('adult_rate', this.Fb.control(obj[0].adult_rate, [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.activityData.is_senior) this.sharedTransfer.addControl('senior_rate', this.Fb.control(obj[0].senior_rate, [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.activityData.is_youth) this.sharedTransfer.addControl('youth_rate', this.Fb.control(obj[0].youth_rate, [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.activityData.is_child) this.sharedTransfer.addControl('child_rate', this.Fb.control(obj[0].child_rate, [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } + // else { + // this.sharedTransfer.removeControl('vehicle_supplier_id'); + // this.sharedTransfer.removeControl('activity_shared_transfer_add_on_id'); + // if (this.activityData.is_adult) this.sharedTransfer.removeControl('adult_rate'); + // if (this.activityData.is_senior) this.sharedTransfer.removeControl('senior_rate'); + // if (this.activityData.is_youth) this.sharedTransfer.removeControl('youth_rate'); + // if (this.activityData.is_child) this.sharedTransfer.removeControl('child_rate'); + // } + } + + // per pax details -------------------------------------------------------------------- + + /** + * @author Abdul Razzak + * to get contract pax details + * @param postdata + */ + getPerPaxDetails(postdata) { + this.ApiServ.Post('/ActivityContract/GetRatePerPax', postdata).subscribe((data) => { + if (data) { + this.PaxDetails = data.responseObject; + data.responseObject ? this.setpaxValue(data.responseObject) : ''; + } + }); + } + + /** + * @author Abdul Razzak + * to create form group and set value + * @param data + */ + setpaxValue(data) { + this.paxformGroup.clear(); + this.paxformGroup.push(this.Fb.group({ + activity_rate_per_pax_id: [''], + date: [''], + })) + this.AddPaxController(this.paxformGroup.controls[0], false); + data.forEach((e, i) => { + this.paxformGroup.push( + this.Fb.group({ + activity_rate_per_pax_id: [e['activity_rate_per_pax_id']], + date: [e['date']], + }) + ); + this.AddPaxController(this.paxformGroup.controls[i + 1], data[i]); + }); + } + + /** + * @author Abdul Razzak + * to create pax control + * @param group + * @param value + */ + AddPaxController(group, value) { + if (this.activityData.is_adult) group.addControl('adult_rate', this.Fb.control(value ? value.adult_rate : '', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.activityData.is_senior) group.addControl('senior_rate', this.Fb.control(value ? value.senior_rate : '', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.activityData.is_youth) group.addControl('youth_rate', this.Fb.control(value ? value.youth_rate : '', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + if (this.activityData.is_child) group.addControl('child_rate', this.Fb.control(value ? value.child_rate : '', [Validators.required, Validators.pattern(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/)])); + } + + /** + * @author Abdul Razzak + * to set all pax rate value form copy on UI button + */ + setallpaxdetails() { + let val = this.paxformGroup.getRawValue(); + if (val[0].adult_rate != '') { + this.setValueFormUi('adult_rate'); + } + if (val[0].senior_rate != '') { + this.setValueFormUi('senior_rate'); + } + if (val[0].youth_rate != '') { + this.setValueFormUi('youth_rate'); + } + if (val[0].child_rate != '') { + this.setValueFormUi('child_rate'); + } + } + + setValueFormUi(name) { + let obj = this.paxformGroup.getRawValue(); + for (let i = 1; i < obj.length; i++) { + Object.keys(obj[i]).map((e) => { + if (e == name) { + this.paxformGroup.controls[i].get(e).setValue(obj[0][name]); + } + }); + } + } + + // Vehicle Rate -------------------------------------------------------------------- + + /** + * @author Abdul Razzak + * to get contract vehicle details + * @param postdata + */ + GetVehicleRate(postdata) { + this.ApiServ.Post('/ActivityContract/GetVehicleRate', postdata).subscribe( + (data) => { + if (data) { + console.log(data); + if (data.responseObject) { + this.vahicleDetails = data.responseObject; + data.responseObject ? this.setvahicleValue(data.responseObject) : ''; + } + } + } + ); + } + + /** + * @author Abdul Razzak + * to creta form group and set value on vehicle rate group + */ + setvahicleValue(data) { + this.VahicleformGroup.clear(); + this.VahicleformGroup.push( + this.Fb.group({ + date: [''], + vehicle_rates: this.Fb.array([]) + }) + ) + this.CreateFormGroup(data[0], this.VahicleformGroup.controls[0].get('vehicle_rates'), false); + data.forEach((value, i) => { + this.VahicleformGroup.push( + this.Fb.group({ + date: [value['date']], + vehicle_rates: this.Fb.array([]) + }) + ); + let VehicleRatesGroup = this.VahicleformGroup.controls[i + 1].get('vehicle_rates') as FormArray; + this.CreateFormGroup(value, VehicleRatesGroup, true); + }); + } + + CreateFormGroup(value, VehicleRatesGroup, check) { + value.vehicle_rates.forEach((e) => { + VehicleRatesGroup.push(this.Fb.group({ + activity_rate_per_vehicle_id: [check ? e.activity_rate_per_vehicle_id : ''], + rate: [check ? e.rate : ''], + vehicle_id: [check ? e.vehicle_id : ''], + vehicle_name: [check ? e.vehicle_name : ''], + })) + }) + } + + /** + * @author Abdul Razzak + * to set all vehicle rate price + */ + CopyOnUIvehicle() { + let val = this.VahicleformGroup.controls[0].get('vehicle_rates').value; + if (this.VahicleformGroup.controls.length > 1) { + let obj = this.VahicleformGroup.getRawValue(); + obj.forEach((e, i) => { + val.forEach((d, li) => { + this.VahicleformGroup.controls[i].get('vehicle_rates')['controls'][li].get('rate').setValue(d.rate) + }); + }); + }; + }; + + + // Tiered Rate -------------------------------------------------------------------- + + /** + * @author Abdul Razzak + * to get all Tiered Rate details + * @param PostData + */ + GetActivityTieredRate(PostData) { + this.ApiServ.Post('/ActivityContract/GetActivityTieredRate', PostData).subscribe((res) => { + if (res) { + this.AllContractTieredRate = res.responseObject; + this.tieredPricingsGroup.clear(); + this.createTieredGroup(0) + this.AllContractTieredRate.forEach((e, i) => { + let ind = i + 1; + this.createTieredGroup(ind) + let val = this.tieredPricingsGroup.controls[ind].value; + Object.keys(val).forEach((l) => { + this.tieredPricingsGroup.controls[ind].get(l).setValue(e[l]); + }); + }) + } + }) + } + + + /** + * @author Abdul Razzak + * to set all Tiered Rate value + */ + SetTieredRateValCopyUi() { + let val = this.tieredPricingsGroup.controls[0].value; + if (this.tieredPricingsGroup.controls.length > 1) { + let obj = this.tieredPricingsGroup.getRawValue(); + obj.forEach((e, i) => { + if (this.HeaderTieredRateGroup.adult_range) { + this.HeaderTieredRateGroup.adult_range.forEach((d, li) => { + let name = 'adult_rate_range_' + (li + 1) + this.tieredPricingsGroup.controls[i].get(name).setValue(val[name]); + }) + } + if (this.HeaderTieredRateGroup.senior_range) { + this.HeaderTieredRateGroup.senior_range.forEach((d, li) => { + let name = 'senior_rate_range_' + (li + 1) + this.tieredPricingsGroup.controls[i].get(name).setValue(val[name]); + }) + } + if (this.HeaderTieredRateGroup.youth_range) { + this.HeaderTieredRateGroup.youth_range.forEach((d, li) => { + let name = 'youth_rate_range_' + (li + 1) + this.tieredPricingsGroup.controls[i].get(name).setValue(val[name]); + }) + } + if (this.HeaderTieredRateGroup.child_range) { + this.HeaderTieredRateGroup.child_range.forEach((d, li) => { + let name = 'child_rate_range_' + (li + 1) + this.tieredPricingsGroup.controls[i].get(name).setValue(val[name]); + }) + } + }); + }; + } + + + + + UpdateRate() { + let val = this.FormData.getRawValue() + let postdata = new EditActivityContractRate(); + postdata.activity_contract_id = this.activityContractId; + postdata.activity_slot_id = ''; + + // private Transfer + let privateTransferArr = [] + if (val.privateTransfer) { + val.privateTransfer.forEach((e) => { + let PostPrivateTransfer = new ActivityPrivateTransfer(); + PostPrivateTransfer.rate = e.rate; + PostPrivateTransfer.vehicle_id = e.vehicle_id; + PostPrivateTransfer.vehicle_occupancy = e.vehicle_occupancy; + PostPrivateTransfer.vehicle_supplier_id = e.vehicle_supplier_id; + privateTransferArr.push(PostPrivateTransfer) + }) + } + postdata.privateTransfer = val.privateTransfer ? privateTransferArr : []; + + // shared Transfer + let PostSharedTransfer = new ActivitySharedTransfer(); + if (val.sharedTransfer) { + let value = val.sharedTransfer + PostSharedTransfer.vehicle_supplier_id = value.vehicle_supplier_id; + PostSharedTransfer.adult_rate = value.adult_rate; + PostSharedTransfer.child_rate = value.child_rate; + PostSharedTransfer.senior_rate = value.senior_rate; + PostSharedTransfer.youth_rate = value.youth_rate; + } + postdata.sharedTransfer = val.sharedTransfer ? PostSharedTransfer : null; + + // per pax prices + let PaxDetailsArr = [] + if (val.PaxDetails) { + val.PaxDetails.splice(0, 1); + val.PaxDetails.forEach((e) => { + let postpaxrate = new PaxRates(); + postpaxrate.activity_rate_per_pax_id = e.activity_rate_per_pax_id; + postpaxrate.adult_rate = e.adult_rate ? e.adult_rate : 0; + postpaxrate.child_rate = e.child_rate ? e.child_rate : 0; + postpaxrate.senior_rate = e.senior_rate ? e.senior_rate : 0; + postpaxrate.youth_rate = e.youth_rate ? e.youth_rate : 0; + PaxDetailsArr.push(postpaxrate) + }); + } + postdata.perPaxPrices = val.PaxDetails ? PaxDetailsArr : []; + + // per Vehicle Rates + let VahiclelistArr = [] + if (val.vahicle_list) { + val.vahicle_list.splice(0, 1); + val.vahicle_list.forEach((q) => { + q.vehicle_rates.forEach((e) => { + let PostVahiclelist = new VehicleRates(); + PostVahiclelist.activity_rate_per_vehicle_id = e.activity_rate_per_vehicle_id; + PostVahiclelist.rate = e.rate; + PostVahiclelist.vehicle_id = e.vehicle_id; + PostVahiclelist.vehicle_max_occupancy = e.vehicle_max_occupancy; + PostVahiclelist.vehicle_supplier_id = e.vehicle_supplier_id; + VahiclelistArr.push(PostVahiclelist) + }) + }) + } + postdata.perVehicleRates = val.vahicle_list ? VahiclelistArr : []; + + // tiered Pricings + let PostTieredPricings = []; + if (val.tieredPricings) { + if (val.tieredPricings.length > 1) { + val.tieredPricings.splice(0, 1); + val.tieredPricings.forEach(e => { + let postList = new TieredPricingList(); + postList.id = e.activity_rate_tiered_id; + let pricingArr = [] + if (this.HeaderTieredRateGroup.adult_range) { + this.HeaderTieredRateGroup.adult_range.forEach((r, i) => { + let post = new PaxPricing(); + post.rate = e['adult_rate_range_' + (i + 1)]; + post.sequence = (i + 1); + post.pax_type = 'adult'; + pricingArr.push(post); + }) + } + if (this.HeaderTieredRateGroup.youth_range) { + this.HeaderTieredRateGroup.youth_range.forEach((r, i) => { + let post = new PaxPricing(); + post.rate = e['youth_rate_range_' + (i + 1)]; + post.sequence = (i + 1); + post.pax_type = 'youth'; + pricingArr.push(post); + }) + } + if (this.HeaderTieredRateGroup.senior_range) { + this.HeaderTieredRateGroup.senior_range.forEach((r, i) => { + let post = new PaxPricing(); + post.rate = e['senior_rate_range_' + (i + 1)]; + post.sequence = (i + 1); + post.pax_type = 'senior'; + pricingArr.push(post); + }) + } + if (this.HeaderTieredRateGroup.child_range) { + this.HeaderTieredRateGroup.child_range.forEach((r, i) => { + let post = new PaxPricing(); + post.rate = e['child_rate_range_' + (i + 1)]; + post.sequence = (i + 1); + post.pax_type = 'child'; + pricingArr.push(post); + }) + } + postList.pricing = pricingArr; + PostTieredPricings.push(postList) + }) + } + postdata.tieredPricings = val.tieredPricings.length > 1 ? PostTieredPricings : []; + } + this.ApiServ.Post('/ActivityContract/UpdateRateConfig', postdata).subscribe((res) => { + if (res) { + this.showToastrMsg(res) + } + }) + } + + /** + * @author Abdul Razzak + * to show toaster + * @param respData + */ + showToastrMsg(respData) { + this.MsgService.add({ + severity: respData['status'] ? 'success' : 'error', + detail: respData['message'], + }); + setTimeout(() => { + respData['status'] ? this.btnClick() : ''; + }, 500); + } + + /** + * @author Abdul razzak + * to navigate overview tab + */ + btnClick() { + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage']) + } + + /** + * @author Abdul Razzak + * to reset search value + */ + reset() { + this.FormData.get('searchgroup').get('slot_id').setValue(''); + this.FormData.get('searchgroup').get('period_type').setValue(''); + this.FormData.get('searchgroup').get('dates').setValue(''); + this.FormData.get('searchgroup').get('seasonId').setValue([]); + this.FormData.get('searchgroup').get('days').setValue(''); + } + + + // ---------------------------------------------------------------------------------------- + + // addvalid(name, type, num) { + // if (type == 'add') { + // if (num == 'number') { + // this.FormData.controls[name].addValidators([ + // Validators.pattern(/^[0-9]*$/), + // ]); + // this.FormData.controls[name].updateValueAndValidity(); + // } else { + // this.FormData.controls[name].addValidators([Validators.required]); + // this.FormData.controls[name].updateValueAndValidity(); + // } + // } else { + // this.FormData.controls[name].clearValidators(); + // this.FormData.controls[name].updateValueAndValidity(); + // this.FormData.controls[name].markAsUntouched(); + // } + // } + // ---------------------------------------------------------------------------------------------- + // for calender + + // checkcleander() { + // let value = this.FormData.getRawValue(); + // if (value.Search_date[0] && value.Search_date[1]) { + // this.datePicker.overlayVisible = false; + // } + // } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/modify-details/modify-details.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/modify-details/modify-details.component.html new file mode 100644 index 0000000..c289aa6 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/modify-details/modify-details.component.html @@ -0,0 +1,139 @@ +
    + + Back +
    +
    Edit Modify Details
    +
    +
    +
    + + +
    +
    + + +
    +
    + + + Please enter option name +
    +
    +
    +

    Applicable Nationality

    +
    + +
    +
    + All Nationality +
    +
    + Specific Nationality +
    +
    +
    + + + + Please select nationality +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + Exclude + Nationality +
    +
    +
    +
    + + + + Please select nationality +
    +
    +
    +
    +
    +
    +
    + Pickup Included + +
    +
    + Drop Off Included + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    + Tourist Guide + Included +
    + + + + Please enter + tourist guide language +
    +
    +
    +
    + +
    +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/modify-details/modify-details.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/modify-details/modify-details.component.ts new file mode 100644 index 0000000..bffd669 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/modify-details/modify-details.component.ts @@ -0,0 +1,228 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { EditActivityContractDetail } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-details/edit-deatils.model'; +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; + +@Component({ + selector: 'app-modify-details', + templateUrl: './modify-details.component.html', +}) +export class ModifyDetailsComponent implements OnInit { + + FormData: FormGroup + activityData; + currencyList; + activityContractId; + include_nationality_list; + exclude_nationality_list; + all_nationality_list; + constructor( + private route: ActivatedRoute, + public fb: FormBuilder, + public APIServ: API, + public validationService: ValidationService, + public MsgService: MessageService, + private router: Router + ) { } + + + ngOnInit(): void { + this.OnintGroup() + this.GetActivityById(); + this.GetAllCurrency(); + this.GetAllNationality(); + this.GetLOVKeys('Language') + this.getRateConfig(); + } + lovKeyDataObj = { + Language: [] + } + + OnintGroup() { + this.FormData = this.fb.group({ + experience_name: [''], + option_name: this.validationService.required, + currency_code: [''], + _nationality_type: ['1'], + is_exclude_nationality: [false], + rate_inclusion: [''], + contract_remark: [''], + is_pickup_included: [false], + is_drop_off_included: [false], + is_guide_included: [false], + }); + } + + GetActivityById() { + let activity_id = CommonService.getSessionStoage('activity_id'); + this.APIServ.Get('/Activity/GetActivity/' + activity_id).subscribe(d => { + if (d && d.status) { + if (d.responseObject.activityContents && d.responseObject.activityContents.length > 0) { + this.activityData = d.responseObject; + this.FormData.get('experience_name').setValue(d.responseObject.activityContents[0].activity_name); + + } + } + }); + } + + getRateConfig() { + this.route.queryParams.subscribe((obj) => { + if (obj['id']) { + this.activityContractId = obj['id']; + this.APIServ.Get( + '/ActivityContract/GetRateConfig/' + obj['id'] + ).subscribe((data) => { + if (data) { + this.SetValue(data.responseObject); + } + }); + } + }); + } + + SetValue(data) { + let value = this.FormData.getRawValue(); + Object.keys(value).forEach(e => { + if (e == 'option_name' || e == 'currency_code' || e == 'rate_inclusion' || e == 'contract_remark' || + e == 'is_drop_off_included' || e == 'is_pickup_included') { + this.FormData.get(e).setValue(data[e]); + } else if (e == '_nationality_type') { + this.FormData.get(e).setValue(data[e]); + if (data[e] == '2') { + this.isIncludeNationality(data[e]); + let code = data['include_nationality_code'] ? data['include_nationality_code'].split(',') : []; + this.FormData.get('include_nationality_code').setValue(code); + this.remove_nationality('exclude'); + } + } else if (e == 'is_exclude_nationality') { + this.FormData.get(e).setValue(data[e]); + if (data[e]) { + this.isExcludeNationality(data[e]); + let code = data['exclude_nationality_code'] ? data['exclude_nationality_code'].split(',') : []; + this.FormData.get('exclude_nationality_code').setValue(code); + this.remove_nationality('include'); + } + } else if (e == 'is_guide_included') { + this.FormData.get(e).setValue(data[e]); + if (data[e]) { + this.AddLangContorls(data[e]) + let Lngcode = data['guide_languages'] ? data['guide_languages'].split(',') : ''; + this.FormData.get('guide_languages').setValue(Lngcode); + } + } + }); + } + AddLangContorls(check) { + if (check) { + this.FormData.addControl('guide_languages', this.fb.control([], Validators.required)); + } else { + this.FormData.removeControl('guide_languages'); + } + } + GetAllCurrency() { + this.APIServ.Get('/Currency/GetCurrency').subscribe(d => { + if (d) this.currencyList = d; + }); + } + + + isExcludeNationality(check) { + if (check) { + this.FormData.addControl('exclude_nationality_code', this.fb.control([[]], Validators.required)); + this.remove_nationality('include'); + } else this.FormData.removeControl('exclude_nationality_code'); + } + + isIncludeNationality(val) { + if (val == '2') { + this.FormData.addControl('include_nationality_code', this.fb.control([], Validators.required)); + this.FormData.get('include_nationality_code').setValue([]); + } else if (val == '1') { + this.FormData.removeControl('include_nationality_code'); + this.remove_nationality('exclude'); + } + } + + remove_nationality(type) { + let con = type == 'exclude' ? 'include_nationality_code' : 'exclude_nationality_code' + type == 'exclude' ? this.exclude_nationality_list = [...this.all_nationality_list] : this.include_nationality_list = [...this.all_nationality_list]; + let list = type == 'exclude' ? this.exclude_nationality_list : this.include_nationality_list; + let nationality_arr = this.FormData.get(con) ? this.FormData.get(con).value : []; + nationality_arr.forEach(nationality_code => { + let ind = list.findIndex(nationality_obj => nationality_obj.alpha_2_code == nationality_code); + (ind != -1) ? list.splice(ind, 1) : ''; + type == 'exclude' ? this.exclude_nationality_list = [...list] : this.include_nationality_list = [...list]; + }); + } + + GetAllNationality() { + this.APIServ.Get('/Country/GetCountry').subscribe(res => { + if (res) { + this.all_nationality_list = res; + this.include_nationality_list = res; + this.exclude_nationality_list = res; + } + }); + } + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + } + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.APIServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + this.GetActivityById(); + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + } + updateEditdetails() { + let postdata = new EditActivityContractDetail(); + let value = this.FormData.getRawValue(); + postdata.contract_id = this.activityContractId; + postdata.language_code = CommonService.getSessionStoage('Def_Lang_code'); + postdata.option_name = value.option_name; + postdata.currency_code = value.currency_code; + postdata._nationality_type = value._nationality_type; + postdata.is_exclude_nationality = value.is_exclude_nationality; + postdata.rate_inclusion = value.rate_inclusion; + postdata.contract_remark = value.contract_remark; + postdata.is_pickup_included = value.is_pickup_included; + postdata.is_drop_off_included = value.is_drop_off_included; + postdata.is_guide_included = value.is_guide_included; + postdata.exclude_nationality_code = value.exclude_nationality_code ? value.exclude_nationality_code.join(',') : ''; + postdata.include_nationality_code = value.include_nationality_code ? value.include_nationality_code.join(',') : ''; + postdata.guide_languages = value.guide_languages ? value.guide_languages.join(',') : ''; + this.APIServ.Post('/ActivityContract/UpdateContractDetails', postdata).subscribe(res => { + if (res) { + this.showToastrMsg(res) + } + }) + + + } + showToastrMsg(respData) { + this.MsgService.add({ + severity: respData['status'] ? 'success' : 'error', + detail: respData['message'], + }); + setTimeout(() => { + respData['status'] ? this.btnClick() : ''; + }, 500); + } + btnClick() { + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage']) + } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/rate-config.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/rate-config.component.html new file mode 100644 index 0000000..12b145f --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/rate-config.component.html @@ -0,0 +1,178 @@ +
    +
    Rate Config
    + +
    +
    +
    +
    + + +
    +
    + +
    Pickup Included
    +
    +
    +
    + +
    Drop Off Included
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Option Name + + + + Nationality + + + + Date Range/Season + + + + Currency + + + + Slot + + + + Pickup Included + + + + Drop Off Included + + + + Status + + + + Action + + + + + + {{rateDetails.option_name}} + {{rateDetails.nationality}} + + + {{rateDetails.date + == null ? '' : + item | date: 'dd MMM YYYY' }} {{ + + + i == 0 && rateDetails.date.split(',').length > 1? '-' : ''}} + + + {{rateDetails.currency_code}} + + {{item.date}} + + {{rateDetails.is_pickup_included ? "Yes" : "No"}} + {{rateDetails.is_drop_off_included? "Yes" : "No"}} + + {{ + rateDetails.is_active ? + 'Active' : 'Deactive' }} + + + +
    + + + + + + + + + +
    + + +
    + + + + No data found + + + +
    +
    + +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/rate-config.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/rate-config.component.ts new file mode 100644 index 0000000..0035ef1 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/rate-config/rate-config.component.ts @@ -0,0 +1,122 @@ +import { Component, OnInit } from '@angular/core'; +import * as FileSaver from 'file-saver'; +import { + ConfirmationService, + MessageService, + PrimeNGConfig, +} from 'primeng/api'; +import { API } from 'src/app/core/services/api.service'; + +import { Product } from 'src/app/core/services/product'; +import { CommonService } from 'src/app/core/services/common.service'; +import { Router } from '@angular/router'; +import { ActivityAllContract } from 'src/app/core/models/Experience-Service/experience-rate-config-Edit/edit-rate-confi/edit-rate-confi.model'; +import * as moment from 'moment'; + +@Component({ + selector: 'rate-config', + templateUrl: './rate-config.component.html', +}) +export class RateConfigComponent implements OnInit { + products!: Product[]; + selectedProducts!: Product[]; + + product!: Product; + rateDetails; + OptionName = ''; + is_pickup_included = false; + is_drop_off_included = false; + constructor(public ApiServ: API, private MsgService: MessageService, private router: Router) { } + ngOnInit(): void { + // this.GetallrateDetails(); + } + + + GetallrateDetails() { + let activityid = CommonService.getSessionStoage('activity_id'); + let postdata = new ActivityAllContract(); + postdata.activity_id = activityid; + postdata.is_drop_off_included = this.is_drop_off_included; + postdata.is_pickup_included = this.is_pickup_included; + postdata.option_name = this.OptionName; + this.ApiServ.Post('/ActivityContract/GetAllActivityRates', postdata).subscribe(data => { + if (data) { + this.rateDetails = data.responseObject; + } + }) + } + + UpdateStatus(ID, Status) { + let Obj = { + id: ID, + updatedBy: "", + "status": Status ? false : true + } + this.ApiServ.Post('/ActivityContract/UpdateStatus', Obj).subscribe(data => { + if (data) { + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + this.GetallrateDetails(); + } + }); + }; + + EditCancelPoli(Id) { + let obj = { id: Id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/EditCancelletionPolicy'], { queryParams: obj }) + } + EditAllocation(Id) { + let obj = { id: Id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/EditAllocation'], { queryParams: obj }) + } + EditRateConfig(Id) { + let obj = { id: Id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/EditModifyRate'], { queryParams: obj }) + } + + EditDetails(Id) { + let obj = { id: Id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/EditDetails'], { queryParams: obj }) + } + + exportExcel() { + import('xlsx').then((xlsx) => { + const worksheet = xlsx.utils.json_to_sheet(this.products); + const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: 'xlsx', + type: 'array', + }); + this.saveAsExcelFile(excelBuffer, 'products'); + }); + } + reset(){ + this.is_drop_off_included = false; + this.is_pickup_included = false; + this.OptionName = ''; + } + + + SoltsDetailsConvParse(data) { + let obj = data ? JSON.parse(data) : ''; + let html = []; + obj ? obj.forEach(e => html.push({ 'date': moment(e.start_time).format('hh:mm') + '-' + moment(e.end_time).format('hh:mm') })) : '' + return html + } + saveAsExcelFile(buffer: any, fileName: string): void { + import('file-saver').then((abc) => { + let EXCEL_TYPE = + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; + let EXCEL_EXTENSION = '.xlsx'; + const data: Blob = new Blob([buffer], { + type: EXCEL_TYPE, + }); + FileSaver.saveAs( + data, + fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION + ); + }); + } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/add-new-season/add-new-season.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/add-new-season/add-new-season.component.html new file mode 100644 index 0000000..d366fce --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/add-new-season/add-new-season.component.html @@ -0,0 +1,43 @@ +
    + + Back +
    +
    Add New Season Setting
    +
    +
    +
    + + + + Please enter season name + +
    +
    +
    +
    +
    + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/add-new-season/add-new-season.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/add-new-season/add-new-season.component.ts new file mode 100644 index 0000000..76f03d3 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/add-new-season/add-new-season.component.ts @@ -0,0 +1,168 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ActivitySeason, ActivitySeasonDetails } from 'src/app/core/models/Experience-Service/season-setting/season-setting-add.model'; +@Component({ + selector: 'app-add-new-season', + templateUrl: './add-new-season.component.html', +}) +export class AddNewSeasonComponent implements OnInit { + CommonCalender!: string; + minDateLst = [] + AddSeasonForm; + season_id; + messageService: any; + constructor( + private router: Router, + private route: ActivatedRoute, + private ApiServ: API, + private MsgService: MessageService, + public validationService: ValidationService, + private fb: FormBuilder + ) { } + + ngOnInit(): void { + this.initForm(); + this.minDateLst.push(new Date()) + this.update() + } + update() { + this.route.queryParams.subscribe(obj => { + if (obj['id']) { + this.ApiServ.Get('/ActivitySeason/GetActivitySeason/' + obj['id']).subscribe(d => { + this.SetValue(d['responseObject']); + this.season_id = obj['id']; + }); + } + }); + } + + initForm() { + this.AddSeasonForm = this.fb.group({ + season_name: this.validationService.required, + // supplier_id: ['2205221841391724322'], + activity_id: CommonService.getSessionStoage('activity_id'), + org_id: ['2105311837100000021'], + Calender: this.fb.array([ + this.fb.group({ + CalenderDate: [[new Date(), new Date()]] + }) + ]) + }) + } + SetValue(value) { + this.AddSeasonForm.get("season_name").setValue(value[0].activitySeason.season_name) + this.Calenders.clear() + for (let i = 0; i < value[0].seasondateRange.length; i++) { + this.Calenders.push(this.fb.group({ + CalenderDate: [[,]] + })) + let first = new Date(value[0].seasondateRange[i].fromDate); + let last = new Date(value[0].seasondateRange[i].toDate); + + this.Calenders.controls[i].get('CalenderDate').setValue([first, last]); + this.minDateLst[i] = first + } + } + get Calenders() { + return this.AddSeasonForm.get('Calender') as FormArray; + } + + onSelect(elem, index) { + for (let i = index + 1; i < this.Calenders.controls.length; i++) { + let value = this.Calenders.controls[index].value + this.Calenders.controls[i].get('CalenderDate').setValue([ + new Date(moment(value.CalenderDate[1]).add(1, 'days').format()),//start date + new Date(moment(value.CalenderDate[1]).add(1, 'days').format()) //end date + ]); + this.minDateLst[i] = new Date(moment(value.CalenderDate[1]).add(1, 'days').format()) + } + + } + addSeasonSetting(checkDate) { + if (checkDate) { + let value = this.Calenders.controls[this.Calenders.controls.length - 1].value + this.Calenders.push(this.fb.group({ + CalenderDate: [[ + new Date(moment(value.CalenderDate[1]).add(1, 'days').format()),//start date + new Date(moment(value.CalenderDate[1]).add(1, 'days').format())//end date + ]] + })); + this.minDateLst.push(new Date(moment(value.CalenderDate[1]).add(1, 'days').format())) + }; + } + + SaveSeason() { + if (this.AddSeasonForm.status == "INVALID") { + this.validationService.showValidationsMsg(this.AddSeasonForm); + return; + } + let dateArray = [] + for (let i = 0; i < this.Calenders.controls.length; i++) { + + let value = this.Calenders.controls[i].value + let newdate = value.CalenderDate + dateArray.push({ + FromDate: moment(newdate[0]).format('YYYY-MM-DD'), + ToDate: moment(newdate[1]).format('YYYY-MM-DD') + }) + } + let value = this.AddSeasonForm.getRawValue() + let SeasonModel = new ActivitySeasonDetails() + let Season = new ActivitySeason() + Season.org_id = ''; + Season.season_name = value.season_name; + Season.activity_id = value.activity_id; + Season.supplier_id = '' + Season.activity_season_id = this.season_id ? this.season_id : ''; + + SeasonModel.activitySeason = Season; + Season.created_by = ''; + Season.updated_by = '' + SeasonModel.seasondateRange = dateArray; + + if (this.season_id) { + this.ApiServ.Post('/ActivitySeason/UpdateActivitySeason', SeasonModel).subscribe(data => { + if (data) { + this.MsgService.add({ + severity: data['status'] ? 'success' : 'error', + detail: data['message'], + }); + setTimeout(() => { + data['status'] ? this.btnClick() : '' + }, 500); + } + }); + } else { + this.ApiServ.Post('/ActivitySeason/SaveActivitySeason', SeasonModel).subscribe(data => { + if (data) { + this.MsgService.add({ + severity: data['status'] ? 'success' : 'error', + detail: data['message'], + }); + setTimeout(() => { + data['status'] ? this.btnClick() : '' + }, 500); + } + }); + } + }; + removeSeasonSetting(index: number) { + this.Calenders.removeAt(index) + this.minDateLst.splice(index, 1) + } + btnClick() { + this.router.navigateByUrl("/Services/ActivityServices/ExpServices/Manage"); + } + descreption: string = ''; + + showInfo(descreption) { + this.descreption = descreption; + this.messageService.add({ severity: 'info', summary: 'samary', detail: '' }); + } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/season-creation.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/season-creation.component.html new file mode 100644 index 0000000..5b9a028 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/season-creation.component.html @@ -0,0 +1,117 @@ +
    +
    Season Setting
    + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Season Name + + + + Season Date Range + + + + Status + + + + Action + + + + + + + {{SeasonData.activitySeason.season_name}} + + {{date.fromDate | date: + 'dd MMM yyyy'}} - {{date.toDate| date: 'dd MMM yyyy'}} + + + {{ + SeasonData.activitySeason.is_active ? 'Active' : 'Deactive'}} + + +
    + + + + + +
    + + +
    + + + + No data found + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/season-creation.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/season-creation.component.ts new file mode 100644 index 0000000..462f4af --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/season-creation/season-creation.component.ts @@ -0,0 +1,106 @@ +import { Component, OnInit } from '@angular/core'; +import * as FileSaver from 'file-saver'; +import { MessageService } from 'primeng/api'; +import { API } from 'src/app/core/services/api.service'; +import jsPDF from "jspdf"; +import "jspdf-autotable"; +import { Router } from '@angular/router'; +import { CommonService } from 'src/app/core/services/common.service'; +@Component({ + selector: 'season-creation', + templateUrl: './season-creation.component.html', +}) +export class SeasonCreationComponent implements OnInit { + constructor( + private router: Router, + private ApiServ: API, + private MsgService: MessageService, + // private primengConfig: PrimeNGConfig + ) { } + SeasonData; + cols!: any[]; + exportColumns!: any[]; + Season_name = ''; + ngOnInit(): void { + // this.primengConfig.ripple = true; + this.cols = [ + { field: 'activitySeason.season_name', header: 'Season Name', customExportHeader: 'Product Code' }, + { field: 'seasondateRange.fromDate', header: 'Season Date Range' }, + { field: 'activitySeason.is_active', header: 'Status' }, + ]; + + this.exportColumns = this.cols.map((col) => ({ + title: col.header, + dataKey: col.field, + })); + } + + exportPdf() { + // const doc = new jsPDF(); + const doc = new jsPDF('p', 'pt'); + doc['autoTable'](this.exportColumns, this.SeasonData); + doc.save("Season_Data_export_" + new Date().getTime() + ".pdf"); + } + + Edit(sea_id) { + let obj = { id: sea_id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/AddNewSeason'], { queryParams: obj }) + } + + UpdateStatus(exp_id, status) { + let obj = { id: exp_id, status: status ? false : true, updatedBy: '' } + this.ApiServ.Post('/ActivitySeason/UpdateStatus', obj).subscribe((data) => { + if (data) { + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + this.SearchSeason(); + } + }); + } + + SearchSeason() { + let activityid = CommonService.getSessionStoage('activity_id') + this.ApiServ.Get('/ActivitySeason/GetAllActivitySeason?activityId=' + activityid + '&seasonName=' + this.Season_name).subscribe(e => { + if (e) { + this.SeasonData = e['responseObject']; + } + }) + } + + reset() { + this.Season_name = ''; + } + + exportExcel() { + import('xlsx').then((xlsx) => { + console.log(xlsx); + const worksheet = xlsx.utils.json_to_sheet(this.SeasonData); + const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: 'xlsx', + type: 'array', + }); + this.saveAsExcelFile(excelBuffer, 'Season_Data_export_' + new Date().getTime()); + }); + } + + saveAsExcelFile(buffer: any, fileName: string): void { + import('file-saver').then((abc) => { + let EXCEL_TYPE = + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; + let EXCEL_EXTENSION = '.xlsx'; + const data: Blob = new Blob([buffer], { + type: EXCEL_TYPE, + }); + console.log(FileSaver); + FileSaver.saveAs( + data, + fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION + ); + }); + } + + +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/add-slots/add-slots.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/add-slots/add-slots.component.html new file mode 100644 index 0000000..1e67d3b --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/add-slots/add-slots.component.html @@ -0,0 +1,59 @@ +
    + + Back +
    +
    Add Slot
    +
    +
    +
    + + + + Please select Slot Start Time + + Please select different start time + +
    +
    + + + Please + select slot end time + + Please select different end time + +
    +
    + + + Please select cut-off time + +
    +
    + + + {{item.utc + ' ' + item.timezone }} + + + Please select time zone + +
    +
    +
    + +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/add-slots/add-slots.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/add-slots/add-slots.component.ts new file mode 100644 index 0000000..a0d88ec --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/add-slots/add-slots.component.ts @@ -0,0 +1,173 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ActivitySlot } from 'src/app/core/models/Experience-Service/slot/add-slots-model'; +// import { ActivitySlot } from 'src/app/core/models/Experience-Service/slot/add-slots.model'; +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; + +@Component({ + selector: 'app-add-slots', + templateUrl: './add-slots.component.html', +}) +export class AddSlotsComponent implements OnInit { + date8: Date; + timeZoneData: any; + slot_id: any; + constructor( + public fb: FormBuilder, + public ApiServ: API, + public router: Router, + public validationService: ValidationService, + public MsgService: MessageService, + public routes: ActivatedRoute + ) { } + SaveAddSlot: FormGroup; + date1 = new Date(); + date2 = new Date(); + ngOnInit(): void { + this.initform(); + this.GetData(); + this.GetSlotId(); + this.date1.setHours(0); + this.date1.setMinutes(0); + this.date1.setSeconds(0); + this.date2.setHours(0); + this.date2.setMinutes(0); + this.date2.setSeconds(0); + } + + initform() { + this.SaveAddSlot = this.fb.group({ + start_time: [this.date1, Validators.required], + start_time_Check: [false], + end_time_Check: [false], + end_time: [this.date2, Validators.required], + cut_off_time: [this.date2, Validators.required], + timezone: this.validationService.required, + }); + } + + GetData() { + this.ApiServ.Get('/TimezoneCity/GetAllTimezoneCity').subscribe((res) => { + if (res) { + this.timeZoneData = res; + } + }); + } + //this function is user for edit + GetSlotId() { + this.routes.queryParams.subscribe((d) => { + if (d['id']) { + this.slot_id = d['id']; + this.ApiServ.Get('/ActivitySlot/GetSlot/' + d['id']).subscribe( + (data) => { + if (data) { + this.AllSetvalue(data['responseObject']); + } + } + ); + } + }); + } + + AllSetvalue(val) { + Object.keys(val).forEach((li) => { + if (li == 'cut_off_time' || li == 'start_time' || li == 'end_time') { + let date = val[li].split('T'); + let st = moment().utc().format('MM-DD-YYYY ' + date[1]); + let date1 = new Date(st); + this.SaveAddSlot.get(li).setValue(date1); + } + if (li == 'timezone') { + this.SaveAddSlot.get(li).setValue(val[li]); + } + }); + } + + Save() { + + if (this.SaveAddSlot.status == 'INVALID') { + console.log(this.SaveAddSlot.get('start_time')); + this.validationService.showValidationsMsg(this.SaveAddSlot); + console.log(this.SaveAddSlot); + return; + } + let val = this.SaveAddSlot.getRawValue(); + var now = new Date(val.start_time); + var d = new Date(val.end_time); + if (now.getTime() == d.getTime() || now.getTime() >= d.getTime()) { + this.SaveAddSlot.get('start_time_Check').setValue(true); + this.SaveAddSlot.get('end_time_Check').setValue(true); + return + } + let postdata = new ActivitySlot(); + postdata.activity_id = CommonService.getSessionStoage('activity_id'); + postdata.start_time = + '0001-01-01' + 'T' + moment(val.start_time).format('HH:mm:01'); + postdata.end_time = + '0001-01-01' + 'T' + moment(val.end_time).format('HH:mm:01'); + postdata.cut_off_time = + '0001-01-01' + 'T' + moment(val.cut_off_time).format('HH:mm:01'); + postdata.timezone = val.timezone; + postdata.is_deleted = false; + postdata.activity_slot_id = this.slot_id ? this.slot_id : ''; + postdata.org_id = ''; + postdata.supplier_id = ''; + + if (this.slot_id) { + this.ApiServ.Post('/ActivitySlot/UpdateActivitySlot', postdata).subscribe( + (res) => { + if (res) { + console.log(res); + this.MsgService.add({ + severity: res['status'] ? 'success' : 'error', + detail: res['message'], + }); + setTimeout(() => { + this.router.navigate([ + '/Services/ActivityServices/ExpServices/Manage', + ]); + }, 500); + } + } + ); + } else { + this.ApiServ.Post('/ActivitySlot/SaveActivitySlot', postdata).subscribe( + (res) => { + if (res) { + console.log(res); + this.MsgService.add({ + severity: res['status'] ? 'success' : 'error', + detail: res['message'], + }); + setTimeout(() => { + this.router.navigate([ + '/Services/ActivityServices/ExpServices/Manage', + ]); + }, 500); + } + } + ); + } + } + + + + // + Check() { + let val = this.SaveAddSlot.getRawValue(); + var now = new Date(val.start_time); + var d = new Date(val.end_time); + if (now.getTime() == d.getTime() || now.getTime() >= d.getTime()) { + this.SaveAddSlot.get('start_time_Check').setValue(true); + this.SaveAddSlot.get('end_time_Check').setValue(true); + } else { + this.SaveAddSlot.get('start_time_Check').setValue(false); + this.SaveAddSlot.get('end_time_Check').setValue(false); + } + } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/slots.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/slots.component.html new file mode 100644 index 0000000..cdc9fd2 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/slots.component.html @@ -0,0 +1,163 @@ +
    + Search Slots + +
    +
    +
    +
    + +
    +
    + + + {{ item.hour }} : {{item.minute}} + +
    +
    +
    +
    + +
    +
    + + + {{item.hour}} : {{item.minute}} + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Slot Id + + + + Slot Start Time + + + + Slot End Time + + + + Cut-Off Time (in Hrs) + + + + Status + + + + Action + + + + + + + {{ AllSlots.activity_slot_id }} + + {{ + AllSlots.start_time | date: "H:mm" + }} + + + {{ + AllSlots.end_time | date: "H:mm" + }} + + + {{ + AllSlots.cut_off_time | date: "H:mm" + }} + + + + {{ AllSlots.is_active ? "Active" : "Deactive" }} + + +
    + + + + + +
    + + +
    + + + + No data found + + + +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/slots.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/slots.component.ts new file mode 100644 index 0000000..87b8413 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs-content/slots/slots.component.ts @@ -0,0 +1,69 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Product } from 'src/app/core/services/product'; +import * as FileSaver from 'file-saver'; +import { MatMenuTrigger } from '@angular/material/menu'; +import { API } from 'src/app/core/services/api.service'; +import { MessageService } from 'primeng/api'; +import { Router } from '@angular/router'; +import { CommonService } from 'src/app/core/services/common.service'; +import { GetActivitySlot } from 'src/app/core/models/Experience-Service/slot/add-slots-model'; +import * as moment from 'moment'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +@Component({ + selector: 'slots', + templateUrl: './slots.component.html', +}) +export class SlotsComponent implements OnInit { + @ViewChild('menuTrigger') menuTrigger: MatMenuTrigger; + + displayModal: boolean; + AllSlots: any; + + showModalDialog() { + this.displayModal = true; + } + constructor(public ApiServ: API, private MsgService: MessageService, public router: Router, public CommonVari: StaticDataService) { } + StartTime; + EndTime; + ngOnInit(): void { + } + + GetAllSlot() { + let post = new GetActivitySlot(); + let activity_id = CommonService.getSessionStoage('activity_id'); + post.activity_id = activity_id; + post.from_hour = this.StartTime ? this.StartTime.split(':')[0] : null; + post.from_minute = this.StartTime ? this.StartTime.split(':')[1] : null; + post.to_hour = this.EndTime ? this.EndTime.split(':')[0] : null; + post.to_minute = this.EndTime ? this.EndTime.split(':')[1] : null; + this.ApiServ.Post('/ActivitySlot/GetAllSlot', post).subscribe(res => { + if (res) { + this.AllSlots = res['responseObject']; + } + }); + } + reset() { + this.EndTime = null; + this.StartTime = null + } + UpdateStatus(slot_id, status) { + let obj = { Id: slot_id, Status: status ? false : true } + this.ApiServ.Post('/ActivitySlot/UpdateStatus', obj).subscribe(data => { + if (data) { + this.GetAllSlot(); + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + } + }) + } + + // table + cols!: any[]; + + Edit(pk_id) { + let obj = { id: pk_id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage/AddSlots'], { queryParams: obj }); + } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs/tabs.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs/tabs.component.html new file mode 100644 index 0000000..6f2b8c8 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs/tabs.component.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs/tabs.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs/tabs.component.ts new file mode 100644 index 0000000..0464e6d --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-manage/tabs/tabs.component.ts @@ -0,0 +1,17 @@ +import { Component, OnInit } from '@angular/core'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; + +@Component({ + selector: 'app-tabs', + templateUrl: './tabs.component.html', +}) +export class TabsComponent implements OnInit { + + constructor(public CommonVariable: StaticDataService) { } + ngOnInit(): void { + } + TabviewSet(data) { + this.CommonVariable.ActivityOverViewtab = data.index; + console.log(this.CommonVariable.ActivityOverViewtab); + } +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-search/exp-services-search.component.html b/src/app/modules/services/activity-services/exp-services/exp-services-search/exp-services-search.component.html new file mode 100644 index 0000000..3e8d505 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-search/exp-services-search.component.html @@ -0,0 +1,230 @@ +
    +
    Search Experience
    + +
    +
    +
    +
    + + +
    +
    + + ExpCity + +
    + +
    Supplier
    +
    + +
    +
    +
    +
    + + + + +
    +
    + + + +
    +
    + + + + +
    +
    + + + +
    + +
    City
    +
    + +
    +
    +
    +
    + Pickup Included +
    +
    + Drop Off Included +
    +
    +
    + + +
    +
    + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Experience Id + + + + Experience Name + + + + Supplier + + + + Country + + + + City + + + + Pickup Included + + + + Drop Off Included + + + + Status + + + + Action + + + + + + + + {{exp.activity_id}} + + + {{exp.activity_name}} + + + - + + + {{exp.country_name}} + + + {{exp.city_name}} + + + {{exp.is_pickup_included ? 'Yes' : 'No'}} + + + {{exp.is_drop_included ? 'Yes' : 'No'}} + + {{ + exp.is_active ? 'Active' : 'Deactive'}} + + +
    + + + + + + + + +
    + + +
    + + + + No data found + + + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/activity-services/exp-services/exp-services-search/exp-services-search.component.ts b/src/app/modules/services/activity-services/exp-services/exp-services-search/exp-services-search.component.ts new file mode 100644 index 0000000..1054332 --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services-search/exp-services-search.component.ts @@ -0,0 +1,260 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import * as FileSaver from 'file-saver'; +import jsPDF from "jspdf"; +import "jspdf-autotable"; +import { MessageService } from 'primeng/api'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { API } from 'src/app/core/services/api.service'; +import { CommonService } from 'src/app/core/services/common.service'; + + +@Component({ + selector: 'app-exp-services-search', + templateUrl: './exp-services-search.component.html', +}) +export class ExpServicesSearchComponent implements OnInit { + ExpSearch: FormGroup; + ExpData; + SubCategory; + ExpCatData; + cols: any[]; + exportColumns; + CityData; + ExpSupData: any; + CountryData: any; + Experience_Type; + constructor( + private router: Router, + private fb: FormBuilder, + public ApiServ: API, + private MsgService: MessageService, + private commonVari: StaticDataService + + ) { } + + + + + /** + * @author Abdul Razzak + * to get supplier data + */ + ExpSupplier() { + this.ApiServ.Get('/HotelSupplierMapping/GetAllHotelSupplierMapping').subscribe(data => { + if (data) { + this.ExpSupData = data['responseObject']; + } + }); + }; + + + /** + * @author Abdul Razzak + * to get city based on country + */ + ExpCity() { + let val = this.ExpSearch.getRawValue(); + this.ApiServ.Get('/City/GetCity/' + val.country_code).subscribe((data) => { + if (data) { + this.CityData = data; + } + }); + }; + + /** + * @author Abdul Razzak + * to get all country + */ + ExpCounrty() { + this.ApiServ.Get('/Country/GetCountry').subscribe(data => { + if (data) { + this.CountryData = data; + console.log(this.CountryData) + } + }); + }; + + /** + * @author Abdul Razzak + * to get all category + */ + GetAllCategory() { + this.ApiServ.Get('/ActivityCategoryMaster/GetAllCategory').subscribe(data => { + if (data) { + this.Experience_Type = data['responseObject'] + } + }); + }; + + /** + * @author Abdul Razzak + * to get sub category based on category + */ + GetSubCategory(value) { + this.ExpSearch.get('sub_category_id').setValue('') + this.ApiServ.Get('/ActivityCategoryMaster/GetSubCategory?Id=' + value).subscribe(data => { + if (data) { + this.SubCategory = data['responseObject'] + } + }); + }; + + ngOnInit(): void { + this.ExpCounrty(); + this.GetAllCategory() + this.ExpSupplier(); + CommonService.resetLocalStoage('activity_id'); + this.initForm(); + this.cols = [ + { field: "activity_id", header: "Experience Id" }, + { field: "activity_name", header: "Experience Name" }, + { field: "category_name", header: "Experience Type" }, + { field: "country_name", header: "Country" }, + { field: "city_name", header: "City" }, + { field: "is_pickup_included", header: "Pickup Included" }, + { field: "is_drop_included", header: "Drop Off Included" }, + { field: "is_active", header: "Status" } + ]; + this.exportColumns = this.cols.map(col => ({ + title: col.header, + dataKey: col.field + })); + } + + /** + * @author Abdul Razzak + * to get supplier data + * @param Activity_id + */ + Edit(activity_id) { + let obj = { id: activity_id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/Add'], { queryParams: obj }); + } + + /** + * @author Abdul Razzak + * method to store Activity id + */ + Manage(activity_id) { + CommonService.setSessionStorage('activity_id', activity_id); + this.router.navigate(['/Services/ActivityServices/ExpServices/Manage']); + this.commonVari.ActivityOverViewtab = 0; + } + + manageTrans(activity_id) { + let obj = { id: activity_id }; + this.router.navigate(['/Services/ActivityServices/ExpServices/ManageTranslation'], { queryParams: obj }); + }; + + /** + * @author Abdul Razzak + * to create form group + */ + initForm() { + this.ExpSearch = this.fb.group({ + activity_name: [''], + city_id: [''], + category_id: [''], + sub_category_id: [''], + country_code: [''], + is_pickup_included: [false], + is_drop_included: [false], + }); + } + + /** + * @author Abdul Razzak + * to get all activitys + */ + SearchExp() { + this.ApiServ.Post('/Activity/GetAllActivity', this.ExpSearch.getRawValue()).subscribe(e => { + if (e) { + this.ExpData = e['responseObject']; + } + }); + }; + + /** + * @author Abdul Razzak + * to active or deactive + * @param exp_id + * @param status + */ + UpdateStatus(exp_id, status) { + let obj = { id: exp_id, status: status ? false : true, updatedBy: '' } + this.ApiServ.Post('/Activity/UpdateStatus', obj).subscribe((data) => { + if (data) { + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + this.SearchExp(); + } + }); + }; + + /** + * @author Abdul Razzak + * to reset search form value + */ + ResetExp() { + this.ExpSearch.get('activity_name').setValue('') + this.ExpSearch.get('city_id').setValue('') + this.ExpSearch.get('country_code').setValue('') + this.ExpSearch.get('category_id').setValue('') + this.ExpSearch.get('sub_category_id').setValue('') + this.ExpSearch.get('is_pickup_included').setValue(false) + this.ExpSearch.get('is_drop_included').setValue(false) + this.SearchExp(); + }; + + /** + * @author Abdul Razzak + * to download excel sheet + */ + exportExcel() { + import('xlsx').then((xlsx) => { + const worksheet = xlsx.utils.json_to_sheet(this.ExpData); + const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: 'xlsx', + type: 'array', + }); + this.saveAsExcelFile(excelBuffer, 'Experience_Service'); + }); + }; + /** + * @author Abdul Razzak + * to download Excel + */ + saveAsExcelFile(buffer: any, fileName: string): void { + import('file-saver').then((abc) => { + let EXCEL_TYPE = + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; + let EXCEL_EXTENSION = '.xlsx'; + const data: Blob = new Blob([buffer], { + type: EXCEL_TYPE, + }); + FileSaver.saveAs( + data, + fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION + ); + }); + }; + /** + * @author Abdul Razzak + * to download PDF + */ + exportPdf() { + // const doc = new jsPDF(); + const doc = new jsPDF('p', 'pt'); + doc['autoTable'](this.exportColumns, this.ExpData); + // doc.autoTable(this.exportColumns, this.products); + doc.save("Experience_Service_export_" + new Date().getTime() + ".pdf"); + }; + + + +} diff --git a/src/app/modules/services/activity-services/exp-services/exp-services.module.ts b/src/app/modules/services/activity-services/exp-services/exp-services.module.ts new file mode 100644 index 0000000..6a90d7c --- /dev/null +++ b/src/app/modules/services/activity-services/exp-services/exp-services.module.ts @@ -0,0 +1,100 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +// import { ExpServicesSearchComponent } from './experience-services-search/experience-services-search.component'; +import { RouterModule, Routes } from '@angular/router'; + + +// +import { ButtonModule } from 'primeng/button'; +import { CalendarModule } from 'primeng/calendar'; +import { InputNumberModule } from 'primeng/inputnumber'; +import { InputTextModule } from 'primeng/inputtext'; +import { RatingModule } from 'primeng/rating'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TreeModule } from 'primeng/tree'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MessageService, ConfirmationService } from 'primeng/api'; +import { ProductService } from 'src/app/core/services/product.service'; +import { CheckboxModule } from 'primeng/checkbox'; +import {EditorModule} from 'primeng/editor'; + +import {FileUploadModule} from 'primeng/fileupload'; +import {HttpClientModule} from '@angular/common/http'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { ToastModule } from 'primeng/toast'; +import { ExpServicesAddComponent } from './exp-services-add/exp-services-add.component'; +import { ExpServicesSearchComponent } from './exp-services-search/exp-services-search.component'; +import { ExpManageTranslationComponent } from './exp-manage-translation/exp-manage-translation.component'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; + +const routes: Routes = [ + { + path: 'Search', + component: ExpServicesSearchComponent, + }, + { + path: 'Manage', + loadChildren: () => + import('./exp-services-manage/exp-services-manage.module').then( + (m) => m.ExpServicesManageModule + ), + }, + { + path: 'ManageTranslation', + component: ExpManageTranslationComponent + }, + { + path: 'Add', + component: ExpServicesAddComponent, + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'Search', + }, +]; + +@NgModule({ + declarations: [ + ExpServicesSearchComponent, + ExpServicesAddComponent, + ExpManageTranslationComponent, + // HotelServicesComponent, + // TabsComponent, + ], + imports: [ + CommonModule, + FormsModule, + CalendarModule, + TableModule, + InputTextModule, + NgSelectModule, + InputNumberModule, + TreeModule, + RatingModule, + ButtonModule, + ToolbarModule, + RouterModule.forChild(routes), + CheckboxModule, + EditorModule, + FileUploadModule, + HttpClientModule, + MatMenuModule, + MatButtonModule, + MatCheckboxModule, + ReactiveFormsModule, + FormsModule, + ToastModule + ], + providers:[ + MessageService, + ConfirmationService, + ProductService, + StaticDataService + ] +}) +export class ExpServicesModule {} diff --git a/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-add/hotel-zone-services-add.component.html b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-add/hotel-zone-services-add.component.html new file mode 100644 index 0000000..c495967 --- /dev/null +++ b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-add/hotel-zone-services-add.component.html @@ -0,0 +1,235 @@ +
    + + Back +
    + +
    Add Hotel Zone
    +
    +
    +
    + + +
    + + +
    + + + + +
    + +
    Trip Type
    +
    + +
    +
    +
    +
    + + + +
    + +
    Airline
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + + +
    +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Hotel NameHotel Star CategoryAddressCity
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    + + Hotel 14Four square, DubaiDubai
    +
    +
    + +
    +
    diff --git a/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-add/hotel-zone-services-add.component.ts b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-add/hotel-zone-services-add.component.ts new file mode 100644 index 0000000..56c6f88 --- /dev/null +++ b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-add/hotel-zone-services-add.component.ts @@ -0,0 +1,53 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-hotel-zone-services-add', + templateUrl: './hotel-zone-services-add.component.html', +}) +export class HotelZoneServicesAddComponent implements OnInit { + constructor() {} + + ngOnInit(): void {} + cities = [ + { id: 1, name: 'Select' }, + { id: 2, name: 'abc' }, + { id: 3, name: 'abc1' }, + { id: 4, name: 'abc2' }, + ]; + // selectedCity = this.cities[0].name; + labelFloat; + statusClass = 'not-active'; + + check = false; + fun1() { + this.statusClass = 'active'; + } + + fun2(val) { + if (val.target.value != '') { + this.statusClass = 'active'; + } + if (!this.check) { + this.statusClass = 'non-active'; + } + } + + fun3(val) { + console.log(val.target.value); + if (val.target.value == '') { + this.check = false; + this.statusClass = 'non-active'; + } else { + this.statusClass = 'active'; + } + } + + fun4(val) { + if (val != '') { + this.statusClass = 'active'; + this.check = true; + } + } + + setActiveClass() {} +} diff --git a/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-search/hotel-zone-services-search.component.html b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-search/hotel-zone-services-search.component.html new file mode 100644 index 0000000..d54f28f --- /dev/null +++ b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-search/hotel-zone-services-search.component.html @@ -0,0 +1,215 @@ +
    + Hotel Zones + +
    +
    +
    +
    + + +
    + +
    + + + +
    + +
    Trip Type
    +
    + +
    +
    +
    +
    + + + +
    + +
    Airline
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Zone Id + + + + Zone Name + + + + Zone Code + + + + Country + + + + City + + + + Status + + + Action + + + + + 220220202020 + Mumbai City Zone + MUMZ01 + India + Mumbai + + {{ product.inventoryStatus }} + + +
    + + + + + +
    + + +
    +
    +
    diff --git a/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-search/hotel-zone-services-search.component.ts b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-search/hotel-zone-services-search.component.ts new file mode 100644 index 0000000..19f98e9 --- /dev/null +++ b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services-search/hotel-zone-services-search.component.ts @@ -0,0 +1,107 @@ +import { MatMenuTrigger } from '@angular/material/menu'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Product } from 'src/app/core/services/product'; +import { ProductService } from 'src/app/core/services/product.service'; +import * as FileSaver from 'file-saver'; +@Component({ + selector: 'app-hotel-services-search', + templateUrl: './hotel-zone-services-search.component.html', +}) +export class HotelZoneServicesSearchComponent implements OnInit { + @ViewChild('menuTrigger') menuTrigger: MatMenuTrigger; + + displayModal: boolean; + + constructor( + private productService: ProductService, + ) {} + + cities = [ + { id: 1, name: 'Vilnius' }, + { id: 2, name: 'Kaunas' }, + { id: 3, name: 'Pavilnys', disabled: true }, + { id: 4, name: 'Pabradė' }, + { id: 5, name: 'Klaipėda' }, + ]; + selectedCity = this.cities[0].name; + + ngOnInit(): void { + this.productService.getProducts().then((data) => (this.products = data)); + } + + rangeDates: Date[]; + + minDate: Date; + + maxDate: Date; + + es: any; + + invalidDates: Array; + // table + cols!: any[]; + + productDialog!: boolean; + + products!: Product[]; + + product!: Product; + + selectedProducts!: Product[]; + + submitted!: boolean; + + openNew() { + this.product = {}; + this.submitted = false; + this.productDialog = true; + } + + findIndexById(id: string): number { + let index = -1; + for (let i = 0; i < this.products.length; i++) { + if (this.products[i].id === id) { + index = i; + break; + } + } + return index; + } + createId(): string { + let id = ''; + var chars = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + for (var i = 0; i < 5; i++) { + id += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return id; + } + exportExcel() { + import('xlsx').then((xlsx) => { + console.log(xlsx); + const worksheet = xlsx.utils.json_to_sheet(this.products); + const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: 'xlsx', + type: 'array', + }); + this.saveAsExcelFile(excelBuffer, 'products'); + }); + } + + saveAsExcelFile(buffer: any, fileName: string): void { + import('file-saver').then((abc) => { + let EXCEL_TYPE = + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; + let EXCEL_EXTENSION = '.xlsx'; + const data: Blob = new Blob([buffer], { + type: EXCEL_TYPE, + }); + console.log(FileSaver); + FileSaver.saveAs( + data, + fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION + ); + }); + } +} diff --git a/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services.module.ts b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services.module.ts new file mode 100644 index 0000000..83290c0 --- /dev/null +++ b/src/app/modules/services/activity-services/hotel-zone-services/hotel-zone-services.module.ts @@ -0,0 +1,63 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +// import { HotelZoneServicesAddComponent } from './hotel-services-add/hotel-services-add.component'; +// import { HotelZoneServicesSearchComponent } from './hotel-services-search/hotel-services-search.component'; +import { RouterModule, Routes } from '@angular/router'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { CheckboxModule } from 'primeng/checkbox'; +import { InputNumberModule } from 'primeng/inputnumber'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TreeModule } from 'primeng/tree'; +import { ProductService } from 'src/app/core/services/product.service'; +import { HotelZoneServicesAddComponent } from './hotel-zone-services-add/hotel-zone-services-add.component'; +import { HotelZoneServicesSearchComponent } from './hotel-zone-services-search/hotel-zone-services-search.component'; +const routes: Routes = [ + { + path: 'Search', + component: HotelZoneServicesSearchComponent, + }, + + { + path: 'Add', + component: HotelZoneServicesAddComponent, + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'Search', + }, +]; + +@NgModule({ + declarations: [HotelZoneServicesAddComponent, HotelZoneServicesSearchComponent], + imports: [ + CommonModule, + ButtonModule, + NgSelectModule, + TreeModule, + ToolbarModule, + TableModule, + MatMenuModule, + MatButtonModule, + CheckboxModule, + InputTextModule, + InputNumberModule, + CalendarModule, + FormsModule, + MatDialogModule, + MatButtonModule, + MatCheckboxModule, + RouterModule.forChild(routes), + ], + providers: [ProductService], +}) +export class HotelZoneServicesModule {} diff --git a/src/app/modules/services/activity/activity-add/activity-add.component.html b/src/app/modules/services/activity/activity-add/activity-add.component.html new file mode 100644 index 0000000..2666304 --- /dev/null +++ b/src/app/modules/services/activity/activity-add/activity-add.component.html @@ -0,0 +1 @@ +

    activity-add works!

    diff --git a/src/app/modules/services/activity/activity-add/activity-add.component.ts b/src/app/modules/services/activity/activity-add/activity-add.component.ts new file mode 100644 index 0000000..b11b845 --- /dev/null +++ b/src/app/modules/services/activity/activity-add/activity-add.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-add', + templateUrl: './activity-add.component.html', +}) +export class ActivityAddComponent { + +} diff --git a/src/app/modules/services/activity/activity-language/activity-language.component.html b/src/app/modules/services/activity/activity-language/activity-language.component.html new file mode 100644 index 0000000..31d6833 --- /dev/null +++ b/src/app/modules/services/activity/activity-language/activity-language.component.html @@ -0,0 +1,125 @@ + +
    +
    +
    +

    Manage Translation

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Translate To

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Default Language Content

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Selected Language Content

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-language/activity-language.component.ts b/src/app/modules/services/activity/activity-language/activity-language.component.ts new file mode 100644 index 0000000..501cbdd --- /dev/null +++ b/src/app/modules/services/activity/activity-language/activity-language.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-language', + templateUrl: './activity-language.component.html', +}) +export class ActivityLanguageComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-details/activity-details.component.html b/src/app/modules/services/activity/activity-manage/activity-details/activity-details.component.html new file mode 100644 index 0000000..b3769e0 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-details/activity-details.component.html @@ -0,0 +1,546 @@ +
    +
    +
    +

    Add Activity Details

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Default Language

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Activity Highlights

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Activity Category

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Emergency Contact Number

    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Service Language

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Service Duration (Days)

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Service Duration (Hours)

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Service Duration (Minutes)

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Country

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    City

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Starting City

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Pickup Included

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Pickup Point

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Hotel Pickup

    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + + + +
    +
    +
    +

    Hotels

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Hotel Zones

    +
    + +
    +
    +
    + + + +
    +
    +
    + +
    +
    + + + +
    +
    +
    +

    Departure Point

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Pickup Before Time (Hours)

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Pickup Before Time (Minutes)

    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Meeting Before Time (Hours)

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Meeting Before Time (Minutes)

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Drop Off Included

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-details/activity-details.component.ts b/src/app/modules/services/activity/activity-manage/activity-details/activity-details.component.ts new file mode 100644 index 0000000..8441809 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-details/activity-details.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-details', + templateUrl: './activity-details.component.html', +}) +export class ActivityDetailsComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-details/activity-details.module.ts b/src/app/modules/services/activity/activity-manage/activity-details/activity-details.module.ts new file mode 100644 index 0000000..3f398a7 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-details/activity-details.module.ts @@ -0,0 +1,50 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { ActivityDetailsComponent } from './activity-details.component'; +import { RouterModule, Routes } from '@angular/router'; + +const routes: Routes = [ + { + path: '', + component:ActivityDetailsComponent, + }, +] +@NgModule({ + declarations: [ActivityDetailsComponent], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ], + exports:[ + ActivityDetailsComponent + ] +}) +export class ActivityDetailsModule { } diff --git a/src/app/modules/services/activity/activity-manage/activity-manage.component.html b/src/app/modules/services/activity/activity-manage/activity-manage.component.html new file mode 100644 index 0000000..325f728 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-manage.component.html @@ -0,0 +1,62 @@ +
    + + Back +
    +
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-manage.component.ts b/src/app/modules/services/activity/activity-manage/activity-manage.component.ts new file mode 100644 index 0000000..2083934 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-manage.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-manage', + templateUrl: './activity-manage.component.html', +}) +export class ActivityManageComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-manage.module.ts b/src/app/modules/services/activity/activity-manage/activity-manage.module.ts new file mode 100644 index 0000000..ca56b53 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-manage.module.ts @@ -0,0 +1,106 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { TabViewModule } from 'primeng/tabview'; +import { HotelRoomModule } from '../../hotel/hotel-manage/hotel-room/hotel-room.module'; +import { ActivityManageComponent } from './activity-manage.component'; +import { ActivityOverviewComponent } from './activity-overview/activity-overview.component'; +import { CalendarModule } from 'primeng/calendar'; +import { ActivityOverviewModule } from './activity-overview/activity-overview.module'; + +const routes: Routes = [ + + { + path: '', + component: ActivityManageComponent, + }, + { + path: 'ActivityDetails', + loadChildren: () => + import('./activity-details/activity-details.module').then( + (m) => m.ActivityDetailsModule + ), + }, + { + path: 'TravelDetails', + loadChildren: () => + import('./travel-details/travel-details.module').then( + (m) => m.TravelDetailsModule + ), + }, + { + path: 'Itinerary', + loadChildren: () => + import('./itinerary/itinerary.module').then( + (m) => m.ItineraryModule + ), + }, + { + path: 'Media', + loadChildren: () => + import('./media/media.module').then( + (m) => m.MediaModule + ), + }, + { + path: 'RequiredInfo', + loadChildren: () => + import('./required-info/required-info.module').then( + (m) => m.RequiredInfoModule + ), + }, + { + path: 'Season', + loadChildren: () => + import('./season/season.module').then( + (m) => m.SeasonModule + ), + }, + { + path: 'Slots', + loadChildren: () => import('./slots/slots.module').then( + (m) => m.SlotsModule + ) + }, + { + path: 'Allocation', + loadChildren: () => import('./allocation/allocation.module').then( + (m) => m.AllocationModule + ) + }, + + { + path: 'ActivityOption', + loadChildren: () => import('./activity-option/activity-option.module').then( + (m) => m.ActivityOptionModule + ) + }, + { + path: 'Overview', + loadChildren: () => import('./activity-overview/activity-overview.module').then( + (m) => m.ActivityOverviewModule + ) + }, + +] + + +@NgModule({ + declarations: [ + ActivityManageComponent, + + ], + imports: [ + CalendarModule, + CommonModule, + FormsModule, + MatMenuModule, + HotelRoomModule, + TabViewModule, + RouterModule.forChild(routes), + + ] +}) +export class ActivityManageModule { } diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-cancellation-policy/activity-edit-cancellation-policy.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-cancellation-policy/activity-edit-cancellation-policy.component.html new file mode 100644 index 0000000..f2e3e84 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-cancellation-policy/activity-edit-cancellation-policy.component.html @@ -0,0 +1,309 @@ +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Days

    +
    + +
    +
    +
    + Monday + Tuesday + Wednesday +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    Per Person Pricing

    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    Date
    +
    +
    Day
    +
    +
    + Policy Type +
    +
    +
    + Cancellation Type +
    +
    +
    + From +
    +
    +
    + To +
    +
    +
    + Value + +
    +
    +
    +
    +
    + 12 Mar 2021 + + Mon + + Dropdown values: + Day + +
    + + + +
    +
    +
    +

    +
    + +
    +
    +
    + Non-refundable +
    +
    +
    + 0 + + 365 + +
    + + +
    +
    13 Mar 2021 Tue Dropdown values: Day +
    + + + +
    +
    +
    +

    +
    + +
    +
    +
    + Full Charges + Percentage + Amount + Non-refundable +
    +
    +
    61020 +
    + +
    +
    13 Mar 2021 Tue Dropdown values: + Day +
    + + + +
    +
    +
    +

    +
    + +
    +
    +
    + Amount +
    +
    +
    112020 +
    + +
    +
    + 14 Mar 2021 + Wed Dropdown values: + Day +
    + + + +
    +
    +
    +

    +
    + +
    +
    +
    + Percentage +
    +
    +
    61020 +
    + +
    +
    15 Mar 2021 Thus Dropdown values: + Day +
    + + + +
    +
    +
    +

    +
    + +
    +
    +
    + Amount +
    +
    +
    61020 +
    + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-cancellation-policy/activity-edit-cancellation-policy.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-cancellation-policy/activity-edit-cancellation-policy.component.ts new file mode 100644 index 0000000..b27ed60 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-cancellation-policy/activity-edit-cancellation-policy.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-edit-cancellation-policy', + templateUrl: './activity-edit-cancellation-policy.component.html', + +}) +export class ActivityEditCancellationPolicyComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-option/activity-edit-option.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-option/activity-edit-option.component.html new file mode 100644 index 0000000..3d1dd06 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-option/activity-edit-option.component.html @@ -0,0 +1,350 @@ + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Supported Transfer Type

    +
    + +
    +
    +
    + Private + Shared + Without Transfer +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Transfer Included in Price

    +
    + +
    +
    +
    + Private Transfer + Shared Transfer + Without Transfer +
    +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Vehicle Selection +

    +
    + +
    +
    +
    + Private Transfer + Shared Transfer + Without Transfer +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
    +

    Vehicle Selection +

    +
    + +
    +
    +
    + Private Transfer + Shared Transfer + Without Transfer +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +

    Other Details

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Contract Remark

    +
    + +
    +
    +
    + Private + Shared + Without Transfer +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Tourist Guide Type

    +
    + +
    +
    +
    + 1. Physical Guide + 2. Reading Material + 3. Audio Guide +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Tourist Guide Languages

    +
    + +
    +
    +
    + 1. + 2. + 3. +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Applicable Add-On

    +
    + +
    +
    +
    + 1. + 2. + 3. +
    +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-option/activity-edit-option.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-option/activity-edit-option.component.ts new file mode 100644 index 0000000..80d438d --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-option/activity-edit-option.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-edit-option', + templateUrl: './activity-edit-option.component.html', + +}) +export class ActivityEditOptionComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-price/activity-edit-price.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-price/activity-edit-price.component.html new file mode 100644 index 0000000..ab19ac0 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-price/activity-edit-price.component.html @@ -0,0 +1,569 @@ +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +

    Price Config

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Days

    +
    + +
    +
    +
    + Monday + Tuesday + Wednesday +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    Per Person Pricing

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    Date
    +
    +
    Day
    +
    +
    + Adult Price (age range) + +
    +
    +
    + Senior Price (age range) + +
    +
    +
    + Youth Price (age range) + +
    +
    +
    + Child Price (age range) + +
    +
    +
    + Child Price (age range) + +
    +
    + 12 Mar 2021 + + Mon + + 150 + + 120 + + 120 + + 120 + + 120 +
    13 Mar 2021 Tue 150 120 120 120 120
    + 14 Mar 2021 + Wed 135 105 105 105 105
    15 Mar 2021 Thus 150 120 120 120 120
    16 Mar 2021 Fri 150 120 120 120 120
    17 Mar 2021 Sat 150 120 120 120 120
    18 Sun 2021 Tue 150 120 120 120 120
    19 Mar 2021 Mon 150 120 120 120 120
    20 Mar 2021 Tue 150 120 120 120 120
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Activity Pricing

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    Day
    +
    +
    + Max Occupancy + +
    +
    +
    + Activity Price + +
    +
    + 12 Mar 2021 + + Mon + + 150 + + 120 +
    13 Mar 2021 Tue 150 120
    + 14 Mar 2021 + Wed 135 105
    15 Mar 2021 Thus 150 120
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Tiered Pricing

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    Day
    +
    +
    + Adult (age 12 to 55) + +
    +
    +
    + Adult (age 12 to 55) + +
    +
    +
    + Adult (age 12 to 55) + +
    +
    +
    + Child Range 1 (Age 0 to 5) + +
    +
    +
    + Child Range 1 (Age 0 to 5) + +
    +
    +
    + Child Range 1 (Age 0 to 5) + +
    +
    +
    + Child Range 2 (Age 6 to 10) + +
    +
    +
    + Child Range 2 (Age 6 to 10) + +
    +
    +
    + Child Range 2 (Age 6 to 10) + +
    +
    + 12 Mar 2021 + + Mon +
    13 Mar 2021 Tue
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-price/activity-edit-price.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-price/activity-edit-price.component.ts new file mode 100644 index 0000000..ce30970 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-edit-price/activity-edit-price.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-edit-price', + templateUrl: './activity-edit-price.component.html', + +}) +export class ActivityEditPriceComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option-add/activity-option-add.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-add/activity-option-add.component.html new file mode 100644 index 0000000..ebbd273 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-add/activity-option-add.component.html @@ -0,0 +1,1226 @@ + +
    +
    +
    +

    Add Activity Option

    +
    +
    +
    +
    +
    +
    +
    Activity Name
    + +
    +
    +
    +
    +
    Country
    + +
    +
    +
    +
    +
    City
    + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + + +
    +
    +
    +

    Transfer Included in Price

    +
    + +
    +
    +
    + type 1 + type 2 + type 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Transfer Included in Price

    +
    + +
    +
    +
    + type 1 + type 2 + type 3 +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Departure Days

    +
    + +
    +
    + +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Supported Transfer Type

    +
    + +
    +
    + +
    + Private + Shared + Without Transfer +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Transfer Included in Price

    +
    + +
    +
    +
    + Private Transfer + Shared Transfer + Without Transfer +
    +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Vehicle Selection

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    +
    +

    Price Config

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Apply Price On

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Select Slots

    +
    + +
    +
    + +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Applicable days

    +
    + +
    +
    + +
    + Monday + Thuesday + Wednesday +
    +
    +
    +
    +
    +
    +
    +

    Adult (30 to 45)

    +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +

    Senior (46 to 70)

    +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +

    Youth (18 to 30)

    +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +

    Child (3 to 5)

    +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +

    Child (6 to 12)

    +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    From

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    To

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    Pricing Per Pax
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +

    Other Details

    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Departure Days

    +
    + +
    +
    + +
    + Private + Shared + Without Transfer +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Tourist Guide Type

    +
    + +
    +
    + +
    + 1. Physical Guide + 2. Reading Material + 3. Audio Guide +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Tourist Guide Languages

    +
    + +
    +
    + +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Applicable Add-On

    +
    + +
    +
    + +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option-add/activity-option-add.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-add/activity-option-add.component.ts new file mode 100644 index 0000000..91e2c08 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-add/activity-option-add.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-option-add', + templateUrl: './activity-option-add.component.html', + +}) +export class ActivityOptionAddComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option-policy/activity-option-policy.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-policy/activity-option-policy.component.html new file mode 100644 index 0000000..1053fe0 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-policy/activity-option-policy.component.html @@ -0,0 +1,321 @@ + +
    +
    +
    +

    Cancellation Policy

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + Flexible + Non-refundable +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + 1 + 2 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + 1 + 2 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + 1 + 2 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + Full Charges + Amount + Percentage +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + 1 + 2 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + 1 + 2 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + Full Charges + Amount + Percentage +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + 1 + 2 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + 1 + 2 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + 1 + 2 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + Full Charges + Amount + Percentage +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option-policy/activity-option-policy.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-policy/activity-option-policy.component.ts new file mode 100644 index 0000000..568b9cd --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-policy/activity-option-policy.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-option-policy', + templateUrl: './activity-option-policy.component.html', + +}) +export class ActivityOptionPolicyComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option-search/activity-option-search.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-search/activity-option-search.component.html new file mode 100644 index 0000000..41ecc62 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-search/activity-option-search.component.html @@ -0,0 +1,231 @@ +
    +
    +
    +

    Activity Option Search

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Supported Transfer Type

    +
    + +
    +
    +
    + type 1 + type 2 + type 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Transfer Included in Price

    +
    + +
    +
    +
    + type 1 + type 2 + type 3 +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + type 1 +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Activity Name + + + + Option Name + + + + Date Renge + + + + Currency + + + + Slot Id + + + + Tourist Guide Included + + + + Supported Transfer Type + + + + Transfer Included in Price + + + + Pickup Included + + + + Drop Off Included + + + + Option Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option-search/activity-option-search.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-search/activity-option-search.component.ts new file mode 100644 index 0000000..fac49f2 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option-search/activity-option-search.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-option-search', + templateUrl: './activity-option-search.component.html', + +}) +export class ActivityOptionSearchComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-option.component.html new file mode 100644 index 0000000..b71b1a7 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option.component.html @@ -0,0 +1 @@ +

    activity-option works!

    diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-option.component.ts new file mode 100644 index 0000000..c4a66a0 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-option', + templateUrl: './activity-option.component.html', + +}) +export class ActivityOptionComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-option.module.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-option.module.ts new file mode 100644 index 0000000..f556d86 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-option.module.ts @@ -0,0 +1,78 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { ActivityOptionAddComponent } from './activity-option-add/activity-option-add.component'; +import { ActivityOptionSearchComponent } from './activity-option-search/activity-option-search.component'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { MatMenuModule } from '@angular/material/menu'; + +import { ButtonModule } from 'primeng/button'; +import { InputTextModule } from 'primeng/inputtext'; +import { PaginatorModule } from 'primeng/paginator'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { CalendarModule } from 'primeng/calendar'; +import { ActivityOptionPolicyComponent } from './activity-option-policy/activity-option-policy.component'; +import { ActivityViewOptionComponent } from './activity-view-option/activity-view-option.component'; +import { ActivityEditOptionComponent } from './activity-edit-option/activity-edit-option.component'; +import { ActivityEditPriceComponent } from './activity-edit-price/activity-edit-price.component'; +import { ActivityEditCancellationPolicyComponent } from './activity-edit-cancellation-policy/activity-edit-cancellation-policy.component'; + +const routes: Routes = [ + { + path: 'Add', + component: ActivityOptionAddComponent, + }, + { + path: 'Search', + component: ActivityOptionSearchComponent, + }, + { + path: 'Policy', + component: ActivityOptionPolicyComponent, + }, + { + path: 'View', + loadChildren: () => import("./activity-view-option/activity-view.module").then((m) => m.ActivityViewModule) + }, + { + path: 'Edit', + component: ActivityEditOptionComponent, + }, + { + path: 'EditPrice', + component: ActivityEditPriceComponent, + }, + { + path: 'EditCancellationPolicy', + component: ActivityEditCancellationPolicyComponent, + }, +] + +@NgModule({ + declarations: [ + ActivityOptionAddComponent, + ActivityOptionSearchComponent, + ActivityOptionPolicyComponent, + ActivityEditOptionComponent, + ActivityViewOptionComponent, + ActivityEditCancellationPolicyComponent, + ActivityEditPriceComponent + + ], + imports: [ + CommonModule, + RouterModule.forChild(routes), + MatCheckboxModule, + NgSelectModule, + TableModule, + ToolbarModule, + MatMenuModule, + PaginatorModule, + CalendarModule, + InputTextModule, + ButtonModule, + ] +}) +export class ActivityOptionModule { } diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view-option.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view-option.component.html new file mode 100644 index 0000000..f735706 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view-option.component.html @@ -0,0 +1,464 @@ + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +

    Rate Config

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +

    Adult (30 to 45)

    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +

    Senior (46 to 70)

    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +

    Youth (18 to 30)

    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +

    Child (3 to 12)

    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +

    Transfer Pickup Notes

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view-option.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view-option.component.ts new file mode 100644 index 0000000..da59270 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view-option.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-view-option', + templateUrl: './activity-view-option.component.html', + +}) +export class ActivityViewOptionComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view.module.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view.module.ts new file mode 100644 index 0000000..69a19d9 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/activity-view.module.ts @@ -0,0 +1,29 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { ActivityViewOptionComponent } from './activity-view-option.component'; +import { ViewOptionPolicyComponent } from './view-option-policy/view-option-policy.component'; +import { NgSelectModule } from '@ng-select/ng-select'; + +const routes: Routes = [ + { + path: "", + component: ActivityViewOptionComponent, + }, + { + path: "Policy", + component: ViewOptionPolicyComponent, + }, +] + +@NgModule({ + declarations: [ + ViewOptionPolicyComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(routes), + NgSelectModule, + ] +}) +export class ActivityViewModule { } diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/view-option-policy/view-option-policy.component.html b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/view-option-policy/view-option-policy.component.html new file mode 100644 index 0000000..4fc4168 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/view-option-policy/view-option-policy.component.html @@ -0,0 +1,63 @@ +
    +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Type

    +
    + +
    +
    +
    + type 1 + type 2 +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/view-option-policy/view-option-policy.component.ts b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/view-option-policy/view-option-policy.component.ts new file mode 100644 index 0000000..4188e1c --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-option/activity-view-option/view-option-policy/view-option-policy.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-view-option-policy', + templateUrl: './view-option-policy.component.html', + +}) +export class ViewOptionPolicyComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.component.html b/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.component.html new file mode 100644 index 0000000..7386568 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.component.html @@ -0,0 +1,2424 @@ +
    +
    +
    +

    Overview

    +
    +
    +
    +
    + Hotel-Image +
    +

    Activity name

    + +
    +
    +
    +
    +
    Inventory and Pricing Calendar
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Option Name

    +
    + +
    +
    +
    + Select + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + +
    +
    Options
    +
    +
    + Mon + 1 + jul +
    +
    +
    + Tue + 2 + jul +
    +
    +
    + Wed + 3 + jul +
    +
    +
    + Thus + 4 + jul +
    +
    +
    + Fri + 5 + jul +
    +
    +
    + Sat + 6 + jul +
    +
    +
    + sun + 7 + jul +
    +
    +
    + mon + 8 + jul +
    +
    +
    + Tue + 9 + jul +
    +
    +
    + Wed + 10 + jul +
    +
    +
    + Thus + 11 + jul +
    +
    + + + + +
    + Option Name 1 +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + Status +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    + Allocation +
    +
    +
    + 5 +
    +
    +
    + 20 +
    +
    +
    + Sold Out +
    +
    +
    + 10 +
    +
    +
    + 0 +
    +
    +
    + 50 +
    +
    +
    + 50 +
    +
    +
    + open +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    +
    + Net Sold +
    +
    +
    + 2 +
    +
    +
    + 5 +
    +
    +
    + 3 +
    +
    +
    + 8 +
    +
    +
    + 2 +
    +
    +
    + 23 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 3 +
    +
    +
    + Available +
    +
    +
    + 3 +
    +
    +
    + 15 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 0 +
    +
    +
    + 27 +
    +
    +
    + 48 +
    +
    +
    + 3 +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + Status +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    + Allocation +
    +
    +
    + 5 +
    +
    +
    + 20 +
    +
    +
    + Sold Out +
    +
    +
    + 10 +
    +
    +
    + 0 +
    +
    +
    + 50 +
    +
    +
    + 50 +
    +
    +
    + open +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    +
    + Net Sold +
    +
    +
    + 2 +
    +
    +
    + 5 +
    +
    +
    + 3 +
    +
    +
    + 8 +
    +
    +
    + 2 +
    +
    +
    + 23 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 3 +
    +
    +
    + Available +
    +
    +
    + 3 +
    +
    +
    + 15 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 0 +
    +
    +
    + 27 +
    +
    +
    + 48 +
    +
    +
    + 3 +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + Status +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    + Allocation +
    +
    +
    + 5 +
    +
    +
    + 20 +
    +
    +
    + Sold Out +
    +
    +
    + 10 +
    +
    +
    + 0 +
    +
    +
    + 50 +
    +
    +
    + 50 +
    +
    +
    + open +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    +
    + Net Sold +
    +
    +
    + 2 +
    +
    +
    + 5 +
    +
    +
    + 3 +
    +
    +
    + 8 +
    +
    +
    + 2 +
    +
    +
    + 23 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 3 +
    +
    +
    + Available +
    +
    +
    + 3 +
    +
    +
    + 15 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 0 +
    +
    +
    + 27 +
    +
    +
    + 48 +
    +
    +
    + 3 +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    + + + +
    + Option Name 2 +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + Status +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    + Allocation +
    +
    +
    + 5 +
    +
    +
    + 20 +
    +
    +
    + Sold Out +
    +
    +
    + 10 +
    +
    +
    + 0 +
    +
    +
    + 50 +
    +
    +
    + 50 +
    +
    +
    + open +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    +
    + Net Sold +
    +
    +
    + 2 +
    +
    +
    + 5 +
    +
    +
    + 3 +
    +
    +
    + 8 +
    +
    +
    + 2 +
    +
    +
    + 23 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 3 +
    +
    +
    + Available +
    +
    +
    + 3 +
    +
    +
    + 15 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 0 +
    +
    +
    + 27 +
    +
    +
    + 48 +
    +
    +
    + 3 +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + Status +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + Sold Out +
    +
    +
    +
    +
    +
    + Allocation +
    +
    +
    + 5 +
    +
    +
    + 20 +
    +
    +
    + Sold Out +
    +
    +
    + 10 +
    +
    +
    + 0 +
    +
    +
    + 50 +
    +
    +
    + 50 +
    +
    +
    + open +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    +
    + Net Sold +
    +
    +
    + 2 +
    +
    +
    + 5 +
    +
    +
    + 3 +
    +
    +
    + 8 +
    +
    +
    + 2 +
    +
    +
    + 23 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 3 +
    +
    +
    + Available +
    +
    +
    + 3 +
    +
    +
    + 15 +
    +
    +
    + 2 +
    +
    +
    + 2 +
    +
    +
    + 0 +
    +
    +
    + 27 +
    +
    +
    + 48 +
    +
    +
    + 3 +
    +
    +
    + 0 +
    +
    +
    + 0 +
    +
    + + +
    +
    +
    +
    +
    Activity Details
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Activity Name + + + + Activity Category + + + + Service Duration + + + + Country + + + + City + + + + Activity Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + data.status + + + {{data.room_name}} + {{data.room_view}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + +
    +
    +
    +
    +
    +
    Traveler Details
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Min Traveler + + + + Max_Traveler + + + + + + Supported Pax Types + + + + Max Child Allowed + + + + Free Child Allowed + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + data.status + + + {{data.room_name}} + {{data.room_view}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + +
    +
    +
    +
    +
    +
    Itinerary details
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Default Language + + + + Day Wise Itinerary + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + data.status + + + {{data.room_name}} + {{data.room_view}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + +
    +
    +
    +
    + +
    +
    Season
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Season Name + + + + Date Renge + + + + Season Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + + Status + + + Action + + + + + + + data.status + + + {{data.room_name}} + {{data.room_view}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + +
    +
    +
    +
    +
    +
    Slots
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Slot Name + + + + Slot Start Time + + + + Slot End Time + + + + Cut Off Time + + + + Slot Id + + + + Status + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + data.status + + + {{data.room_name}} + {{data.room_view}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + +
    +
    +
    +
    +
    +
    Activity Option
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Activity Name + + + + Option Name + + + + Date Renge + + + + Currency + + + + Slot Id + + + + Tourist Guide Included + + + + Supported Transfer Type + + + + Transfer Included in Price + + + + Pickup Included + + + + Drop Off Included + + + + Option Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + data.status + + + {{data.room_name}} + {{data.room_view}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + +
    +
    +
    +
    +
    +
    Allocation
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Slot Name + + + + Slot Time + + + + Allocation Date Range + + + + Slot Name + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + data.status + + + {{data.room_name}} + {{data.room_view}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.component.ts b/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.component.ts new file mode 100644 index 0000000..7b65dde --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'activity-overview', + templateUrl: './activity-overview.component.html', + +}) +export class ActivityOverviewComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.module.ts b/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.module.ts new file mode 100644 index 0000000..559af4d --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/activity-overview/activity-overview.module.ts @@ -0,0 +1,57 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; + +import { ButtonModule } from 'primeng/button'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { SlotsAddComponent } from '../slots/slots-add/slots-add.component'; +import { CalendarModule } from 'primeng/calendar'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { ToastModule } from 'primeng/toast'; +import { ActivityOverviewComponent } from './activity-overview.component'; + + + +const routes: Routes = [ + { + path:'', + component:ActivityOverviewComponent, + }, + +] + + +@NgModule({ + declarations: [ + ActivityOverviewComponent + ], + imports: [ + CommonModule, + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ] +}) +export class ActivityOverviewModule { } diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation-add/allocation-add.component.html b/src/app/modules/services/activity/activity-manage/allocation/allocation-add/allocation-add.component.html new file mode 100644 index 0000000..28e191f --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation-add/allocation-add.component.html @@ -0,0 +1,190 @@ + +
    +
    +
    +

    Add Allocation

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    Select
    + +
    + + +
    + One + Two +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Specific Dates + Season +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Select
    + +
    + + +
    + One + Two +
    +
    +
    +
    +
    + +
    +
    +
    Select
    + +
    + + +
    + Monday + Tuesday + Wednesday + Thursday +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Allocation Type

    +
    + +
    +
    +
    + Free Sale + + + Count Sale +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation-add/allocation-add.component.ts b/src/app/modules/services/activity/activity-manage/allocation/allocation-add/allocation-add.component.ts new file mode 100644 index 0000000..b7cf485 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation-add/allocation-add.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-allocation-add', + templateUrl: './allocation-add.component.html', + +}) +export class AllocationAddComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation-edit/allocation-edit.component.html b/src/app/modules/services/activity/activity-manage/allocation/allocation-edit/allocation-edit.component.html new file mode 100644 index 0000000..75f8389 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation-edit/allocation-edit.component.html @@ -0,0 +1,412 @@ +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    +
    + +
    +
    + + + +
    +
    +
    +

    Days

    +
    + +
    +
    + +
    + Monday + Thuesday + Wednesday +
    +
    +
    +
    + +
    + + +
    +
    + + + +
    +
    +

    Allocation

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    + +
    + 1. Count Sale + 2. Free Sale + 3. Stop Sale +
    +
    +
    +
    + +
    +
    + + + + +
    + +
    +
    +
    Date
    +
    +
    Day
    +
    +
    + Allocation Type + +
    +
    +
    + Allocation + +
    +
    +
    + Booked Count +
    +
    +
    + Remaining Count +
    +
    +
    + Release Days + + +
    +
    + 12 Mar 2021 + + Mon + +
    + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    + +
    + Select + Count Sale + Free Sale + Stop Sale +
    +
    +
    + 10 + + 10 + + 10 + + 10 +
    + 13 Mar 2021 + + Tue + + Count Sale + + 2 + + 2 + + 2 + + 2 +
    + 14 Mar 2021 + + Wed + + Count Sale + + 2 + + 2 + + 2 + + 3 +
    + 15 Mar 2021 + + Thus + + Free Sale + + Free Sale + + 2 + + Free Sale + + Free Sale +
    + 19 Mar 2021 + + Tue + + Count Sale + + 4 + + 2 + + 2 + + 2 +
    + 20 Mar 2021 + + Wed + + Stop Sale + + 5 + + 2 + + 2 + + 2 +
    + 21 Mar 2021 + + Thus + + Count Sale + + 7 + + 10 + + 10 + + 10 +
    + 22 Mar 2021 + + Tue + + Free Sale + + Free Sale + + 2 + + Free Sale + + Free Sale +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation-edit/allocation-edit.component.ts b/src/app/modules/services/activity/activity-manage/allocation/allocation-edit/allocation-edit.component.ts new file mode 100644 index 0000000..94db557 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation-edit/allocation-edit.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-allocation-edit', + templateUrl: './allocation-edit.component.html', + +}) +export class AllocationEditComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation-search/allocation-search.component.html b/src/app/modules/services/activity/activity-manage/allocation/allocation-search/allocation-search.component.html new file mode 100644 index 0000000..a0cb5c2 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation-search/allocation-search.component.html @@ -0,0 +1,134 @@ +
    +
    +
    +

    Allocation Search

    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Slot Name +

    +
    + +
    +
    +
    + 1 + 2 + 3 +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Slot Name + + + + Slot Time + + + + Allocation Date Range + + + + Slot Name + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation-search/allocation-search.component.ts b/src/app/modules/services/activity/activity-manage/allocation/allocation-search/allocation-search.component.ts new file mode 100644 index 0000000..ece66df --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation-search/allocation-search.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-allocation-search', + templateUrl: './allocation-search.component.html', + +}) +export class AllocationSearchComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation.component.html b/src/app/modules/services/activity/activity-manage/allocation/allocation.component.html new file mode 100644 index 0000000..58cd0b6 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation.component.html @@ -0,0 +1 @@ +

    allocation works!

    diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation.component.ts b/src/app/modules/services/activity/activity-manage/allocation/allocation.component.ts new file mode 100644 index 0000000..7c8053b --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-allocation', + templateUrl: './allocation.component.html', + +}) +export class AllocationComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/allocation/allocation.module.ts b/src/app/modules/services/activity/activity-manage/allocation/allocation.module.ts new file mode 100644 index 0000000..9adadff --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/allocation/allocation.module.ts @@ -0,0 +1,51 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AllocationAddComponent } from './allocation-add/allocation-add.component'; +import { RouterModule, Routes } from '@angular/router'; +import { AllocationSearchComponent } from './allocation-search/allocation-search.component'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; + +import { ButtonModule } from 'primeng/button'; +import { InputTextModule } from 'primeng/inputtext'; +import { PaginatorModule } from 'primeng/paginator'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { CalendarModule } from 'primeng/calendar'; +import { AllocationEditComponent } from './allocation-edit/allocation-edit.component'; + +const routes: Routes = [ + { + path: 'Add', + component: AllocationAddComponent, + }, + { + path: 'Search', + component: AllocationSearchComponent, + }, + { + path: 'Edit', + component: AllocationEditComponent, + }, +] + +@NgModule({ + declarations: [ + AllocationAddComponent, + AllocationSearchComponent, + AllocationEditComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(routes), + TableModule, + ToolbarModule, + MatMenuModule, + PaginatorModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ButtonModule, + ] +}) +export class AllocationModule { } diff --git a/src/app/modules/services/activity/activity-manage/itinerary/itinerary-language/itinerary-language.component.html b/src/app/modules/services/activity/activity-manage/itinerary/itinerary-language/itinerary-language.component.html new file mode 100644 index 0000000..13eae59 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/itinerary/itinerary-language/itinerary-language.component.html @@ -0,0 +1,189 @@ + +
    +
    +
    +

    Manage Translation

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Translate To

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Default Language Content

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Selected Language Content

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Day Wise Itinerary

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Day Wise Itinerary

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/itinerary/itinerary-language/itinerary-language.component.ts b/src/app/modules/services/activity/activity-manage/itinerary/itinerary-language/itinerary-language.component.ts new file mode 100644 index 0000000..071b875 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/itinerary/itinerary-language/itinerary-language.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-itinerary-language', + templateUrl: './itinerary-language.component.html', +}) +export class ItineraryLanguageComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/itinerary/itinerary.component.html b/src/app/modules/services/activity/activity-manage/itinerary/itinerary.component.html new file mode 100644 index 0000000..be20bca --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/itinerary/itinerary.component.html @@ -0,0 +1,522 @@ +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Default Language

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Day Wise Itinerary

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Country

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    City

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Country

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    City

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Country

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    City

    +
    + +
    +
    +
    + + + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Starting City

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Admission included in price

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Starting City

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Admission included in price

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Inclusions

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Inclusions

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Exclusions

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Activity Id + + + + Default Language + + + + Day Wise Itinerary + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/itinerary/itinerary.component.ts b/src/app/modules/services/activity/activity-manage/itinerary/itinerary.component.ts new file mode 100644 index 0000000..0f5c3d7 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/itinerary/itinerary.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-itinerary', + templateUrl: './itinerary.component.html', +}) +export class ItineraryComponent { + time: Date[] | undefined; +} diff --git a/src/app/modules/services/activity/activity-manage/itinerary/itinerary.module.ts b/src/app/modules/services/activity/activity-manage/itinerary/itinerary.module.ts new file mode 100644 index 0000000..13d8b61 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/itinerary/itinerary.module.ts @@ -0,0 +1,54 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { ItineraryLanguageComponent } from './itinerary-language/itinerary-language.component'; +import { ItineraryComponent } from './itinerary.component'; +import { CalendarModule } from 'primeng/calendar'; + +const routes: Routes = [ + { + path: 'Language', + component:ItineraryLanguageComponent, + }, + { + path: '', + component:ItineraryComponent, + }, +] +@NgModule({ + declarations: [ + ItineraryComponent, + ItineraryLanguageComponent + ], + imports: [ + ToastModule, + TableModule, + DialogModule, + CommonModule, + FileUploadModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + RouterModule.forChild(routes), + ], +}) +export class ItineraryModule { } diff --git a/src/app/modules/services/activity/activity-manage/media/media.component.html b/src/app/modules/services/activity/activity-manage/media/media.component.html new file mode 100644 index 0000000..1308a2c --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/media/media.component.html @@ -0,0 +1,114 @@ +
    +
    +
    +

    Add Image

    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Image Category

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Image City

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + Add Images + + +
    + Note: Upload jpeg/png with max file size upto + 500kb. Height + 200px and Width 800px. +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    Add Video

    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/media/media.component.ts b/src/app/modules/services/activity/activity-manage/media/media.component.ts new file mode 100644 index 0000000..ba4434c --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/media/media.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-media', + templateUrl: './media.component.html', +}) +export class MediaComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/media/media.module.ts b/src/app/modules/services/activity/activity-manage/media/media.module.ts new file mode 100644 index 0000000..6adc730 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/media/media.module.ts @@ -0,0 +1,50 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { MediaComponent } from './media.component'; + +const routes: Routes = [ + { + path: '', + component:MediaComponent, + }, +] +@NgModule({ + declarations: [MediaComponent], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ], + exports:[ + MediaComponent + ] +}) +export class MediaModule { } diff --git a/src/app/modules/services/activity/activity-manage/required-info/required-info.component.html b/src/app/modules/services/activity/activity-manage/required-info/required-info.component.html new file mode 100644 index 0000000..7164931 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/required-info/required-info.component.html @@ -0,0 +1,285 @@ +
    +
    +
    +

    Here's what we'll collect automatically:

    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    Required Information for All Travelers

    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    Personal Details

    +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Passport Details

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Departure Flight Details

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Arrival Flight Details

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Departure Ship Details

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Arrival Ship Details

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Shore Excursion Details

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Departure Train Details

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Arrival Train Details

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/required-info/required-info.component.ts b/src/app/modules/services/activity/activity-manage/required-info/required-info.component.ts new file mode 100644 index 0000000..3f57101 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/required-info/required-info.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-required-info', + templateUrl: './required-info.component.html', +}) +export class RequiredInfoComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/required-info/required-info.module.ts b/src/app/modules/services/activity/activity-manage/required-info/required-info.module.ts new file mode 100644 index 0000000..b9d1e5f --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/required-info/required-info.module.ts @@ -0,0 +1,50 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { RequiredInfoComponent } from './required-info.component'; + +const routes: Routes = [ + { + path: '', + component:RequiredInfoComponent, + }, +] +@NgModule({ + declarations: [RequiredInfoComponent], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ], + exports:[ + RequiredInfoComponent + ] +}) +export class RequiredInfoModule { } diff --git a/src/app/modules/services/activity/activity-manage/season/season-add/season-add.component.html b/src/app/modules/services/activity/activity-manage/season/season-add/season-add.component.html new file mode 100644 index 0000000..dd5ad35 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/season/season-add/season-add.component.html @@ -0,0 +1,123 @@ + +
    +
    +
    +

    Add Season

    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/season/season-add/season-add.component.ts b/src/app/modules/services/activity/activity-manage/season/season-add/season-add.component.ts new file mode 100644 index 0000000..1f8cf41 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/season/season-add/season-add.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-season-add', + templateUrl: './season-add.component.html', +}) +export class SeasonAddComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/season/season-search/season-search.component.html b/src/app/modules/services/activity/activity-manage/season/season-search/season-search.component.html new file mode 100644 index 0000000..dd2b8fa --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/season/season-search/season-search.component.html @@ -0,0 +1,116 @@ +
    +
    +
    +

    Season Search

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Season Name + + + + Date Renge + + + + Season Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + + Status + + + Action + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/season/season-search/season-search.component.ts b/src/app/modules/services/activity/activity-manage/season/season-search/season-search.component.ts new file mode 100644 index 0000000..ccb2f4c --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/season/season-search/season-search.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-season-search', + templateUrl: './season-search.component.html', +}) +export class SeasonSearchComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/season/season.component.ts b/src/app/modules/services/activity/activity-manage/season/season.component.ts new file mode 100644 index 0000000..27405b1 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/season/season.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-season', + templateUrl: './season.component.html', +}) +export class SeasonComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/season/season.module.ts b/src/app/modules/services/activity/activity-manage/season/season.module.ts new file mode 100644 index 0000000..cf26e5f --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/season/season.module.ts @@ -0,0 +1,44 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { InputTextModule } from 'primeng/inputtext'; +import { PaginatorModule } from 'primeng/paginator'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { SeasonAddComponent } from './season-add/season-add.component'; +import { SeasonSearchComponent } from './season-search/season-search.component'; +import { CalendarModule } from 'primeng/calendar'; + + +const routes: Routes = [ + { + path: 'Search', + component: SeasonSearchComponent, + }, + { + path: 'Add', + component: SeasonAddComponent, + }, +] +@NgModule({ + declarations: [ + SeasonSearchComponent, + SeasonAddComponent, + ], + imports: [ + CommonModule, + TableModule, + ToolbarModule, + MatMenuModule, + PaginatorModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ButtonModule, + RouterModule.forChild(routes) + ] +}) +export class SeasonModule { } diff --git a/src/app/modules/services/activity/activity-manage/slots/slots-add/slots-add.component.html b/src/app/modules/services/activity/activity-manage/slots/slots-add/slots-add.component.html new file mode 100644 index 0000000..87c2017 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/slots/slots-add/slots-add.component.html @@ -0,0 +1,105 @@ + +
    +
    +
    +

    Add slots

    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    + + + +
    + +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/slots/slots-add/slots-add.component.ts b/src/app/modules/services/activity/activity-manage/slots/slots-add/slots-add.component.ts new file mode 100644 index 0000000..1fb8bc0 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/slots/slots-add/slots-add.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-slots-add', + templateUrl: './slots-add.component.html', + +}) +export class SlotsAddComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/slots/slots-search/slots-search.component.html b/src/app/modules/services/activity/activity-manage/slots/slots-search/slots-search.component.html new file mode 100644 index 0000000..80f79e5 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/slots/slots-search/slots-search.component.html @@ -0,0 +1,124 @@ +
    +
    +
    +

    Slots Search

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Slot Name + + + + Slot Start Time + + + + Slot End Time + + + + Cut Off Time + + + + Slot Id + + + + Status + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/slots/slots-search/slots-search.component.ts b/src/app/modules/services/activity/activity-manage/slots/slots-search/slots-search.component.ts new file mode 100644 index 0000000..f98a162 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/slots/slots-search/slots-search.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-slots-search', + templateUrl: './slots-search.component.html', + +}) +export class SlotsSearchComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/slots/slots.component.html b/src/app/modules/services/activity/activity-manage/slots/slots.component.html new file mode 100644 index 0000000..b6b39f4 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/slots/slots.component.html @@ -0,0 +1 @@ +

    slots works!

    diff --git a/src/app/modules/services/activity/activity-manage/slots/slots.component.ts b/src/app/modules/services/activity/activity-manage/slots/slots.component.ts new file mode 100644 index 0000000..d4646d2 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/slots/slots.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-slots', + standalone: true, + imports: [], + templateUrl: './slots.component.html', + styleUrl: './slots.component.css' +}) +export class SlotsComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/slots/slots.module.ts b/src/app/modules/services/activity/activity-manage/slots/slots.module.ts new file mode 100644 index 0000000..b29b07e --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/slots/slots.module.ts @@ -0,0 +1,46 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { SlotsAddComponent } from './slots-add/slots-add.component'; +import { SlotsSearchComponent } from './slots-search/slots-search.component'; +import { TableModule } from 'primeng/table'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; + +import { ButtonModule } from 'primeng/button'; +import { InputTextModule } from 'primeng/inputtext'; +import { PaginatorModule } from 'primeng/paginator'; +import { ToolbarModule } from 'primeng/toolbar'; +import { CalendarModule } from 'primeng/calendar'; + + +const routes: Routes = [ + { + path:'Add', + component:SlotsAddComponent, + }, + { + path:'Search', + component:SlotsSearchComponent, + }, +] + +@NgModule({ + declarations: [ + SlotsAddComponent, + SlotsSearchComponent + ], + imports: [ + CommonModule, + TableModule, + ToolbarModule, + MatMenuModule, + PaginatorModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ButtonModule, + RouterModule.forChild(routes), + ] +}) +export class SlotsModule { } diff --git a/src/app/modules/services/activity/activity-manage/travel-details/travel-details.component.html b/src/app/modules/services/activity/activity-manage/travel-details/travel-details.component.html new file mode 100644 index 0000000..bbf421b --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/travel-details/travel-details.component.html @@ -0,0 +1,565 @@ +
    +
    +
    +

    Add Traveler Details

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Min Travelers (Per Booking)

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Travelers (Per Booking)

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Age From

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Age To

    +
    + +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Age From

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Age To

    +
    + +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Age From

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Age To

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Age From

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Age To

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Allowed

    +
    + +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Max Free Child

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Free Child Age From

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Free Child Age To

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    + + +
    +
    +
    + + + +
    +
    +
    +

    Paid Child (pricing range count)

    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Paid Child Age From

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Paid Child Age To

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Paid Child Age From

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Paid Child Age To

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Activity Id + + + + Min Traveler + + + + Max Traveler + + + + Supported Pax Types + + + + Max Child Allowed + + + + Free Child Allowed + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-manage/travel-details/travel-details.component.ts b/src/app/modules/services/activity/activity-manage/travel-details/travel-details.component.ts new file mode 100644 index 0000000..768fd09 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/travel-details/travel-details.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-travel-details', + templateUrl: './travel-details.component.html', +}) +export class TravelDetailsComponent { + +} diff --git a/src/app/modules/services/activity/activity-manage/travel-details/travel-details.module.ts b/src/app/modules/services/activity/activity-manage/travel-details/travel-details.module.ts new file mode 100644 index 0000000..3d532b4 --- /dev/null +++ b/src/app/modules/services/activity/activity-manage/travel-details/travel-details.module.ts @@ -0,0 +1,50 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TravelDetailsComponent } from './travel-details.component'; + +const routes: Routes = [ + { + path: '', + component:TravelDetailsComponent, + }, +] +@NgModule({ + declarations: [TravelDetailsComponent], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ], + exports:[ + TravelDetailsComponent + ] +}) +export class TravelDetailsModule { } diff --git a/src/app/modules/services/activity/activity-search/activity-search.component.html b/src/app/modules/services/activity/activity-search/activity-search.component.html new file mode 100644 index 0000000..33196c3 --- /dev/null +++ b/src/app/modules/services/activity/activity-search/activity-search.component.html @@ -0,0 +1,244 @@ +
    +
    +
    +

    Activity Master Search

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Activity Category

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Pax Type

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Service Duration

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Activity Name + + + + Activity Category + + + + Country + + + + City + + + + Pax Type + + + + Service Duration + + + + Free Child Allowed + + + + Pickup Included + + + + Drop Off Included + + + + Service Langauge + + + + Status + + + + Activity Id + + + + Activity Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/activity/activity-search/activity-search.component.ts b/src/app/modules/services/activity/activity-search/activity-search.component.ts new file mode 100644 index 0000000..93fbe13 --- /dev/null +++ b/src/app/modules/services/activity/activity-search/activity-search.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity-search', + templateUrl: './activity-search.component.html', +}) +export class ActivitySearchComponent { + +} diff --git a/src/app/modules/services/activity/activity.component.html b/src/app/modules/services/activity/activity.component.html new file mode 100644 index 0000000..781e721 --- /dev/null +++ b/src/app/modules/services/activity/activity.component.html @@ -0,0 +1 @@ +

    activity works!

    diff --git a/src/app/modules/services/activity/activity.component.ts b/src/app/modules/services/activity/activity.component.ts new file mode 100644 index 0000000..dab638b --- /dev/null +++ b/src/app/modules/services/activity/activity.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-activity', + templateUrl: './activity.component.html', +}) +export class ActivityComponent { + +} diff --git a/src/app/modules/services/activity/activity.module.ts b/src/app/modules/services/activity/activity.module.ts new file mode 100644 index 0000000..4eefef2 --- /dev/null +++ b/src/app/modules/services/activity/activity.module.ts @@ -0,0 +1,73 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { ActivityAddComponent } from './activity-add/activity-add.component'; +import { ActivitySearchComponent } from './activity-search/activity-search.component'; +import { ActivityComponent } from './activity.component'; +import { ActivityLanguageComponent } from './activity-language/activity-language.component'; + +const routes: Routes = [ + { + path: 'Search', + component:ActivitySearchComponent, + }, + { + path: 'Add', + component:ActivityAddComponent, + }, + { + path: 'Language', + component:ActivityLanguageComponent, + }, + { + path: '', + component:ActivityComponent, + }, + { + path: 'Manage', + loadChildren: () => + import('./activity-manage/activity-manage.module').then( + (m) => m.ActivityManageModule + ), + }, +] +@NgModule({ + declarations: [ + ActivityComponent, + ActivitySearchComponent, + ActivityAddComponent, + ActivityLanguageComponent + ], + imports: [ + ToastModule, + TableModule, + DialogModule, + CommonModule, + FileUploadModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + RouterModule.forChild(routes), + ], +}) +export class ActivityModule { } diff --git a/src/app/modules/services/flight-inventory-report/flight-inventory-report-search/flight-inventory-report-search.component.html b/src/app/modules/services/flight-inventory-report/flight-inventory-report-search/flight-inventory-report-search.component.html new file mode 100644 index 0000000..ec6c239 --- /dev/null +++ b/src/app/modules/services/flight-inventory-report/flight-inventory-report-search/flight-inventory-report-search.component.html @@ -0,0 +1,330 @@ + + +
    +
    +
    +

    Flight Inventory Report

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Airline

    +
    + +
    +
    +
    + {{item.airline_name}} + ({{item.airline_code}}) + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Trip Type

    +
    + +
    +
    +
    + Select + One Way + Round Trip +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Origin

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Destination

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    +
    + + + + Please + select from date +
    +
    +
    +
    + + + Please + select to date +
    +
    +
    +
    + + + +
    +
    +
    +

    Cabin Class

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    RBD

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Airline + + + + Flight No. + + + + Trip Type + + + + Origin + + + + Destination + + + + Day + + + + Departure Date + + + + Return Date + + + + RBD + + + + Fare Family Name + + + + Cabin Class + + + + Seats Allocation + + + + Booked Seats + + + + Remaining Seats + + + + Cancelled Seats + + + + PNR + + + + Stop Sale + + + + + + + {{data.validating_airline}} + {{data.flight_no}} + {{data.trip_type}} + {{data.origin}} + {{data.destination}} + {{data.day}} + {{data.departure_date}} + {{data.return_date}} + {{data.rbd}} + {{data.fare_family_name}} + {{data.cabin_class}} + {{data.seat_allocation}} + {{data.seat_booked}} + {{data.seat_remains}} + {{data.seat_cancelled}} + {{data.pnr}} + {{data.is_stop_sale}} + + + + + No data found + + +
    +
    + diff --git a/src/app/modules/services/flight-inventory-report/flight-inventory-report-search/flight-inventory-report-search.component.ts b/src/app/modules/services/flight-inventory-report/flight-inventory-report-search/flight-inventory-report-search.component.ts new file mode 100644 index 0000000..0d6af27 --- /dev/null +++ b/src/app/modules/services/flight-inventory-report/flight-inventory-report-search/flight-inventory-report-search.component.ts @@ -0,0 +1,132 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; +import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service'; + +@Component({ + selector: 'app-flight-inventory-report-search', + templateUrl: './flight-inventory-report-search.component.html', +}) +export class FlightInventoryReportSearchComponent implements OnInit { + + Formdata: FormGroup; + AirlineList; + FlightAllReport; + constructor( + public ApiServ: API, + public fb: FormBuilder, + public router: Router, + public _commonService: CommonFunctionService, + public _staticService: StaticDataService, + public _flightContractService: FlightContractService, + public validationService: ValidationService + ) { } + + trip_type_list = [ + {key: '', display_name:'Select'}, + {key: 'ONEWAY', display_name:'One way'}, + {key: 'ROUNDTRIP', display_name:'Round Trip'}, + ] + cols: any[]; + ngOnInit(): void { + this.pageSetUp() + } + pageSetUp() { + this.OnInitForm(); + this.cols = [ + { field: 'validating_airline', header: 'Airline' }, + { field: 'flight_no', header: ' Flight No.' }, + { field: 'trip_type', header: ' Trip Type.' }, + { field: "origin", header: 'Origin' }, + { field: 'destination', header: 'Destination' }, + { field: 'departure_date', header: 'Date' }, + { field: 'return_date', header: 'Return Date' }, + { field: 'day', header: 'Day' }, + { field: 'rbd', header: 'RBD' }, + { field: 'fare_family_name', header: 'Fare Family Name' }, + { field: 'cabin_class', header: 'Cabin Class' }, + { field: 'seat_allocation', header: ' Seats Allocation' }, + { field: 'seat_booked', header: 'Booked Seats' }, + { field: 'seat_remains', header: 'Remaining Seats' }, + { field: 'seat_cancelled', header: 'cancelled Seats' }, + { field: 'pnr', header: 'PNR' }, + { field: 'is_stop_sale', header: 'Stop Sale' }, + ]; + }; + plusDate = new Date(new Date().setMonth(new Date().getMonth() + 1)) + OnInitForm() { + this.Formdata = this.fb.group({ + vendor_id: [], + validating_airline: [], + flight_no: [], + trip_type: [], + origin: [], + destination: [], + return_date: [], + from_date: [new Date(), Validators.required], + to_date: [this.plusDate, Validators.required], + rbd: [], + cabin_class: [], + }); + if (this._commonService.clientId == '2109111018200000021') { + this.Formdata.get('trip_type').setValue('ONEWAY'); + } + }; + changeFormDate() { + let max = new Date(this.Formdata.get('to_date').value); + this.plusDate = new Date(this.Formdata.get('from_date').value); + if (this.plusDate > max) { + this.Formdata.get('to_date').setValue(null) + } + }; + ResetForm() { + this.Formdata.reset(); + // remove this when User want + if (this._commonService.clientId == '2109111018200000021') { + this.Formdata.get('trip_type').setValue('ONEWAY'); + } + this.plusDate = new Date(); + }; + GetAllFlightInventory() { + let value = this.Formdata.getRawValue(); + if (this.Formdata.valid) { + let searchobject = { + vendor_id: value.vendor_id ? value.vendor_id : '', + validating_airline: value.validating_airline ? value.validating_airline : '', + flight_no: value.flight_no ? value.flight_no : '', + trip_type: value.trip_type ? value.trip_type : '', + origin: value.origin ? value.origin : '', + destination: value.destination ? value.destination : '', + rbd: value.rbd ? value.rbd : '', + cabin_class: value.cabin_class ? value.cabin_class : '', + return_date: value.return_date ? value.return_date : '', + }; + searchobject['from_date'] = this._commonService.convertDateToSave(value.from_date); + searchobject['to_date'] = this._commonService.convertDateToSave(value.to_date); + this.ApiServ.Post('/FlightContract/GetFlightInventoryReport', searchobject).subscribe(res => { + if (res && res['data']) { + this.FlightAllReport = res['data']; + if (this.FlightAllReport && this.FlightAllReport.length > 0) { + this.FlightAllReport.forEach(e => { + e['is_stop_sale'] = e.is_stop_sale ? 'Yes' : 'No'; + e['departure_date'] = e.departure_date ? this._commonService.convertDateToShow(e.departure_date) : ''; + e['return_date'] = (e.return_date === '0001-01-01T00:00:00Z' || !e.return_date) + ? 'NA' + : this._commonService.UtcToLocaleTime(e.return_date, 'DD MMM YYYY, HH:mm:ss'); + }); + } + } else { + this._commonService.showMessage(res['status'], res['message']); + this.FlightAllReport = []; + } + }); + } else { + this.validationService.showValidationsMsg(this.Formdata); + } + }; + +} diff --git a/src/app/modules/services/flight-inventory-report/flight-inventory-report.module.ts b/src/app/modules/services/flight-inventory-report/flight-inventory-report.module.ts new file mode 100644 index 0000000..fa5d4da --- /dev/null +++ b/src/app/modules/services/flight-inventory-report/flight-inventory-report.module.ts @@ -0,0 +1,57 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Routes, RouterModule } from '@angular/router'; +import { FlightInventoryReportSearchComponent } from './flight-inventory-report-search/flight-inventory-report-search.component'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'primeng/calendar'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TableModule } from 'primeng/table'; +import { MatMenuModule } from '@angular/material/menu'; +import { InputTextModule } from 'primeng/inputtext'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MessageService } from 'primeng/api'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { ButtonModule } from 'primeng/button'; +import { CheckboxModule } from 'primeng/checkbox'; +import { ToastModule } from 'primeng/toast'; +import { TreeModule } from 'primeng/tree'; +import { TreeSelectModule } from 'primeng/treeselect'; +import { TreeTableModule } from 'primeng/treetable'; +import { TriStateCheckboxModule } from 'primeng/tristatecheckbox'; +import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service'; + +const routes: Routes = [ + { + path: 'Search', + component: FlightInventoryReportSearchComponent, + }, +] + +@NgModule({ + declarations: [ + FlightInventoryReportSearchComponent + ], + imports: [ + TableModule, + CommonModule, + MatMenuModule, + ToolbarModule, + ToastModule, + InputTextModule, + MatCheckboxModule, + TreeModule, + TreeSelectModule, + TreeTableModule, + ButtonModule, + CheckboxModule, + TriStateCheckboxModule, + FormsModule, + NgSelectModule, + MatButtonModule, + ReactiveFormsModule, + CalendarModule, + RouterModule.forChild(routes), + ], providers: [MessageService,FlightContractService], +}) +export class FlightInventoryReportModule { } diff --git a/src/app/modules/services/flight-inventory/flight-inventory-add/flight-inventory-add.component.html b/src/app/modules/services/flight-inventory/flight-inventory-add/flight-inventory-add.component.html new file mode 100644 index 0000000..dc50de6 --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-add/flight-inventory-add.component.html @@ -0,0 +1,1589 @@ + + +
    +
    +
    +

    Add Flight Inventory

    +
    +
    +
    +
    +
    +
    + + + Please + enter contract name +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Trip Type

    +
    + +
    +
    +
    + One Way + Round + Trip +
    + Please + select trip type +
    +
    +
    + One-way sale allowed +
    +
    +
    + + + +
    +
    +
    +

    Origin

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    + Please + select origin +
    +
    +
    +
    + + + +
    +
    +
    +

    Destination

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    + Please + select destination +
    +
    +
    +
    + + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Currency Code

    +
    + +
    +
    +
    + + + {{item.currency_code}} + +
    + Please + select currency code +
    +
    +
    +
    + + + +
    +
    +
    +

    Confirmation Type

    +
    + +
    +
    + +
    +
    + Please + select confirmation type +
    +
    +
    +
    + + + +
    +
    +
    +

    Contracted Cabins

    +
    + +
    +
    + +
    +
    + Please + select contracted cabins +
    +
    +
    +
    + + + +
    +
    +
    +

    Contracted Pax Types

    +
    + +
    +
    + +
    +
    + Please + select contracted pax types +
    +
    +
    +
    + + + +
    +
    +
    +

    Validating Airline

    +
    + +
    +
    +
    + {{item.airline_name}} + ({{item.airline_code}}) + +
    + Please + select validating airline +
    +
    +
    +
    +
    +
    + Multi Day + Operation + +
    +
    +
    +
    +
    +
    +
    + + + Please + select departure date +
    +
    + + + +
    +
    +
    +

    Multi Day Operation Type

    +
    + +
    +
    + +
    +
    + Please + select multi day operation type + +
    +
    +
    +
    +
    + + + Please + select return date +
    +
    +
    +
    + + + Please + select operation valid from +
    +
    +
    +
    + + + Please + select operation valid to +
    +
    +
    +
    + + + +
    + +
    Departure Days
    +
    + +
    +
    +
    +
    + Please + select departure + days +
    +
    + +
    +
    + + + Please + select departure dates +
    +
    +
    + +
    +
    +
    + Nearby + Airports +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
    +

    Nearby From Airports

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Nearby To Airports

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    +
    +
    + +
    +
    +
    +

    Outbound Flight

    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + + +
    +
    +
    +

    Airline Code

    +
    + +
    +
    +
    + {{item.airline_name}} + ({{item.airline_code}}) + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    +

    Aircraft Type

    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +

    Origin

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    + +
    + + +
    +
    +
    +

    Destination

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +

    Hours

    +
    + +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +

    Minutes

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + Next Day Arrival + +
    +
    + +
    +
    + + +
    +
    +
    +

    Hours

    +
    + +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +

    Minutes

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + Departure Next + Day +
    +
    + +
    +
    + + +
    +
    +
    +

    Hours

    +
    + +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +

    Minutes

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    Inbound Flight

    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + + +
    +
    +
    +

    Airline Code

    +
    + +
    +
    +
    + {{item.airline_code}} + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    +

    Aircraft Type

    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +

    Origin

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    + +
    + + +
    +
    +
    +

    Destination

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +

    Hours

    +
    + +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +

    Minutes

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + Next Day Arrival + +
    +
    + +
    +
    + + +
    +
    +
    +

    Hours

    +
    + +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +

    Minutes

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +

    Hours

    +
    + +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +

    Minutes

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + Departure Next Day +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    Fare Details

    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + + +
    +
    +
    +

    Outbound Days

    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +

    Fare Family Group

    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    +

    Cabin Class

    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + + +
    +
    +
    +

    Outbound Days

    +
    + +
    +
    + +
    +
    +
    +
    +
    + Apply discount with same VC Only +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + Checked Bag Included +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    +

    check bag unit

    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    +

    Cabin Bag Unit

    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +

    Refund Type

    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    +

    Meal Included

    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + Active +
    +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/flight-inventory/flight-inventory-add/flight-inventory-add.component.ts b/src/app/modules/services/flight-inventory/flight-inventory-add/flight-inventory-add.component.ts new file mode 100644 index 0000000..cec03da --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-add/flight-inventory-add.component.ts @@ -0,0 +1,1017 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { MessageService } from 'primeng/api'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { FlightContractReq, FlightContracts, FlightRateArray } from 'src/app/core/models/flight-service/flight-contracts.model'; +import { API } from 'src/app/core/services/api.service'; +import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service'; +import { BreakpointsService } from 'src/app/core/services/breakpoints.services'; + +@Component({ + selector: 'app-flight-inventory-add', + templateUrl: './flight-inventory-add.component.html', +}) +export class FlightInventoryAddComponent implements OnInit { + allAirpotList = { + fromAirList: [], + toAirList: [], + origin1AirList: [], + origin2AirList: [], + destination1AirList: [], + destination2AirList: [], + }; + allAirCraftList: any; + allAirLineList: any; + IsMobile; + ReturnDateMinDate = new Date(); + allDaysSelected: boolean; + + constructor( + public ApiServ: API, + public Fb: FormBuilder, + private activateRoute: ActivatedRoute, + public validationService: ValidationService, + public _staticService: StaticDataService, + public MsgService: MessageService, + public router: Router, + public _flightContractService: FlightContractService, + public _commonService: CommonFunctionService, + public brkpointsrv: BreakpointsService + ) { + // console.log(brkpointsrv.IsMobile.getValue()) + } + Formdata: FormGroup; + CurrencyList; + AirCabinClassList; + AirPaxTypeList; + lovKeyDataObj = { + AirCabinClass: [], + AirPaxType: [], + AirTripType: [], + DaySelect: [], + AirBaggageUnit: [], + AirFareType: [], + }; + AirportListFrom; + AirportListTO; + AirlineList; + AllAircraftTypeList; + minDate; + // static dropdown value + + MultiDayType = [ + { value: 'RANGE', displayName: 'Range' }, + { value: 'SPECIFICDATES', displayName: 'Specific Dates' }, + ]; + + RefundType = [ + { value: 'Refundale', displayName: 'Refundale' }, + { value: 'Non-Refundale', displayName: 'Non-Refundale' }, + ]; + + staticCurrency = [ + { value: 'INR', displayName: 'Indian Rupees' }, + { value: 'USD', displayName: 'US Dollar' }, + ]; + tripType = [ + { value: 'ONEWAY', displayName: 'One Way' }, + { value: 'ROUNDTRIP', displayName: 'Round Trip' }, + ]; + + FareFamilyList = []; + ngOnInit(): void { + this.OnInitForm(); + this._commonService.GetCurrencyList('ALL'); + this.GetFlightContract() + for (let index = 1; index <= 3; index++) { + this.FareFamilyList.push(index) + }; + const date = new Date(); + const year = date.getFullYear(); + const month = date.getMonth(); + const day = date.getDate(); + this.minDate = new Date(year, month, day); + this.IsMobile = this.brkpointsrv.IsMobile.getValue(); + } + + ToasterMsg(msg) { + this.MsgService.add({ + severity: "error", + detail: msg, + }); + } + + OnInitForm() { + this.Formdata = this.Fb.group({ + contract_name: this.validationService.required, + contract_description: [''], + trip_type: this.validationService.required, + origin: this.validationService.required, + destination: this.validationService.required, + pnr: [''],// pass value on flight rate + currency_code: this.validationService.required, + is_instant_confirmation: ['INSTANT', Validators.required],// pass value on flight rate + contracted_cabin_class: this.validationService.required, + contracted_pax_type: this.validationService.required, + validating_airline: this.validationService.required, + // is_multi_day: [false], + is_nearby_airports: [false], + outbound: this.Fb.array([ + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: this.validationService.required, + to_airport: this.validationService.required, + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: [''], + is_next_day_arrival: [false], + arrival_hour: this.validationService.required, + arrival_minutes: this.validationService.required, + arrival_terminal: [''], + flying_duration_hour: this.validationService.required, + flying_duration_minutes: this.validationService.required, + is_next_day_departure: [false], + }) + ]), + inbound: this.Fb.array([]), + FlightsRate: this.Fb.array([ + this.Fb.group({ + rbd: this.validationService.required, + fare_family_group_id: this.validationService.required, + fare_family_name: this.validationService.required, + cabin_class: this.validationService.required, + adt_base_fare: this.validationService.decimal, + adt_tax: this.validationService.decimal, + // chd_base_fare: [], + // chd_tax: [], + // inf_base_fare: [], + // inf_tax: [], + + // fare_type_applicability: ['BOTH', Validators.required], + // round_trip_discount_type: [''], + // adult_round_trip_discount: [null], + + seat_allocation: this.validationService.number, + // is_allocation_update_due_cancel: this.validationService.required, + // seat_booked: [], + // seat_remaining: [], + is_checked_bag_included: [false], + is_apply_discount_with_same_vc_only: [false], + adt_check_bag: [{ value: '', disabled: true }], + // chd_check_bag: [], + // inf_check_bag: [], + _check_bag_unit: [{ value: '', disabled: true }], + adt_cabin_bag: this.validationService.required, + _cabin_bag_unit: this.validationService.required, + refund_type: this.validationService.required, + adt_fare_rule: this.validationService.required, + // chd_fare_rule: [], + // inf_fare_rule: [], + is_meal_included: this.validationService.required, + meal_details: [{ value: '', disabled: true }], + inclusions: [], + }) + ]), + is_active: [false] + }); + if(this._commonService.clientId == '2109111018200000021') { + this.Formdata.get('trip_type').setValue('ONEWAY'); + this.UpdateTripType(); + } + this.Formdata.get('contracted_pax_type').setValue(['A']); + this.UpdateMultiDayOperation(); + }; + + get inbound() { + return this.Formdata.get('inbound') as FormArray; + } + get outbound() { + return this.Formdata.get('outbound') as FormArray; + } + get FlightsRate() { + return this.Formdata.get('FlightsRate') as FormArray; + } + get FlightRateDetail() { + return this.Formdata.get('FlightRateDetail') as FormArray; + } + + addFlightGroupBtn(check) { + let formgroup = check ? this.inbound : this.outbound + formgroup.push( + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: this.validationService.required, + to_airport: this.validationService.required, + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: [''], + is_next_day_arrival: [false], + arrival_hour: this.validationService.required, + arrival_minutes: this.validationService.required, + arrival_terminal: [''], + flying_duration_hour: this.validationService.required, + flying_duration_minutes: this.validationService.required, + is_next_day_departure: [false], + }) + ); + }; + addFlightsRateGroupBtn() { + this.FlightsRate.push( + this.Fb.group({ + rbd: this.validationService.required, + fare_family_group_id: this.validationService.required, + fare_family_name: this.validationService.required, + cabin_class: this.validationService.required, + adt_base_fare: this.validationService.decimal, + adt_tax: this.validationService.decimal, + seat_allocation: this.validationService.number, + is_checked_bag_included: [false], + is_apply_discount_with_same_vc_only: [false], + adt_check_bag: [{ value: '', disabled: true }], + _check_bag_unit: [{ value: '', disabled: true }], + adt_cabin_bag: this.validationService.required, + _cabin_bag_unit: this.validationService.required, + refund_type: this.validationService.required, + adt_fare_rule: this.validationService.required, + is_meal_included: this.validationService.required, + meal_details: [], + inclusions: [], + }) + ); + this.AddUpdatePaxWiseControls(); + this.UpdateFlightsRateFormGroup(); + }; + AddUpdatePaxWiseControls() { + let val = this.Formdata.get('contracted_pax_type').value; + let grp = this.FlightsRate.controls[this.FlightsRate.controls.length - 1]; + if (val?.includes('C')) this.UpdatePaxWiseControls(grp, 'chd', true); + if (val?.includes('I')) this.UpdatePaxWiseControls(grp, 'inf', true); + }; + + UpdateAllPaxWiseControls() { + let val = this.Formdata.get('contracted_pax_type').value; + this.FlightsRate.controls.forEach(e => { + val.includes('C') ? this.UpdatePaxWiseControls(e, 'chd', true) : this.UpdatePaxWiseControls(e, 'chd', false); + val.includes('I') ? this.UpdatePaxWiseControls(e, 'inf', true) : this.UpdatePaxWiseControls(e, 'inf', false); + }); + }; + UpdatePaxWiseControls(group, name, check) { + let grp = group as FormGroup; + let discountName = name == 'chd' ? 'child' : 'infant'; + let trip_type = this.Formdata.controls['trip_type'].value; + if (check) { + grp.addControl(name + '_base_fare', this.validationService.decimal); + grp.addControl(name + '_tax', this.validationService.decimal); + grp.addControl(name + '_check_bag', this.Fb.control({ value: null, disabled: true })); + grp.addControl(name + '_cabin_bag', this.validationService.required); + grp.addControl(name + '_fare_rule', this.validationService.required); + trip_type == 'ONEWAY' ? grp.addControl(discountName + '_round_trip_discount', this.Fb.control(null)) : ''; + } else { + grp.removeControl(name + '_base_fare'); + grp.removeControl(name + '_tax'); + grp.removeControl(name + '_check_bag'); + grp.removeControl(name + '_cabin_bag'); + grp.removeControl(name + '_fare_rule'); + grp.removeControl(discountName + '_round_trip_discount'); + } + this.UpdateBag(grp) + }; + + removeFlightGroupBtn(ind, check) { + let formgroup = check ? this.inbound : this.outbound + formgroup.removeAt(ind); + }; + + removeFlightsRateGroupBtn(ind) { + this.FlightsRate.removeAt(ind); + }; + RemoveFlightrRoundArr() { + this.Formdata.removeControl('FlightRateDetail'); + }; + plusDate = new Date() + changeFormDate() { + let max = new Date(this.Formdata.get('operation_to').value); + this.plusDate = new Date(this.Formdata.get('operation_from').value); + if (this.plusDate > max) { + this.Formdata.get('operation_to').setValue(null); + } + }; + UpdateBag(grp) { + let group = grp as FormGroup; + let controls = [ + 'adt_check_bag', + 'chd_check_bag', + 'inf_check_bag', + '_check_bag_unit', + // 'adt_cabin_bag', + // 'chd_cabin_bag', + // 'inf_cabin_bag', + // '_cabin_bag_unit', + ]; + if (group.get('is_checked_bag_included').value) controls.forEach(e => this.UpdateControlsValidation(group, e, 'add')); + else controls.forEach(e => this.UpdateControlsValidation(group, e, 'remove')); + if (group.get('is_checked_bag_included').value) controls.forEach(e => group.get(e)?.enable()); + else { + controls.forEach(e => { + group.get(e)?.disable(); + group.get(e)?.setValue(''); + }); + } + }; + UpdateMealTypeIncluded(grp) { + let group = grp as FormGroup; + if (group.get('is_meal_included').value == 'Yes') { + this.UpdateControlsValidation(group, 'meal_details', 'add'); + group.get('meal_details').enable() + } + else { + group.get('meal_details').disable(); + group.get('meal_details').setValue(''); + this.UpdateControlsValidation(group, 'meal_details', 'remove'); + } + }; + + UpdateControlsValidation(group, name, type) { + if (type == 'add') { + group.get(name)?.addValidators([Validators.required]); + group.get(name)?.updateValueAndValidity(); + } else { + group.get(name)?.clearValidators(); + group.get(name)?.updateValueAndValidity(); + group.get(name)?.markAsUntouched(); + }; + }; + + UpdateNearByAirport() { + let val = this.Formdata.get('is_nearby_airports').value; + if (val) { + this.Formdata.addControl('nearby_from_airports', this.Fb.control([])); + this.Formdata.addControl('nearby_to_airports', this.Fb.control([])); + } else { + this.Formdata.removeControl('nearby_from_airports'); + this.Formdata.removeControl('nearby_to_airports'); + } + }; + // UpdateNextDayArrivelcheck(grp) { + // let group = grp as FormGroup; + // let controls = [ + // 'arrival_hour', + // 'arrival_minutes', + // 'arrival_terminal', + // 'flying_duration_hour', + // 'flying_duration_minutes', + // ]; + // if (group.get('is_next_day_arrival').value) controls.forEach(e => this.UpdateControlsValidation(group, e, 'add')); + // else controls.forEach(e => this.UpdateControlsValidation(group, e, 'remove')); + // }; + + // Save + saveData() { + let value = this.Formdata.getRawValue(); + if (this.Formdata.status == "INVALID") { + this.validationService.showValidationsMsg(this.Formdata); + setTimeout(() => { + this.validationService.scrollToError(); + }, 50); + return; + } + if (value?.trip_type == 'ONEWAY' && value?.origin == value?.destination) { + this.ToasterMsg('origin airports and destination airports cannot be same in one way'); + return + } + // Out Bond + let FlightoutboundList = this.outbound.getRawValue(); + let outboundlastNumber = FlightoutboundList.length - 1; + if (!FlightoutboundList[outboundlastNumber].to_airport && !value.origin && !value.destination && !FlightoutboundList[0].from_airport) { + this.ToasterMsg("(Outbound) Please enter departure and arrival city or airport") + return; + } + if (JSON.stringify(FlightoutboundList[outboundlastNumber].to_airport) != JSON.stringify(value.destination) || JSON.stringify(FlightoutboundList[0].from_airport) != JSON.stringify(value.origin)) { + this.ToasterMsg("(Outbound) Departure must be different from arrival") + return; + }; + let Duplicate = false; + FlightoutboundList.forEach((e, index) => { + const duplicateIndex = FlightoutboundList.findIndex((item, i) => { + return i !== index && item.from_airport === e.from_airport && item.to_airport === e.to_airport; + }); + if (duplicateIndex !== -1) { + Duplicate = true; + } + }); + if (Duplicate) { + this.ToasterMsg('(Outbound) Duplicate flight details found for the same origin and destination airports.'); + return + } + // + + // In bound + let FlightinboundList = this.inbound.getRawValue(); + if (value?.trip_type == 'ROUNDTRIP') { + let inboundlastNumber = FlightinboundList.length - 1; + if (!FlightinboundList[inboundlastNumber].to_airport && !value.origin && !value.destination && !FlightinboundList[0].from_airport) { + this.ToasterMsg("(Inbound) Please enter departure and arrival city or airport") + return; + } + if (JSON.stringify(FlightinboundList[inboundlastNumber].to_airport) != JSON.stringify(value.origin) || JSON.stringify(FlightinboundList[0].from_airport) != JSON.stringify(value.destination)) { + this.ToasterMsg("(Inbound) Departure must be different from arrival") + return; + }; + Duplicate = false; + FlightinboundList.forEach((e, index) => { + const duplicateIndex = FlightinboundList.findIndex((item, i) => { + return i !== index && item.from_airport === e.from_airport && item.to_airport === e.to_airport; + }); + if (duplicateIndex !== -1) { + Duplicate = true; + } + }); + if (Duplicate) { + this.ToasterMsg('(Inbound) Duplicate flight details found for the same origin and destination airports.'); + return + } + } + let FlightRateVal = this.FlightsRate.getRawValue(); + let AllFlightDetailslist = []; + /// flight details + FlightoutboundList.forEach((e, i) => { + let obj = { + airline_code: e.airline_code, + flight_no: e.flight_no, + aircraft_type_id: e._aircraft_type, + from_airport: e.from_airport ? e.from_airport : "", + to_airport: e.to_airport ? e.to_airport : "", + departure_time: e.departure_Hour + ':' + e.departure_minutes + ':00', + is_next_day_departure: e.is_next_day_departure, + departure_terminal: e.departure_terminal, + is_next_day_arrival: e.is_next_day_arrival, + arrival_time: e.arrival_hour + ':' + e.arrival_minutes + ':00', + arrival_terminal: e.arrival_terminal, + flying_duration: e.flying_duration_hour + ':' + e.flying_duration_minutes + ':00', + leg_nbr: i + 1, + seg_nbr: 1, + } + AllFlightDetailslist.push(obj); + }); + + FlightinboundList.forEach((e, i) => { + let obj = { + airline_code: e.airline_code, + flight_no: e.flight_no, + aircraft_type_id: e._aircraft_type, + from_airport: e.from_airport ? e.from_airport : "", + to_airport: e.to_airport ? e.to_airport : "", + departure_time: e.departure_Hour + ':' + e.departure_minutes + ':00', + is_next_day_departure: e.is_next_day_departure, + departure_terminal: e.departure_terminal, + is_next_day_arrival: e.is_next_day_arrival, + arrival_time: e.arrival_hour + ':' + e.arrival_minutes + ':00', + arrival_terminal: e.arrival_terminal, + flying_duration: e.flying_duration_hour + ':' + e.flying_duration_minutes + ':00', + leg_nbr: i + 1, + seg_nbr: 2, + } + AllFlightDetailslist.push(obj); + }); + + // flight Rate + let FlightRate = [] + FlightRateVal.forEach(e => { + let Ratepostdata = new FlightRateArray(); + Ratepostdata.contract_id = e?.contract_id; + Ratepostdata.rbd = e?.rbd; + Ratepostdata.fare_family_group_id = e?.fare_family_group_id.toString(); + Ratepostdata.fare_family_name = e?.fare_family_name; + Ratepostdata.cabin_class = e?.cabin_class; + Ratepostdata.adt_base_fare = e?.adt_base_fare ? parseFloat(e?.adt_base_fare) : 0; + Ratepostdata.adt_tax = e?.adt_tax ? parseFloat(e?.adt_tax) : 0; + Ratepostdata.chd_base_fare = e?.chd_base_fare ? parseFloat(e?.chd_base_fare) : 0; + Ratepostdata.chd_tax = e?.chd_tax ? parseFloat(e?.chd_tax) : 0; + Ratepostdata.inf_base_fare = e?.inf_base_fare ? parseFloat(e?.inf_base_fare) : 0; + Ratepostdata.inf_tax = e?.inf_tax ? parseFloat(e?.inf_tax) : 0; + Ratepostdata.round_trip_discount_type = e?.round_trip_discount_type; + Ratepostdata.is_apply_discount_with_same_vc_only = e?.is_apply_discount_with_same_vc_only; + Ratepostdata.adult_round_trip_discount = e?.adult_round_trip_discount ? e?.adult_round_trip_discount : 0; + Ratepostdata.child_round_trip_discount = e?.child_round_trip_discount ? e?.child_round_trip_discount : 0; + Ratepostdata.infant_round_trip_discount = e?.infant_round_trip_discount ? e?.infant_round_trip_discount : 0; + Ratepostdata.seat_allocation = e?.seat_allocation ? parseFloat(e?.seat_allocation) : 0; + Ratepostdata.seat_booked = 0; + Ratepostdata.seat_cancelled = 0; + Ratepostdata.is_checked_bag_included = e?.is_checked_bag_included; + Ratepostdata.adt_check_bag = e?.adt_check_bag; + Ratepostdata.chd_check_bag = e?.chd_check_bag; + Ratepostdata.inf_check_bag = e?.inf_check_bag; + Ratepostdata._check_bag_unit = e?._check_bag_unit; + Ratepostdata.adt_cabin_bag = e?.adt_cabin_bag; + Ratepostdata.chd_cabin_bag = e?.chd_cabin_bag; + Ratepostdata.inf_cabin_bag = e?.inf_cabin_bag; + Ratepostdata._cabin_bag_unit = e?._cabin_bag_unit; + Ratepostdata.refund_type = e?.refund_type; + Ratepostdata.adt_fare_rule = e?.adt_fare_rule; + Ratepostdata.chd_fare_rule = e?.chd_fare_rule; + Ratepostdata.inf_fare_rule = e?.inf_fare_rule; + Ratepostdata.is_meal_included = e?.is_meal_included == 'Yes'; + Ratepostdata.meal_details = e?.meal_details; + Ratepostdata.inclusions = e?.inclusions; + Ratepostdata.pnr = value.pnr; + FlightRate.push(Ratepostdata) + }) + // Flight Contracts + let PostData = new FlightContracts(); + PostData.contract_name = value?.contract_name; + PostData.is_active = value?.is_active; + PostData.contract_description = value?.contract_description; + PostData.trip_type = value?.trip_type; + PostData.is_oneway_sale_allowed = value?.is_oneway_sale_allowed ? value?.is_oneway_sale_allowed : false; + PostData.origin = value?.origin + PostData.destination = value?.destination + PostData.no_of_legs = AllFlightDetailslist.length; + PostData.currency_code = value?.currency_code; + PostData.is_instant_confirmation = value.is_instant_confirmation == 'INSTANT'; + PostData.contracted_cabin_class = value?.contracted_cabin_class ? value?.contracted_cabin_class.join(',') : ''; + PostData.contracted_pax_type = value?.contracted_pax_type ? value?.contracted_pax_type.join(',') : ''; + PostData.validating_airline = value?.validating_airline; + PostData.is_multi_day = value?.is_multi_day ? value?.is_multi_day : false; + PostData.multi_day_operation_type = value?.multi_day_operation_type ? value?.multi_day_operation_type : ''; + if (value?.operation_from) PostData.operation_from = value?.operation_from ? this._commonService.convertDateToSave(value?.operation_from) : ''; + if (value?.operation_to) PostData.operation_to = value?.operation_to ? this._commonService.convertDateToSave(value?.operation_to) : ''; + if (value?.departure_dates) { + let departureDateList = []; + value.departure_dates.forEach(e => departureDateList.push(this._commonService.convertDateToSaveWithoutTime(e))) + PostData.departure_dates = departureDateList.length > 0 ? departureDateList.join(',') : ''; + } + if (value?.departure_days) PostData.departure_days = value?.departure_days.join(','); + if (value?.departure_date) PostData.departure_date = this._commonService.convertDateToSave(value?.departure_date); + if (value?.return_date) PostData.return_date = this._commonService.convertDateToSave(value?.return_date); + PostData.is_nearby_airports = value?.is_nearby_airports; + PostData.nearby_from_airports = value?.nearby_from_airports && value?.nearby_from_airports.length > 0 ? value?.nearby_from_airports.join(',') : ''; + PostData.nearby_to_airports = value?.nearby_to_airports && value?.nearby_to_airports.length > 0 ? value?.nearby_to_airports.join(',') : ''; + let requestform = new FlightContractReq(); + requestform.FlightContract = PostData; + requestform.FlightDetails = AllFlightDetailslist; + requestform.FlightRates = FlightRate; + this.ApiServ.Post('/FlightContract/SaveFlightContract', requestform).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + setTimeout(() => { + if (res['status']) this.router.navigate(['/Services/FlightInventory/Search']); + }, 500); + } + }); + + }; + + preventDefaultRemoval(value) { + let array = this.Formdata.get('contracted_pax_type').value + if (!array.includes(value)) { + this.Formdata.get('contracted_pax_type').setValue([value, ...array]) + } + }; + UpdateMultiDayOperation() { + let val = this.Formdata.get('is_multi_day')?.value; + if (val) { + this.Formdata.removeControl('departure_date'); + this.Formdata.addControl('multi_day_operation_type', this.validationService.required); + } else { + this.Formdata.removeControl('multi_day_operation_type'); + this.Formdata.removeControl('operation_from'); + this.Formdata.removeControl('operation_to'); + this.Formdata.removeControl('departure_dates'); + this.Formdata.removeControl('departure_days'); + this.Formdata.addControl('departure_date', this.validationService.required); + } + }; + UpdateFareType(group) { + let grpcontrols = group as FormGroup; + let val = grpcontrols.get('fare_type_applicability').value; + if (val == 'BOTH' || val == 'ROUNDTRIP') { + grpcontrols.get('round_trip_discount_type')?.enable(); + grpcontrols.get('adult_round_trip_discount')?.enable(); + grpcontrols.get('child_round_trip_discount')?.enable(); + grpcontrols.get('infant_round_trip_discount')?.enable(); + } else { + grpcontrols.get('round_trip_discount_type')?.disable(); + grpcontrols.get('adult_round_trip_discount')?.disable(); + grpcontrols.get('child_round_trip_discount')?.disable(); + grpcontrols.get('infant_round_trip_discount')?.disable(); + grpcontrols.get('round_trip_discount_type')?.setValue(''); + grpcontrols.get('adult_round_trip_discount')?.setValue(''); + grpcontrols.get('child_round_trip_discount')?.setValue(''); + grpcontrols.get('infant_round_trip_discount')?.setValue(''); + } + }; + + UpdateMultiDayOperationType() { + let val = this.Formdata.get('multi_day_operation_type')?.value; + if (val == 'RANGE') { + this.Formdata.addControl('operation_from', this.validationService.required); + this.Formdata.addControl('operation_to', this.validationService.required); + this.Formdata.addControl('departure_days', this.validationService.required); + this.Formdata.removeControl('departure_dates'); + } else if (val == 'SPECIFICDATES') { + this.Formdata.addControl('departure_dates', this.validationService.required); + this.Formdata.removeControl('departure_days'); + this.Formdata.removeControl('operation_from'); + this.Formdata.removeControl('operation_to'); + } else { + this.Formdata.removeControl('departure_days'); + this.Formdata.removeControl('operation_from'); + this.Formdata.removeControl('operation_to'); + this.Formdata.removeControl('departure_dates'); + } + }; + AllSelectedCabinClass = [] + ContractedCabins() { + let val = this.Formdata.controls['contracted_cabin_class'].value; + if (val && val.length > 0) { + let string = val.join(','); + this.AllSelectedCabinClass = this._staticService.CabinsClassType.filter(e => string.includes(e.value)); + this.FlightsRate.controls.forEach(e => { + if (e.get('cabin_class').value && !string.includes(e.get('cabin_class').value)) e.get('cabin_class').setValue(''); + }) + } else { + this.AllSelectedCabinClass = []; + } + }; + + UpdateTripType() { + let val = this.Formdata.controls['trip_type'].value; + if (val == 'ONEWAY') { + this.UpdateALLFlightsRateFormGroup(true); + this.Formdata.addControl('is_multi_day', this.Fb.control(false)); + this.Formdata.removeControl('return_date'); + this.Formdata.removeControl('is_oneway_sale_allowed'); + this.inbound.clear(); + } + else if (val == 'ROUNDTRIP') { + this.UpdateALLFlightsRateFormGroup(false); + this.UpdateDepartureDate(false); + this.addFlightGroupBtn(true); + this.Formdata.addControl('is_oneway_sale_allowed', this.Fb.control(false)); + this.Formdata.addControl('return_date', this.validationService.required); + this.Formdata.removeControl('is_multi_day'); + } else { + this.UpdateALLFlightsRateFormGroup(false); + this.Formdata.removeControl('is_multi_day'); + this.Formdata.removeControl('return_date'); + this.Formdata.removeControl('is_oneway_sale_allowed'); + this.inbound.clear(); + } + this.AddUpdatePaxWiseControls(); + this.UpdateMultiDayOperation(); + } + UpdateDepartureDate(check) { + let val = this.Formdata.controls['departure_date']?.value; + if (val) { + if (check && this.Formdata.controls['return_date']?.value && new Date(val) > new Date(this.Formdata.controls['return_date'].value)) { + this.Formdata.controls['return_date'].setValue(new Date(val)); + } + this.ReturnDateMinDate = val; + } else { + this.ReturnDateMinDate = new Date() + } + }; + + UpdateALLFlightsRateFormGroup(check) { + this.FlightsRate.controls.forEach((e, index) => { + if (e) { + let formgroup = e as FormGroup; + if (check) { + formgroup.addControl('round_trip_discount_type', this.Fb.control(null)); + formgroup.addControl('adult_round_trip_discount', this.Fb.control(null)); + } else { + formgroup.removeControl('round_trip_discount_type'); + formgroup.removeControl('adult_round_trip_discount'); + formgroup.removeControl('child_round_trip_discount'); + formgroup.removeControl('infant_round_trip_discount'); + } + } + }) + }; + UpdateFlightsRateFormGroup() { + let val = this.Formdata.controls['trip_type'].value; + let grp = this.FlightsRate.controls[this.FlightsRate.controls.length - 1] as FormGroup; + if (val == 'ONEWAY') { + grp.addControl('round_trip_discount_type', this.Fb.control(null)); + grp.addControl('adult_round_trip_discount', this.Fb.control(null)); + } else { + grp.removeControl('round_trip_discount_type'); + grp.removeControl('adult_round_trip_discount'); + grp.removeControl('child_round_trip_discount'); + grp.removeControl('infant_round_trip_discount'); + } + }; + Editid; + AllSelectedAirports = []; + AllSelectedAircraft = []; + AllSelectedAirline = []; + GetFlightContract() { + this.Editid = this.activateRoute.snapshot.paramMap.get('RuleId'); + if (this.Editid) { + this.ApiServ.Get('/FlightContract/CloneGetFlightContractByID/' + this.Editid).subscribe(res => { + if (res) { + this.SetValue(res.data); + this.GetAllAirData(res.data); + } + }) + } + }; + SetValue(data) { + this.SetValueFlightContract(data.FlightContract); + this.SetValueFlightDetails(data.FlightDetails); + this.SetValueFlightRates(data.FlightRates); + }; + SetValueFlightContract(data) { + console.log(data); + this.Formdata.get('contract_name')?.setValue(data?.contract_name); + this.Formdata.get('is_active')?.setValue(data?.is_active); + this.Formdata.get('contract_description')?.setValue(data?.contract_description); + this.Formdata.get('trip_type')?.setValue(data?.trip_type); + this.UpdateTripType(); + this.Formdata.get('is_oneway_sale_allowed')?.setValue(data?.is_oneway_sale_allowed); + this.Formdata.get('origin')?.setValue(data?.origin); + this.Formdata.get('destination')?.setValue(data?.destination); + this.Formdata.get('no_of_legs')?.setValue(data?.no_of_legs); + this.Formdata.get('currency_code')?.setValue(data?.currency_code); + this.Formdata.get('is_instant_confirmation')?.setValue(data?.is_instant_confirmation ? 'INSTANT' : 'MANUAL'); + this.Formdata.get('contracted_cabin_class')?.setValue(data?.contracted_cabin_class ? data?.contracted_cabin_class.split(',') : []); + this.ContractedCabins(); + this.Formdata.get('contracted_pax_type')?.setValue(data?.contracted_pax_type ? data?.contracted_pax_type.split(',') : []); + this.UpdateAllPaxWiseControls(); + this.Formdata.get('validating_airline')?.setValue(data?.validating_airline); + this.Formdata.get('is_multi_day')?.setValue(data?.is_multi_day); + this.UpdateMultiDayOperation(); + this.Formdata.get('multi_day_operation_type')?.setValue(data?.multi_day_operation_type); + this.UpdateMultiDayOperationType(); + this.Formdata.get('operation_from')?.setValue(null); + this.Formdata.get('operation_to')?.setValue(null); + this.Formdata.get('departure_date')?.setValue(null); + this.Formdata.get('return_date')?.setValue(null); + this.Formdata.get('departure_dates')?.setValue(null) + // if (data.departure_dates && this.Formdata.get('departure_dates')) { + // let allDate = data.departure_dates.split(','); + // if (allDate && allDate.length > 0) { + // this.Formdata.get('departure_dates').setValue(allDate.map(e => new Date(e))) + // } + // }; + // this.Formdata.get('departure_date')?.setValue(data?.departure_date ? new Date(data.departure_date) : null); + // this.Formdata.get('return_date')?.setValue(data?.return_date ? new Date(data.return_date) : null); + this.Formdata.get('departure_days')?.setValue(data?.departure_days.split(',')); + this.Formdata.get('is_nearby_airports')?.setValue(data?.is_nearby_airports); + this.UpdateNearByAirport(); + this.Formdata.get('nearby_from_airports')?.setValue(data?.nearby_from_airports.split(',')); + this.Formdata.get('nearby_to_airports')?.setValue(data?.nearby_to_airports.split(',')); + } + SetValueFlightDetails(data) { + console.log(data); + let outbondlist = data.filter(e => e.seg_nbr == 1).sort((a, b) => a.leg_nbr - b.leg_nbr); + outbondlist.forEach((e, i) => { + if (i != 0) this.addFlightGroupBtn(false); + this.outbound.controls[i]?.get('airline_code')?.setValue(e.airline_code); + this.outbound.controls[i]?.get('flight_no')?.setValue(e.flight_no); + this.outbound.controls[i]?.get('_aircraft_type')?.setValue(e.aircraft_type_id); + this.outbound.controls[i]?.get('from_airport')?.setValue(e.from_airport); + this.outbound.controls[i]?.get('to_airport')?.setValue(e.to_airport); + this.outbound.controls[i]?.get('is_next_day_departure')?.setValue(e.is_next_day_departure); + this.outbound.controls[i]?.get('departure_terminal')?.setValue(e.departure_terminal); + this.outbound.controls[i]?.get('is_next_day_arrival')?.setValue(e.is_next_day_arrival); + this.outbound.controls[i]?.get('arrival_terminal')?.setValue(e.arrival_terminal); + if (e.departure_time) { + this.outbound.controls[i]?.get('departure_Hour')?.setValue(e.departure_time.split(':')[0]); + this.outbound.controls[i]?.get('departure_minutes')?.setValue(e.departure_time.split(':')[1]); + } + if (e.arrival_time) { + this.outbound.controls[i]?.get('arrival_hour')?.setValue(e.arrival_time.split(':')[0]); + this.outbound.controls[i]?.get('arrival_minutes')?.setValue(e.arrival_time.split(':')[1]); + } + if (e.flying_duration) { + this.outbound.controls[i]?.get('flying_duration_hour')?.setValue(e.flying_duration.split(':')[0]); + this.outbound.controls[i]?.get('flying_duration_minutes')?.setValue(e.flying_duration.split(':')[1]); + } + }) + let inbondlist = data.filter(e => e.seg_nbr == 2); + if (inbondlist && inbondlist.length > 0) { + inbondlist = inbondlist.sort((a, b) => a.leg_nbr - b.leg_nbr); + inbondlist.forEach((e, i) => { + if (i != 0) this.addFlightGroupBtn(true); + this.inbound.controls[i]?.get('airline_code')?.setValue(e.airline_code); + this.inbound.controls[i]?.get('flight_no')?.setValue(e.flight_no); + this.inbound.controls[i]?.get('_aircraft_type')?.setValue(e.aircraft_type_id); + this.inbound.controls[i]?.get('from_airport')?.setValue(e.from_airport); + this.inbound.controls[i]?.get('to_airport')?.setValue(e.to_airport); + this.inbound.controls[i]?.get('is_next_day_departure')?.setValue(e.is_next_day_departure); + this.inbound.controls[i]?.get('departure_terminal')?.setValue(e.departure_terminal); + this.inbound.controls[i]?.get('is_next_day_arrival')?.setValue(e.is_next_day_arrival); + this.inbound.controls[i]?.get('arrival_terminal')?.setValue(e.arrival_terminal); + if (e.departure_time) { + this.inbound.controls[i]?.get('departure_Hour')?.setValue(e.departure_time.split(':')[0]); + this.inbound.controls[i]?.get('departure_minutes')?.setValue(e.departure_time.split(':')[1]); + } + if (e.arrival_time) { + this.inbound.controls[i]?.get('arrival_hour')?.setValue(e.arrival_time.split(':')[0]); + this.inbound.controls[i]?.get('arrival_minutes')?.setValue(e.arrival_time.split(':')[1]); + } + if (e.flying_duration) { + this.inbound.controls[i]?.get('flying_duration_hour')?.setValue(e.flying_duration.split(':')[0]); + this.inbound.controls[i]?.get('flying_duration_minutes')?.setValue(e.flying_duration.split(':')[1]); + } + }) + } + }; + // don't remove this code + SetValueFlightRates(data, iscopyUi?) { + console.log(data); + data.forEach((e, i) => { + if (iscopyUi) { + e = data[0]; + } else { + if (i != 0) this.addFlightsRateGroupBtn(); + } + this.FlightsRate.controls[i].get('rbd')?.setValue(e?.rbd) + this.FlightsRate.controls[i].get('fare_family_group_id')?.setValue(e?.fare_family_group_id); + this.FlightsRate.controls[i].get('fare_family_name')?.setValue(e?.fare_family_name); + this.FlightsRate.controls[i].get('cabin_class')?.setValue(e?.cabin_class); + this.FlightsRate.controls[i].get('adt_base_fare')?.setValue(e?.adt_base_fare); + this.FlightsRate.controls[i].get('adt_tax')?.setValue(e?.adt_tax); + this.FlightsRate.controls[i].get('chd_base_fare')?.setValue(e?.chd_base_fare); + this.FlightsRate.controls[i].get('chd_tax')?.setValue(e?.chd_tax); + this.FlightsRate.controls[i].get('inf_base_fare')?.setValue(e?.inf_base_fare); + this.FlightsRate.controls[i].get('inf_tax')?.setValue(e?.inf_tax); + this.FlightsRate.controls[i].get('round_trip_discount_type')?.setValue(e?.round_trip_discount_type); + this.FlightsRate.controls[i].get('is_apply_discount_with_same_vc_only')?.setValue(e?.is_apply_discount_with_same_vc_only); + this.FlightsRate.controls[i].get('adult_round_trip_discount')?.setValue(e?.adult_round_trip_discount); + this.FlightsRate.controls[i].get('child_round_trip_discount')?.setValue(e?.child_round_trip_discount); + this.FlightsRate.controls[i].get('infant_round_trip_discount')?.setValue(e?.infant_round_trip_discount); + this.FlightsRate.controls[i].get('seat_allocation')?.setValue(e?.seat_allocation) + this.FlightsRate.controls[i].get('is_checked_bag_included')?.setValue(e?.is_checked_bag_included); + this.UpdateBag(this.FlightsRate.controls[i]) + this.FlightsRate.controls[i].get('adt_check_bag')?.setValue(e?.adt_check_bag); + this.FlightsRate.controls[i].get('chd_check_bag')?.setValue(e?.chd_check_bag); + this.FlightsRate.controls[i].get('inf_check_bag')?.setValue(e?.inf_check_bag); + this.FlightsRate.controls[i].get('_check_bag_unit')?.setValue(e?._check_bag_unit); + this.FlightsRate.controls[i].get('adt_cabin_bag')?.setValue(e?.adt_cabin_bag); + this.FlightsRate.controls[i].get('chd_cabin_bag')?.setValue(e?.chd_cabin_bag); + this.FlightsRate.controls[i].get('inf_cabin_bag')?.setValue(e?.inf_cabin_bag); + this.FlightsRate.controls[i].get('_cabin_bag_unit')?.setValue(e?._cabin_bag_unit); + this.FlightsRate.controls[i].get('refund_type')?.setValue(e?.refund_type); + this.FlightsRate.controls[i].get('adt_fare_rule')?.setValue(e?.adt_fare_rule); + this.FlightsRate.controls[i].get('chd_fare_rule')?.setValue(e?.chd_fare_rule); + this.FlightsRate.controls[i].get('inf_fare_rule')?.setValue(e?.inf_fare_rule); + this.FlightsRate.controls[i].get('is_meal_included')?.setValue(e?.is_meal_included ? 'Yes' : 'No'); + this.UpdateMealTypeIncluded(this.FlightsRate.controls[i]); + this.FlightsRate.controls[i].get('meal_details')?.setValue(e?.meal_details); + this.FlightsRate.controls[i].get('inclusions')?.setValue(e?.inclusions); + this.FlightsRate.controls[i].get('pnr')?.setValue(e?.pnr); + }) + }; + copyFlightRatesGroup(ind, e?) { + // data.forEach((e, i) => { + // this.addFlightsRateGroupBtn(); + this.FlightsRate.insert(ind + 1, this.Fb.group({ + rbd: this.validationService.required, + fare_family_group_id: this.validationService.required, + fare_family_name: this.validationService.required, + cabin_class: this.validationService.required, + adt_base_fare: this.validationService.decimal, + adt_tax: this.validationService.decimal, + seat_allocation: this.validationService.number, + is_checked_bag_included: [false], + is_apply_discount_with_same_vc_only: [false], + adt_check_bag: [{ value: '', disabled: true }], + _check_bag_unit: [{ value: '', disabled: true }], + adt_cabin_bag: this.validationService.required, + _cabin_bag_unit: this.validationService.required, + refund_type: this.validationService.required, + adt_fare_rule: this.validationService.required, + is_meal_included: this.validationService.required, + meal_details: [], + inclusions: [], + })); + this.AddUpdatePaxWiseControls(); + this.UpdateFlightsRateFormGroup(); + this.FlightsRate.controls[ind + 1].get('rbd')?.setValue(e?.rbd) + this.FlightsRate.controls[ind + 1].get('fare_family_group_id')?.setValue(e?.fare_family_group_id); + this.FlightsRate.controls[ind + 1].get('fare_family_name')?.setValue(e?.fare_family_name); + this.FlightsRate.controls[ind + 1].get('cabin_class')?.setValue(e?.cabin_class); + this.FlightsRate.controls[ind + 1].get('adt_base_fare')?.setValue(e?.adt_base_fare); + this.FlightsRate.controls[ind + 1].get('adt_tax')?.setValue(e?.adt_tax); + this.FlightsRate.controls[ind + 1].get('chd_base_fare')?.setValue(e?.chd_base_fare); + this.FlightsRate.controls[ind + 1].get('chd_tax')?.setValue(e?.chd_tax); + this.FlightsRate.controls[ind + 1].get('inf_base_fare')?.setValue(e?.inf_base_fare); + this.FlightsRate.controls[ind + 1].get('inf_tax')?.setValue(e?.inf_tax); + this.FlightsRate.controls[ind + 1].get('round_trip_discount_type')?.setValue(e?.round_trip_discount_type); + this.FlightsRate.controls[ind + 1].get('is_apply_discount_with_same_vc_only')?.setValue(e?.is_apply_discount_with_same_vc_only); + this.FlightsRate.controls[ind + 1].get('adult_round_trip_discount')?.setValue(e?.adult_round_trip_discount); + this.FlightsRate.controls[ind + 1].get('child_round_trip_discount')?.setValue(e?.child_round_trip_discount); + this.FlightsRate.controls[ind + 1].get('infant_round_trip_discount')?.setValue(e?.infant_round_trip_discount); + this.FlightsRate.controls[ind + 1].get('seat_allocation')?.setValue(e?.seat_allocation) + this.FlightsRate.controls[ind + 1].get('is_checked_bag_included')?.setValue(e?.is_checked_bag_included); + this.UpdateBag(this.FlightsRate.controls[ind + 1]) + this.FlightsRate.controls[ind + 1].get('adt_check_bag')?.setValue(e?.adt_check_bag); + this.FlightsRate.controls[ind + 1].get('chd_check_bag')?.setValue(e?.chd_check_bag); + this.FlightsRate.controls[ind + 1].get('inf_check_bag')?.setValue(e?.inf_check_bag); + this.FlightsRate.controls[ind + 1].get('_check_bag_unit')?.setValue(e?._check_bag_unit); + this.FlightsRate.controls[ind + 1].get('adt_cabin_bag')?.setValue(e?.adt_cabin_bag); + this.FlightsRate.controls[ind + 1].get('chd_cabin_bag')?.setValue(e?.chd_cabin_bag); + this.FlightsRate.controls[ind + 1].get('inf_cabin_bag')?.setValue(e?.inf_cabin_bag); + this.FlightsRate.controls[ind + 1].get('_cabin_bag_unit')?.setValue(e?._cabin_bag_unit); + this.FlightsRate.controls[ind + 1].get('refund_type')?.setValue(e?.refund_type); + this.FlightsRate.controls[ind + 1].get('adt_fare_rule')?.setValue(e?.adt_fare_rule); + this.FlightsRate.controls[ind + 1].get('chd_fare_rule')?.setValue(e?.chd_fare_rule); + this.FlightsRate.controls[ind + 1].get('inf_fare_rule')?.setValue(e?.inf_fare_rule); + this.FlightsRate.controls[ind + 1].get('is_meal_included')?.setValue(e?.is_meal_included ? 'Yes' : 'No'); + this.UpdateMealTypeIncluded(this.FlightsRate.controls[ind + 1]); + this.FlightsRate.controls[ind + 1].get('meal_details')?.setValue(e?.meal_details); + this.FlightsRate.controls[ind + 1].get('inclusions')?.setValue(e?.inclusions); + this.FlightsRate.controls[ind + 1].get('pnr')?.setValue(e?.pnr); + // }) + }; + getIsMeal(iscopyUi, e) { + if (iscopyUi) { + return (e?.is_meal_included ? 'Yes' : 'No'); + } else { + return (e?.is_meal_included); + } + }; + GetAllAirData(res) { + this.AllSelectedAirports.push(res.FlightContract.origin); + this.AllSelectedAirports.push(res.FlightContract.origin); + this.AllSelectedAirline.push(res.FlightContract.validating_airline); + if (res.FlightContract.nearby_from_airports) { + this.AllSelectedAirports.push(...res.FlightContract.nearby_from_airports.split(',')); + } + if (res.FlightContract.nearby_to_airports) { + this.AllSelectedAirports.push(...res.FlightContract.nearby_to_airports.split(',')); + }; + if (res.FlightDetails && res.FlightDetails.length > 0) { + res.FlightDetails.forEach(e => { + this.AllSelectedAirports.push(e.from_airport); + this.AllSelectedAirports.push(e.to_airport); + this.AllSelectedAircraft.push(e.aircraft_type_id); + this.AllSelectedAirline.push(e.airline_code); + }); + }; + this._flightContractService.GetAirportsByAirportCode(this.AllSelectedAirports.join(',')); + this._flightContractService.GetAircraftTypeById(this.AllSelectedAircraft.join(',')); + this._flightContractService.GetAirlineByAirlineCode(this.AllSelectedAirline.join(',')); + } + // static dropdown + Option = [ + { value: 'Yes', displayName: 'Yes' }, + { value: 'No', displayName: 'No' }, + ]; + updateAirportSelection(name: string, val: any) { + const controlMap = { + 'orgin': this.outbound.controls[0].get('from_airport'), + 'destination': this.inbound?.controls?.[0]?.get('from_airport') + }; + if (val && controlMap[name]) { + controlMap[name].setValue(val); + } else { + controlMap[name]?.setValue(null); + } + }; + + + selectAllDays() { + const weekDays = this._staticService.WeekDaysList.map(day => day.Itemkey2); + this.Formdata.controls['departure_days'].setValue(weekDays); + this.allDaysSelected = true; + }; + + IsAllDaysSelected(): boolean { + let alldays = this._staticService.WeekDaysList.every(e => { + if (this.Formdata.controls['departure_days']?.value && this.Formdata.controls['departure_days']?.value.includes(e.Itemkey2)) { + return true + } + return false + }) + return alldays + } + + clearAllDays() { + this.Formdata.controls['departure_days'].setValue([]); + this.allDaysSelected = false; + } + + + storeDestAirportList(form, i) { + let fb = form as FormArray; + if (fb.controls[i].get('to_airport').value) { + if (fb.controls[i + 1]) { + fb.controls[i + 1].get('from_airport').setValue(fb.controls[i].get('to_airport').value); + }; + }; + }; + + backClick() { + this.router.navigateByUrl("Services/FlightInventory/Search"); + } +} diff --git a/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-flight-details/edit-flight-details.component.html b/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-flight-details/edit-flight-details.component.html new file mode 100644 index 0000000..457d0e9 --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-flight-details/edit-flight-details.component.html @@ -0,0 +1,600 @@ + + +
    +
    +
    +

    Apply Edit to

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    + +
    + Departure Date +
    + Please + select date type +
    +
    +
    +
    + + + +
    + + {{date.day}} + + + {{date.day}} + +
    +
    + Please + select from date +
    + +
    +
    +
    + + + +
    + + {{date.day}} + + + {{date.day}} + +
    +
    + Please + select to date + Please + select to date greater than from date +
    +
    +
    +
    + + + +
    +
    +
    +

    Departure Days

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +

    Outbound Flight - + {{OutBondDate}} +

    +
    +
    +
    +
    +
    +
    +
    + + + {{item.airline_name}} + ({{item.airline_code}}) + + +
    +
    + + +
    +
    + + + +
    +
    + + + {{item.ct}} + ({{item.ac}}) + +
    +
    + + + {{item.ct}} + ({{item.ac}}) + +
    +
    + +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + Next Day Arrival + +
    +
    + +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    + +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + Departure Next Day +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Inbound Flight - + {{InBondDate}} +

    +
    +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + {{item.ct}} + ({{item.ac}}) + +
    +
    +
    + +
    + + {{item.ct}} + ({{item.ac}}) + +
    +
    +
    + +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + Next Day Arrival + +
    +
    + +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + Departure Next Day +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + \ No newline at end of file diff --git a/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-flight-details/edit-flight-details.component.ts b/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-flight-details/edit-flight-details.component.ts new file mode 100644 index 0000000..e511de1 --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-flight-details/edit-flight-details.component.ts @@ -0,0 +1,475 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { FlightDetailDto } from 'src/app/core/models/flight-service/flight-contracts.model'; +import { API } from 'src/app/core/services/api.service'; +import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service'; + +@Component({ + selector: 'app-edit-flight-details', + templateUrl: './edit-flight-details.component.html', +}) +export class EditFlightDetailsComponent implements OnInit { + + constructor( + public _staticService: StaticDataService, + public activateRoute: ActivatedRoute, + public validationService: ValidationService, + public _flightContractService: FlightContractService, + private Fb: FormBuilder, + public _commonService: CommonFunctionService, + private ApiServ: API, + public router: Router, + ) { } + ContractId; + Formdata: FormGroup; + ngOnInit(): void { + this.PageSetUp(); + }; + Defaultdate = new Date(); + + + PageSetUp() { + this.ContractId = this.activateRoute.snapshot.paramMap.get('ContractId'); + this.GetFlightContratByID(); + }; + + FlightContractDetails; + DatesListArray = [] + GetFlightContratByID() { + this.ApiServ.Get('/FlightContract/GetFlightContractByID/' + this.ContractId).subscribe(res => { + if (res) { + this.FlightContractDetails = res.data; + if (this.FlightContractDetails.departure_dates && this.FlightContractDetails.multi_day_operation_type == 'SPECIFICDATES') { + let datelist = this.FlightContractDetails.departure_dates.split(','); + if (datelist && datelist.length > 0) { + this.DatesListArray = datelist.map(e => { + let date = new Date(e) + date.setHours(0, 0, 0, 0); + return moment(date).format('YYYY-MM-DD') + }); + } + }; + if (this.FlightContractDetails?.operation_from && this.FlightContractDetails?.operation_to) { + let from_date = new Date(this.FlightContractDetails.operation_from); + let to_date = new Date(this.FlightContractDetails.operation_from); + if (this.FlightContractDetails.departure_dates && this.FlightContractDetails.multi_day_operation_type == 'SPECIFICDATES') { + let datelist = this.FlightContractDetails.departure_dates.split(','); + let dates = []; + datelist.forEach(e => { + if (new Date(e) >= new Date()) dates.push(e) + }); + from_date = new Date(dates[0]); + to_date = new Date(datelist[datelist.length - 1]); + } + let current_date = new Date(); + from_date.setHours(0, 0, 0, 0); + to_date.setHours(0, 0, 0, 0); + current_date.setHours(0, 0, 0, 0); + if (from_date.getTime() < current_date.getTime() && to_date.getTime() > current_date.getTime()) { + this.Defaultdate = current_date; + } else { + this.Defaultdate = from_date; + } + } + this.OnIntForm(); + } + }); + }; + WeekDaysList = []; + OnIntForm() { + this.Formdata = this.Fb.group({ + Default: [''], + is_multi_day: [false], + outbond: this.Fb.array([]), + inbond: this.Fb.array([]), + }); + if (this.FlightContractDetails?.is_multi_day) { + this.Formdata.addControl('date_type', this.validationService.required); + this.Formdata.addControl('from_date', this.validationService.required); + this.Formdata.addControl('to_date', this.validationService.required); + if (this.FlightContractDetails.multi_day_operation_type == 'RANGE') { + this._staticService.WeekDaysList.forEach(e => { + if (this.FlightContractDetails?.departure_days?.includes(e.Itemkey2)) this.WeekDaysList.push(e.Itemkey2); + }) + this.Formdata.addControl('days', this.Fb.control('')); + }; + } else { + this.Formdata.get('Default').setValue(this.FlightContractDetails.departure_date); + this.GetFlightDetailsList(); + }; + }; + + get outbond() { + return this.Formdata.get('outbond') as FormArray; + }; + get inbond() { + return this.Formdata.get('inbond') as FormArray; + }; + + GetFlightDetailsList() { + if ( + this.Formdata.get('date_type')?.invalid || + this.Formdata.get('from_date')?.invalid || + this.Formdata.get('to_date')?.invalid + ) { + this.validationService.showValidationsMsg(this.Formdata); + setTimeout(() => { + this.validationService.scrollToError(); + }, 50); + return; + } + let value = this.Formdata.getRawValue(); + let requestObject = { + contract_id: this.ContractId, + date_type: value.date_type, + from_date: '', + to_date: '', + days: '', + flight_details: [], + }; + if (this.FlightContractDetails?.is_multi_day) { + requestObject.from_date = this._commonService.convertDateToSave(value.from_date); + requestObject.to_date = this._commonService.convertDateToSave(value.to_date); + requestObject.days = value.days ? value.days.join(',') : ''; + } else { + requestObject.from_date = this._commonService.convertDateToSave(value.Default); + requestObject.to_date = this._commonService.convertDateToSave(value.Default); + const date = moment(value.Default); + const dayName = date.format('dddd'); + requestObject.days = dayName; + }; + this.ApiServ.Post('/FlightContract/GetAllFlightDetailsBySearch', requestObject).subscribe(res => { + if (res) { + if (res['status']) { + this.FlightContractListBind(res.data) + } else { + this._commonService.showMessage(res['status'], res['message']) + } + } + }); + }; + OutBondDate; + InBondDate; + DepartureDate; + FlightContractListBind(legs) { + this.outbond.clear(); + this.GetAllSelectedData(legs); + let outbondlist = legs.filter(e => e.seg_nbr == 1).sort((a, b) => a.leg_nbr - b.leg_nbr); + this.DepartureDate = outbondlist[0].departure_date; + this.OutBondDate = this._commonService.convertDateToShow(outbondlist[0].departure_date); + outbondlist.forEach((object, i) => { + this.addFlightGroupBtn(true); + this.outbond.controls[i].get('airline_code').setValue(object['airline_code']); + this.outbond.controls[i].get('flight_no').setValue(object['flight_no']); + this.outbond.controls[i].get('_aircraft_type').setValue(object['aircraft_type_id']); + this.outbond.controls[i].get('from_airport').setValue(object['from_airport']); + this.outbond.controls[i].get('to_airport').setValue(object['to_airport']); + this.outbond.controls[i].get('departure_terminal').setValue(object['departure_terminal']); + this.outbond.controls[i].get('is_next_day_arrival').setValue(object['is_next_day_arrival']); + this.outbond.controls[i].get('arrival_terminal').setValue(object['arrival_terminal']); + this.outbond.controls[i].get('is_next_day_departure').setValue(object['is_next_day_departure']); + if (object['departure_time']) { + let hour = object['departure_time'].split(':')[0]; + let minutes = object['departure_time'].split(':')[1]; + this.outbond.controls[i].get('departure_Hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.outbond.controls[i].get('departure_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } + if (object['arrival_time']) { + let hour = object['arrival_time'].split(':')[0]; + let minutes = object['arrival_time'].split(':')[1]; + this.outbond.controls[i].get('arrival_hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.outbond.controls[i].get('arrival_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } + if (object['flying_duration']) { + let hour = object['flying_duration'].split(':')[0]; + let minutes = object['flying_duration'].split(':')[1]; + this.outbond.controls[i].get('flying_duration_hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.outbond.controls[i].get('flying_duration_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } + }); + let inbondlist = legs.filter(e => e.seg_nbr == 2); + if (inbondlist && inbondlist.length > 0) { + this.InBondDate = this._commonService.convertDateToShow(inbondlist[0].departure_date); + inbondlist = inbondlist.sort((a, b) => a.leg_nbr - b.leg_nbr); + inbondlist.forEach((object, i) => { + this.addFlightGroupBtn(false); + this.inbond.controls[i].get('airline_code').setValue(object['airline_code']); + this.inbond.controls[i].get('flight_no').setValue(object['flight_no']); + this.inbond.controls[i].get('_aircraft_type').setValue(object['aircraft_type_id']); + this.inbond.controls[i].get('from_airport').setValue(object['from_airport']); + this.inbond.controls[i].get('to_airport').setValue(object['to_airport']); + this.inbond.controls[i].get('departure_terminal').setValue(object['departure_terminal']); + this.inbond.controls[i].get('is_next_day_arrival').setValue(object['is_next_day_arrival']); + this.inbond.controls[i].get('arrival_terminal').setValue(object['arrival_terminal']); + this.inbond.controls[i].get('is_next_day_departure').setValue(object['is_next_day_departure']); + if (object['departure_time']) { + let hour = object['departure_time'].split(':')[0]; + let minutes = object['departure_time'].split(':')[1]; + this.inbond.controls[i].get('departure_Hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.inbond.controls[i].get('departure_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } + if (object['arrival_time']) { + let hour = object['arrival_time'].split(':')[0]; + let minutes = object['arrival_time'].split(':')[1]; + this.inbond.controls[i].get('arrival_hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.inbond.controls[i].get('arrival_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } + if (object['flying_duration']) { + let hour = object['flying_duration'].split(':')[0]; + let minutes = object['flying_duration'].split(':')[1]; + this.inbond.controls[i].get('flying_duration_hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.inbond.controls[i].get('flying_duration_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } + }); + } + }; + + GetAllSelectedData(data) { + let all_aircraft_type = data.map(e => e.aircraft_type_id); + let AllAirline = data.map(e => e.airline_code); + let AllAirports = []; + data.forEach(e => { + AllAirports.push(e.from_airport); + AllAirports.push(e.to_airport); + }); + if (all_aircraft_type.length > 0) this.GetAircraftTypeById(all_aircraft_type.join(',')); + if (AllAirports.length > 0) this.GetAirportsByAirportCode(AllAirports.join(',')); + if (AllAirline.length > 0) this.GetAirlineByAirlineCode(AllAirline.join(',')); + }; + + addFlightGroupBtn(check) { + let formgroup = check ? this.outbond : this.inbond + formgroup.push( + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: [{ value: null, disabled: true }, Validators.required], + to_airport: [{ value: null, disabled: true }, Validators.required], + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: [''], + is_next_day_arrival: [{ value: false, disabled: true }], + arrival_hour: this.validationService.required, + arrival_minutes: this.validationService.required, + arrival_terminal: [''], + flying_duration_hour: this.validationService.required, + flying_duration_minutes: this.validationService.required, + is_next_day_departure: [{ value: false, disabled: true }], + }) + ); + }; + UpdateControlsValidation(group, name, type) { + if (type == 'add') { + group.get(name)?.addValidators([Validators.required]); + group.get(name)?.updateValueAndValidity(); + } else { + group.get(name)?.clearValidators(); + group.get(name)?.updateValueAndValidity(); + group.get(name)?.markAsUntouched(); + }; + }; + + Saveflightdetails() { + if (this.Formdata.invalid) { + this.validationService.showValidationsMsg(this.Formdata); + setTimeout(() => { + this.validationService.scrollToError(); + }, 50); + return; + } + let value = this.Formdata.getRawValue(); + let requestObject = { + contract_id: this.ContractId, + date_type: value.date_type, + from_date: '', + to_date: '', + days: '', + flight_details: [], + }; + if (this.FlightContractDetails?.is_multi_day) { + requestObject.from_date = this._commonService.convertDateToSave(value.from_date); + requestObject['to_date'] = this._commonService.convertDateToSave(value.to_date); + requestObject.days = value.days ? value.days.join(',') : ''; + } else { + requestObject.from_date = this._commonService.convertDateToSave(this.DepartureDate); + requestObject.to_date = this._commonService.convertDateToSave(this.DepartureDate); + const date = moment(this.DepartureDate); + const dayName = date.format('dddd'); + requestObject.days = dayName; + } + value.outbond.forEach((e, i) => { + let fligtDetlPostData = new FlightDetailDto(); + fligtDetlPostData.airline_code = e.airline_code + fligtDetlPostData.flight_no = e.flight_no; + fligtDetlPostData.aircraft_type_id = e._aircraft_type; + fligtDetlPostData.from_airport = e.from_airport; + fligtDetlPostData.to_airport = e.to_airport; + fligtDetlPostData.departure_time = e.departure_Hour + ':' + e.departure_minutes + ':00'; + fligtDetlPostData.is_next_day_departure = e.is_next_day_departure; + fligtDetlPostData.departure_terminal = e.departure_terminal; + fligtDetlPostData.is_next_day_arrival = e.is_next_day_arrival; + fligtDetlPostData.arrival_time = (e.arrival_hour || '00') + ':' + e.arrival_minutes + ':00'; + fligtDetlPostData.arrival_terminal = e.arrival_terminal; + fligtDetlPostData.flying_duration = (e.flying_duration_hour || '00') + ':' + (e.flying_duration_minutes || '00') + ':00'; + fligtDetlPostData.leg_nbr = i + 1; + fligtDetlPostData.seg_nbr = 1; + requestObject.flight_details.push(fligtDetlPostData); + }); + if (value.inbond && value.inbond.length > 0) { + value.inbond.forEach((e, i) => { + let fligtDetlPostData = new FlightDetailDto(); + fligtDetlPostData.airline_code = e.airline_code + fligtDetlPostData.flight_no = e.flight_no; + fligtDetlPostData.aircraft_type_id = e._aircraft_type; + fligtDetlPostData.from_airport = e.from_airport; + fligtDetlPostData.to_airport = e.to_airport; + fligtDetlPostData.departure_time = e.departure_Hour + ':' + e.departure_minutes + ':00'; + fligtDetlPostData.is_next_day_departure = e.is_next_day_departure; + fligtDetlPostData.departure_terminal = e.departure_terminal; + fligtDetlPostData.is_next_day_arrival = e.is_next_day_arrival; + fligtDetlPostData.arrival_time = (e.arrival_hour || '00') + ':' + e.arrival_minutes + ':00'; + fligtDetlPostData.arrival_terminal = e.arrival_terminal; + fligtDetlPostData.flying_duration = (e.flying_duration_hour || '00') + ':' + (e.flying_duration_minutes || '00') + ':00'; + fligtDetlPostData.leg_nbr = i + 1; + fligtDetlPostData.seg_nbr = 2; + requestObject.flight_details.push(fligtDetlPostData); + }); + } + this.ApiServ.Post('/FlightContract/UpdateFlightDetails', requestObject).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + setTimeout(() => { + if (res['status']) this.router.navigate(['/Services/FlightInventory/Search']); + }, 500); + } + }); + }; + weekdaylist + checkDateForHighlight(date) { + if (!this.FlightContractDetails.is_multi_day) { + return false; // If not multi-day event, don't highlight any date + } + let currentDate = new Date(date.year, date.month, date.day); + currentDate.setHours(0, 0, 0, 0); + if (this.FlightContractDetails?.multi_day_operation_type === 'RANGE') { + let fromDate = new Date(this.FlightContractDetails.operation_from); + let toDate = new Date(this.FlightContractDetails.operation_to); + fromDate.setHours(0, 0, 0, 0); + toDate.setHours(0, 0, 0, 0); + if (currentDate < fromDate || currentDate > toDate) { + return false; // currentDate is outside the range, don't highlight + } + return this.FlightContractDetails.departure_days.includes(currentDate.toLocaleDateString('en-US', { weekday: 'long' })); + } else { + return this.DatesListArray.some(e => e == moment(currentDate).format('YYYY-MM-DD')); + } + } + + @ViewChild('from_date') from_date; + @ViewChild('to_date') to_date; + onSelect(date, caleder) { + if (date && !this.checkDateForHighlight(date)) { + if (caleder == 'from_date') { + this.from_date.overlayVisible = true; + this.Formdata.get('from_date').setValue(null); + } else { + this.to_date.overlayVisible = true; + this.Formdata.get('to_date').setValue(null); + } + }; + }; + + ResetForm() { + this.Formdata.reset(); + }; + + GetAircraftTypeById(data) { + let obj = { + aircraft_type_id: data + } + this.ApiServ.Post('/MasterSearch/GetAircraftTypeById', obj).subscribe(res => { + if (res) { + this._flightContractService.AllAirCraftList = res.data; + setTimeout(() => { + this._flightContractService.AllAirCraftList = []; + }, 500); + } + }); + }; + GetAirportsByAirportCode(data) { + let obj = { + airport_code: data + } + this.ApiServ.AdminGoPost('/Airport/GetAirportsByAirportCode', obj).subscribe(res => { + if (res) { + if (res.Result && res.Result.length > 0) { + this._flightContractService.AirportList = res.Result; + this._flightContractService.AirportList = this._flightContractService.AirportList.map(e => ({ 'ac': e.airport_code, 'ct': e.city_name })); + } + setTimeout(() => { + this._flightContractService.AirportList = []; + }, 500); + } + }); + }; + GetAirlineByAirlineCode(data) { + let obj = { + airline_code: data + } + this.ApiServ.AdminGoPost('/MasterSearch/GetAirlineByAirlineCode', obj).subscribe(res => { + if (res) { + this._flightContractService.AirlineList = res.Result; + setTimeout(() => { + this._flightContractService.AirlineList = []; + }, 500); + + } + }); + }; + public dateValidation(toDate): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (toDate && control.value < toDate) { + return { 'range': true }; + } + } + return null; + }; + } + Update_Validation() { + let from_date = this.Formdata.get('from_date').value; + if (from_date) { + this.Formdata.get("to_date").clearValidators(); + this.Formdata.get("to_date").setErrors(null); + this.Formdata.get("to_date").addValidators(Validators.compose([Validators.required, this.dateValidation(from_date)])); + this.Formdata.get("to_date").updateValueAndValidity(); + } + } + backClick() { + this.router.navigateByUrl("Services/FlightInventory/Search"); + } + selectAllDays() { + const weekDays = this.WeekDaysList.map(day => day); + this.Formdata.controls['days'].setValue(weekDays); + }; + + IsAllDaysSelected(): boolean { + let alldays = this.WeekDaysList.every(e => { + if (this.Formdata.controls['days']?.value && this.Formdata.controls['days']?.value.includes(e)) { + return true + } + return false + }) + return alldays + } + + clearAllDays() { + this.Formdata.controls['days'].setValue([]); + } +} diff --git a/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-rate-inventory/edit-rate-inventory.component.html b/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-rate-inventory/edit-rate-inventory.component.html new file mode 100644 index 0000000..a08f38d --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-rate-inventory/edit-rate-inventory.component.html @@ -0,0 +1,1128 @@ + +
    +
    +
    +

    Date Filter

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    + +
    + Departure Date +
    + Please + select date type +
    +
    +
    +
    + + + +
    + + {{date.day}} + + + {{date.day}} + +
    +
    + Please + select from date +
    +
    +
    +
    + + + +
    + + {{date.day}} + + + {{date.day}} + +
    +
    + Please + select to date + Please + select to date greater than from date +
    +
    +
    +
    + + + +
    +
    +
    +

    Departure Days

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Outbound Days

    +
    + +
    +
    + +
    +
    + Please + select rbd +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +

    Fare Family Group

    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +

    Round Trip Discount Type

    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +

    Check Bag Unit

    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +

    Cabin Bag Unit

    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +

    Refund Type

    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +

    Confirmation Type

    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +

    Meal Included

    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    Date
    +
    +
    Return Date
    +
    +
    + Stop Sale +
    +
    +
    + Fare Family Group +
    +
    +
    + Fare Family Name +
    +
    +
    + Adult Base Fare +
    +
    +
    + Adult Taxes +
    +
    +
    + Child Base Fare +
    +
    +
    + Child Taxes +
    +
    +
    + Infant Base Fare +
    +
    +
    + Infant Taxes +
    +
    +
    + Round Trip Discount Type +
    +
    +
    + Apply discount with same VC Only +
    +
    +
    + Adult Round Trip Discount +
    (on Base fare)
    +
    +
    +
    + Child Round Trip Discount +
    (on Base fare)
    +
    +
    +
    + Infant Round Trip Discount +
    (on Base fare)
    +
    +
    +
    + Seats Allocation +
    +
    +
    + Booked Seats +
    +
    +
    + Remaining Seats +
    +
    +
    + Cancelled Seats +
    +
    +
    + Checked Bag Included +
    +
    +
    + Adult Check Bag +
    +
    +
    + Child Check Bag +
    +
    +
    + Infant Check Bag +
    +
    +
    + Check Bag Unit +
    +
    +
    + Adult Cabin Bag
    +
    +
    + Child Cabin Bag
    +
    +
    + Infant Cabin Bag
    +
    +
    + Cabin Bag Unit
    +
    +
    + Refund Type
    +
    +
    + PNR +
    +
    +
    + Confirmation type +
    +
    +
    + Adult Fare Rule
    +
    +
    + Child Fare Rule
    +
    +
    + Infant Fare Rule
    +
    +
    + Meal Included
    +
    +
    + Meal Details
    +
    +
    + Inclusions
    +
    +
    + Updated By
    +
    +
    + Updated On
    +
    + {{item.get('departure_date').value}} + + {{item.get('return_date').value}} + +
    + +
    +
    +
    + + +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    + +
    +
    +
    +
    +
    + + +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + +
    Confirmation Type
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-rate-inventory/edit-rate-inventory.component.ts b/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-rate-inventory/edit-rate-inventory.component.ts new file mode 100644 index 0000000..ab3c74a --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-manage/edit-rate-inventory/edit-rate-inventory.component.ts @@ -0,0 +1,664 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { FormArray, FormBuilder, FormControl, FormGroup, Validators, AbstractControl, ValidatorFn } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { NgSelectComponent } from '@ng-select/ng-select'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { FlightRateArray } from 'src/app/core/models/flight-service/flight-contracts.model'; +import { API } from 'src/app/core/services/api.service'; +import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service'; + +@Component({ + selector: 'app-edit-rate-inventory', + templateUrl: './edit-rate-inventory.component.html', +}) +export class EditRateInventoryComponent implements OnInit { + + constructor( + public _staticService: StaticDataService, + public activateRoute: ActivatedRoute, + public validationService: ValidationService, + public _flightContractService: FlightContractService, + private Fb: FormBuilder, + public _commonService: CommonFunctionService, + private ApiServ: API, + public router: Router, + ) { } + + + ContractId; + Defaultdate; + Formdata: FormGroup; + ngOnInit(): void { + this.PageSetUp(); + }; + PageSetUp() { + this.ContractId = this.activateRoute.snapshot.paramMap.get('ContractId'); + this.GetFlightContratByID(); + }; + + FlightContractDetails; + DatesListArray = []; + FareFamilyList = []; + IsChild = false; + IsInfant = false; + GetFlightContratByID() { + this.ApiServ.Get('/FlightContract/GetFlightContractByID/' + this.ContractId).subscribe(res => { + if (res) { + this.FlightContractDetails = res.data; + if (this.FlightContractDetails.departure_dates && this.FlightContractDetails.multi_day_operation_type == 'SPECIFICDATES') { + let datelist = this.FlightContractDetails.departure_dates.split(','); + if (datelist && datelist.length > 0) { + this.DatesListArray = datelist.map(e => { + let date = new Date(e); + date.setHours(0, 0, 0, 0); + return moment(date).format('YYYY-MM-DD') + }); + } + }; + if (this.FlightContractDetails?.operation_from && this.FlightContractDetails?.operation_to) { + let from_date = new Date(this.FlightContractDetails.operation_from); + let to_date = new Date(this.FlightContractDetails.operation_from); + if (this.FlightContractDetails.departure_dates && this.FlightContractDetails.multi_day_operation_type == 'SPECIFICDATES') { + let datelist = this.FlightContractDetails.departure_dates.split(','); + let dates = []; + datelist.forEach(e => { + if (new Date(e) >= new Date()) dates.push(e) + }); + from_date = new Date(dates[0]); + to_date = new Date(datelist[datelist.length - 1]); + } + let current_date = new Date(); + from_date.setHours(0, 0, 0, 0); + to_date.setHours(0, 0, 0, 0); + current_date.setHours(0, 0, 0, 0); + if (from_date.getTime() < current_date.getTime() && to_date.getTime() > current_date.getTime()) { + this.Defaultdate = current_date; + } else { + this.Defaultdate = from_date; + } + } + if (this.FlightContractDetails['contracted_pax_type'].includes('C')) this.IsChild = true; + if (this.FlightContractDetails['contracted_pax_type'].includes('I')) this.IsInfant = true; + this.OnIntForm(); + for (let index = 1; index <= 3; index++) { + this.FareFamilyList.push(index) + }; + } + }); + }; + WeekDaysList = []; + AtoZ = [] + OnIntForm() { + this.Formdata = this.Fb.group({ + Default: [''], + _rbd: this.validationService.required, + currency: [this.FlightContractDetails.currency_code], + contracted_pax_type: [this.FlightContractDetails.contracted_pax_type], + FlightsRate: this.Fb.array([]) + }); + this.AtoZ = this.FlightContractDetails.rbd?.split(',') || []; + this.AtoZ = [...new Set(this.AtoZ)]; + if (this.FlightContractDetails?.is_multi_day) { + this.Formdata.addControl('date_type', this.validationService.required); + this.Formdata.addControl('from_date', this.validationService.required); + this.Formdata.addControl('to_date', this.validationService.required); + if (this.FlightContractDetails.multi_day_operation_type == 'RANGE') { + this._staticService.WeekDaysList.forEach(e => { + if (this.FlightContractDetails?.departure_days?.includes(e.Itemkey2)) this.WeekDaysList.push(e.Itemkey2); + }) + this.Formdata.addControl('days', this.Fb.control('')); + }; + } else { + this.Formdata.get('Default').setValue(this.FlightContractDetails.departure_date); + }; + }; + ResetForm() { + this.Formdata.get('_rbd')?.setValue(''); + this.Formdata.get('contracted_pax_type')?.setValue(''); + this.Formdata.get('date_type')?.setValue(''); + this.Formdata.get('from_date')?.setValue(null); + this.Formdata.get('to_date')?.setValue(null); + this.Formdata.get('days')?.setValue(null); + this.Formdata.markAsUntouched(); + } + get FlightsRate() { + return this.Formdata.get('FlightsRate') as FormArray; + } + + GetFlightRateList() { + if ( + this.Formdata.get('_rbd')?.invalid || + this.Formdata.get('date_type')?.invalid || + this.Formdata.get('from_date')?.invalid || + this.Formdata.get('to_date')?.invalid + ) { + this.validationService.showValidationsMsg(this.Formdata); + setTimeout(() => { + this.validationService.scrollToError(); + }, 50); + return; + } + let value = this.Formdata.getRawValue(); + let requestObject = { + contract_id: this.ContractId, + date_type: value.date_type, + from_date: '', + to_date: '', + days: '', + rbd: value._rbd, + flight_details: [], + }; + if (this.FlightContractDetails?.is_multi_day) { + requestObject.from_date = this._commonService.convertDateToSave(value.from_date); + requestObject.to_date = this._commonService.convertDateToSave(value.to_date); + requestObject.days = value.days ? value.days.join(',') : ''; + } else { + requestObject.from_date = this._commonService.convertDateToSave(value.Default); + requestObject.to_date = this._commonService.convertDateToSave(value.Default); + const date = moment(value.Default); + const dayName = date.format('dddd'); + requestObject.days = dayName; + }; + this.ApiServ.Post('/FlightContract/GetAllFlightRateBySearch', requestObject).subscribe(res => { + if (res) { + if (res['status']) this.SetValForm(res.data); + if (!res['status']) this._commonService.showMessage(res['status'], res['message']); + } + }); + }; + SaveFlightsRate() { + if (this.FlightsRate.invalid) { + this.validationService.showValidationsMsg(this.FlightsRate); + setTimeout(() => { + this.validationService.scrollToError(); + }, 50); + return; + } + let value = this.FlightsRate.getRawValue(); + let FlightRate = []; + value.forEach((e, i) => { + if (this.FlightsRate.controls[i].dirty) { + let postObject = new FlightRateArray(); + postObject.contract_id = this.ContractId; + postObject.contract_date_unique_id = e.contract_date_unique_id; + postObject.rate_id = e.rate_id; + postObject.fare_family_group_id = e.fare_family_group_id.toString(); + postObject.fare_family_name = e.fare_family_name; + postObject.adt_base_fare = e.adt_base_fare ? parseFloat(e.adt_base_fare) : 0; + postObject.adt_tax = e.adt_tax ? parseFloat(e.adt_tax) : 0; + postObject.chd_base_fare = e?.chd_base_fare ? parseFloat(e?.chd_base_fare) : 0; + postObject.chd_tax = e.chd_tax ? parseFloat(e.chd_tax) : 0; + postObject.inf_base_fare = e?.inf_base_fare ? parseFloat(e?.inf_base_fare) : 0; + postObject.inf_tax = e?.inf_tax ? parseFloat(e?.inf_tax) : 0; + postObject.round_trip_discount_type = e.round_trip_discount_type; + postObject.is_apply_discount_with_same_vc_only = e.is_apply_discount_with_same_vc_only; + postObject.adult_round_trip_discount = e.adult_round_trip_discount ? parseFloat(e.adult_round_trip_discount) : 0; + postObject.child_round_trip_discount = e?.child_round_trip_discount ? parseFloat(e?.child_round_trip_discount) : 0; + postObject.infant_round_trip_discount = e?.infant_round_trip_discount ? parseFloat(e?.infant_round_trip_discount) : 0; + postObject.seat_allocation = e?.seat_allocation ? parseFloat(e?.seat_allocation) : 0; + postObject.is_checked_bag_included = e.is_checked_bag_included; + postObject.adt_check_bag = e.adt_check_bag; + postObject.chd_check_bag = e?.chd_check_bag ? e?.chd_check_bag : ''; + postObject.inf_check_bag = e?.inf_check_bag ? e?.inf_check_bag : ''; + postObject._check_bag_unit = e._check_bag_unit; + postObject.adt_cabin_bag = e.adt_cabin_bag; + postObject.chd_cabin_bag = e?.chd_cabin_bag ? e?.chd_cabin_bag : ''; + postObject.inf_cabin_bag = e?.inf_cabin_bag ? e?.inf_cabin_bag : ''; + postObject._cabin_bag_unit = e._cabin_bag_unit; + postObject.refund_type = e.refund_type; + postObject.adt_fare_rule = e.adt_fare_rule; + postObject.chd_fare_rule = e?.chd_fare_rule ? e?.chd_fare_rule : ''; + postObject.inf_fare_rule = e?.inf_fare_rule ? e?.inf_fare_rule : ''; + postObject.is_meal_included = e.is_meal_included == 'Yes' ? true : false; + postObject.meal_details = e.meal_details; + postObject.inclusions = e.inclusions; + postObject.pnr = e.pnr; + postObject.is_instant_confirmation = e.is_instant_confirmation == 'INSTANT' ? true : false; + postObject.is_stop_sale = e.is_stop_sale; + FlightRate.push(postObject); + } + }); + this.ApiServ.Post('/FlightContract/UpdateFlightRate', FlightRate).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + setTimeout(() => { + res['status'] ? this.router.navigate(['/Services/FlightInventory/Search']) : ''; + }, 500); + } + }); + }; + SetValForm(RateList) { + this.FlightsRate.clear(); + let datesort = RateList.sort((a, b) => { + const timestampA = new Date(a.departure_date).getTime(); + const timestampB = new Date(b.departure_date).getTime(); + return timestampA - timestampB; + }); + datesort.forEach((object, i) => { + this.addFlightsRateGroupBtn(); + this.FlightsRate.controls[i]?.get('contract_date_unique_id')?.setValue(object?.contract_date_unique_id); + this.FlightsRate.controls[i]?.get('rate_id')?.setValue(object?.rate_id); + this.FlightsRate.controls[i]?.get('departure_date')?.setValue(object?.departure_date ? moment(object?.departure_date).format('DD MMM YYYY') : ''); + this.FlightsRate.controls[i]?.get('return_date')?.setValue(object?.return_date ? moment(object?.return_date).format('DD MMM YYYY') : ''); + this.FlightsRate.controls[i]?.get('is_stop_sale')?.setValue(object?.is_stop_sale); + this.FlightsRate.controls[i]?.get('fare_family_group_id')?.setValue(object?.fare_family_group_id); + this.FlightsRate.controls[i]?.get('fare_family_name')?.setValue(object?.fare_family_name); + this.FlightsRate.controls[i]?.get('adt_base_fare')?.setValue(object?.adt_base_fare); + this.FlightsRate.controls[i]?.get('adt_tax')?.setValue(object?.adt_tax); + this.FlightsRate.controls[i]?.get('chd_base_fare')?.setValue(object?.chd_base_fare); + this.FlightsRate.controls[i]?.get('chd_tax')?.setValue(object?.chd_tax); + this.FlightsRate.controls[i]?.get('inf_base_fare')?.setValue(object?.inf_base_fare); + this.FlightsRate.controls[i]?.get('inf_tax')?.setValue(object?.inf_tax); + if (this.FlightContractDetails?.trip_type == 'ONEWAY') { + this.FlightsRate.controls[i]?.get('round_trip_discount_type')?.setValue(object?.round_trip_discount_type); + this.FlightsRate.controls[i]?.get('is_apply_discount_with_same_vc_only')?.setValue(object?.is_apply_discount_with_same_vc_only); + this.UpdateFareType(this.FlightsRate.controls[i]); + this.FlightsRate.controls[i]?.get('adult_round_trip_discount')?.setValue(object?.adult_round_trip_discount); + this.FlightsRate.controls[i]?.get('child_round_trip_discount')?.setValue(object?.child_round_trip_discount); + this.FlightsRate.controls[i]?.get('infant_round_trip_discount')?.setValue(object?.infant_round_trip_discount); + } + this.FlightsRate.controls[i]?.get('seat_allocation')?.setValue(object?.seat_allocation); + this.FlightsRate.controls[i]?.get('seat_booked')?.setValue(object?.seat_booked); + this.FlightsRate.controls[i]?.get('seat_cancelled')?.setValue(object?.seat_cancelled); + this.FlightsRate.controls[i]?.get('seat_remains')?.setValue(object?.seat_remains); + this.FlightsRate.controls[i]?.get('is_checked_bag_included')?.setValue(object?.is_checked_bag_included); + this.UpdateBag(this.FlightsRate.controls[i]); + if (object?.is_checked_bag_included) { + this.FlightsRate.controls[i]?.get('adt_check_bag')?.setValue(object?.adt_check_bag); + this.FlightsRate.controls[i]?.get('chd_check_bag')?.setValue(object?.chd_check_bag); + this.FlightsRate.controls[i]?.get('inf_check_bag')?.setValue(object?.inf_check_bag); + this.FlightsRate.controls[i]?.get('_check_bag_unit')?.setValue(object?._check_bag_unit); + } + this.FlightsRate.controls[i]?.get('adt_cabin_bag')?.setValue(object?.adt_cabin_bag); + this.FlightsRate.controls[i]?.get('chd_cabin_bag')?.setValue(object?.chd_cabin_bag); + this.FlightsRate.controls[i]?.get('inf_cabin_bag')?.setValue(object?.inf_cabin_bag); + this.FlightsRate.controls[i]?.get('_cabin_bag_unit')?.setValue(object?._cabin_bag_unit); + this.FlightsRate.controls[i]?.get('refund_type')?.setValue(object?.refund_type); + this.FlightsRate.controls[i]?.get('pnr')?.setValue(object?.pnr); + this.FlightsRate.controls[i]?.get('adt_fare_rule')?.setValue(object?.adt_fare_rule); + this.FlightsRate.controls[i]?.get('chd_fare_rule')?.setValue(object?.chd_fare_rule); + this.FlightsRate.controls[i]?.get('inf_fare_rule')?.setValue(object?.inf_fare_rule); + this.FlightsRate.controls[i]?.get('is_instant_confirmation')?.setValue(object?.is_instant_confirmation ? 'INSTANT' : 'MANUAL'); + this.FlightsRate.controls[i]?.get('is_meal_included')?.setValue(object?.is_meal_included ? 'Yes' : 'No'); + this.UpdateMealTypeIncluded(this.FlightsRate.controls[i]); + if (object?.is_meal_included) { + this.FlightsRate.controls[i]?.get('meal_details')?.setValue(object?.meal_details); + } + this.FlightsRate.controls[i]?.get('inclusions')?.setValue(object?.inclusions); + this.FlightsRate.controls[i]?.get('updated_by')?.setValue(object?.updated_by); + this.FlightsRate.controls[i]?.get('updated_on')?.setValue(object?.updated_on ? this._commonService.convertDateToShow(object?.updated_on) : ''); + }); + }; + addFlightsRateGroupBtn() { + this.FlightsRate.push( + this.Fb.group({ + contract_date_unique_id: this.validationService.required, + rate_id: this.validationService.required, + departure_date: [''], + return_date: [''], + fare_family_group_id: this.validationService.required, + fare_family_name: this.validationService.required, + adt_base_fare: this.validationService.decimal, + adt_tax: this.validationService.decimal, + round_trip_discount_type: [''], + seat_allocation: this.validationService.decimal, + seat_booked: [], + seat_remains: [], + seat_cancelled: [], + is_checked_bag_included: [false], + adt_check_bag: [{ value: '', disabled: true }], + _check_bag_unit: [{ value: '', disabled: true }], + adt_cabin_bag: this.validationService.required, + _cabin_bag_unit: this.validationService.required, + refund_type: this.validationService.required, + adt_fare_rule: this.validationService.required, + is_meal_included: [false], + meal_details: [{ value: null, disabled: true }], + inclusions: [''], + pnr: [], + is_instant_confirmation: [false], + is_stop_sale: [false], + is_apply_discount_with_same_vc_only: [false], + updated_by: [], + updated_on: [], + }) + ); + this.AddUpdatePaxWiseControls(); + }; + // ------------------------------------------------------------------------------------------------------------------------ + AddUpdatePaxWiseControls() { + let grp = this.FlightsRate.controls[this.FlightsRate.controls.length - 1]; + if (this.IsChild) this.UpdatePaxWiseControls(grp, 'chd', true); + if (this.IsInfant) this.UpdatePaxWiseControls(grp, 'inf', true); + }; + UpdatePaxWiseControls(group, name, check) { + let grp = group as FormGroup; + let discountName = name == 'chd' ? 'child' : 'infant'; + if (check) { + grp.addControl(name + '_base_fare', this.validationService.decimal); + grp.addControl(name + '_tax', this.validationService.decimal); + grp.addControl(name + '_check_bag', this.Fb.control({ value: null, disabled: true })); + grp.addControl(name + '_cabin_bag', this.validationService.required); + grp.addControl(name + '_fare_rule', this.validationService.required); + grp.addControl(discountName + '_round_trip_discount', this.Fb.control(null)); + } else { + grp.removeControl(name + '_base_fare'); + grp.removeControl(name + '_tax'); + grp.removeControl(name + '_check_bag'); + grp.removeControl(name + '_cabin_bag'); + grp.removeControl(name + '_fare_rule'); + grp.removeControl(discountName + '_round_trip_discount'); + } + }; + UpdateBag(grp) { + let group = grp as FormGroup; + let controls = [ + 'adt_check_bag', + 'chd_check_bag', + 'inf_check_bag', + '_check_bag_unit', + // 'adt_cabin_bag', + // 'chd_cabin_bag', + // 'inf_cabin_bag', + // '_cabin_bag_unit', + ]; + if (group.get('is_checked_bag_included').value) controls.forEach(e => this.UpdateControlsValidation(group, e, 'add')); + else controls.forEach(e => this.UpdateControlsValidation(group, e, 'remove')); + if (group.get('is_checked_bag_included').value) controls.forEach(e => group.get(e)?.enable()); + else { + controls.forEach(e => { + group.get(e)?.disable(); + group.get(e)?.setValue(''); + }); + } + }; + UpdateValidationforDiscountTypegroup(group, event) { + let grpcontrols = group as FormGroup; + let vaidation_type = event ? 'add' : 'remove'; + this.UpdateControlsValidation(grpcontrols, 'adult_round_trip_discount', vaidation_type); + if (this.IsChild) { + this.UpdateControlsValidation(grpcontrols, 'child_round_trip_discount', vaidation_type) + } + if (this.IsInfant) { + this.UpdateControlsValidation(grpcontrols, 'infant_round_trip_discount', vaidation_type) + } + + } + UpdateFareType(group) { + let grpcontrols = group as FormGroup; + if (this.FlightContractDetails?.trip_type == 'ONEWAY') { + grpcontrols.addControl('adult_round_trip_discount', new FormControl('')); + if (this.IsChild) { + grpcontrols.addControl('child_round_trip_discount', new FormControl('')); + } + if (this.IsInfant) { + grpcontrols.addControl('infant_round_trip_discount', new FormControl('')); + } + } + this.UpdateValidationforDiscountTypegroup(group, grpcontrols.get('round_trip_discount_type').value); + }; + UpdateMealTypeIncluded(grp) { + let group = grp as FormGroup; + if (group.get('is_meal_included').value == 'Yes') { + group.get('meal_details').enable() + this.UpdateControlsValidation(group, 'meal_details', 'add'); + } + else { + group.get('meal_details').disable(); + group.get('meal_details').setValue(''); + this.UpdateControlsValidation(group, 'meal_details', 'remove'); + } + }; + UpdateControlsValidation(group, name, type) { + if (type == 'add') { + group.get(name)?.addValidators([Validators.required]); + group.get(name)?.updateValueAndValidity(); + } else { + group.get(name)?.clearValidators(); + group.get(name)?.updateValueAndValidity(); + group.get(name)?.markAsUntouched(); + }; + }; + // ----------------------------------------------------------------------------------------------------------------------- + checkDateForHighlight(date) { + if (!this.FlightContractDetails.is_multi_day) { + return false; // If not multi-day event, don't highlight any date + } + let currentDate = new Date(date.year, date.month, date.day); + currentDate.setHours(0, 0, 0, 0); + if (this.FlightContractDetails?.multi_day_operation_type === 'RANGE') { + let fromDate = new Date(this.FlightContractDetails.operation_from); + let toDate = new Date(this.FlightContractDetails.operation_to); + fromDate.setHours(0, 0, 0, 0); + toDate.setHours(0, 0, 0, 0); + if (currentDate < fromDate || currentDate > toDate) { + return false; // currentDate is outside the range, don't highlight + } + return this.FlightContractDetails.departure_days.includes(currentDate.toLocaleDateString('en-US', { weekday: 'long' })); + } else { + return this.DatesListArray.some(e => e == moment(currentDate).format('YYYY-MM-DD')); + } + }; + @ViewChild('from_date') from_date; + @ViewChild('to_date') to_date; + onSelect(date, caleder) { + if (date && !this.checkDateForHighlight(date)) { + if (caleder == 'from_date') { + this.from_date.overlayVisible = true; + this.Formdata.get('from_date').setValue(null); + } else { + this.to_date.overlayVisible = true; + this.Formdata.get('to_date').setValue(null); + } + }; + }; + Option = [ + { value: 'Yes' }, + { value: 'No' }, + ]; + + + // copy on UI function + @ViewChild('is_stop_sale') is_stop_sale: ElementRef; + @ViewChild('fare_family_group_id') fare_family_group_id: NgSelectComponent; + @ViewChild('fare_family_name') fare_family_name: ElementRef; + @ViewChild('adt_base_fare') adt_base_fare: ElementRef; + @ViewChild('adt_tax') adt_tax: ElementRef; + @ViewChild('chd_base_fare') chd_base_fare: ElementRef; + @ViewChild('chd_tax') chd_tax: ElementRef; + @ViewChild('inf_base_fare') inf_base_fare: ElementRef; + @ViewChild('inf_tax') inf_tax: ElementRef; + @ViewChild('round_trip_discount_type') round_trip_discount_type: NgSelectComponent; + @ViewChild('is_apply_discount_with_same_vc_only') is_apply_discount_with_same_vc_only: ElementRef; + @ViewChild('adult_round_trip_discount') adult_round_trip_discount: ElementRef; + @ViewChild('child_round_trip_discount') child_round_trip_discount: ElementRef; + @ViewChild('infant_round_trip_discount') infant_round_trip_discount: ElementRef; + @ViewChild('seat_allocation') seat_allocation: ElementRef; + @ViewChild('is_checked_bag_included') is_checked_bag_included: ElementRef; + @ViewChild('adt_check_bag') adt_check_bag: ElementRef; + @ViewChild('chd_check_bag') chd_check_bag: ElementRef; + @ViewChild('inf_check_bag') inf_check_bag: ElementRef; + @ViewChild('_check_bag_unit') _check_bag_unit: NgSelectComponent; + @ViewChild('adt_cabin_bag') adt_cabin_bag: ElementRef; + @ViewChild('chd_cabin_bag') chd_cabin_bag: ElementRef; + @ViewChild('inf_cabin_bag') inf_cabin_bag: ElementRef; + @ViewChild('_cabin_bag_unit') _cabin_bag_unit: NgSelectComponent; + @ViewChild('refund_type') refund_type: NgSelectComponent; + @ViewChild('pnr') pnr: ElementRef; + @ViewChild('is_instant_confirmation') is_instant_confirmation: NgSelectComponent; + @ViewChild('adt_fare_rule') adt_fare_rule: ElementRef; + @ViewChild('chd_fare_rule') chd_fare_rule: ElementRef; + @ViewChild('inf_fare_rule') inf_fare_rule: ElementRef; + @ViewChild('is_meal_included') is_meal_included: NgSelectComponent; + @ViewChild('meal_details') meal_details: ElementRef; + @ViewChild('inclusions') inclusions: ElementRef; + + MainFormGrpCopyOnUI(type, name, ViewChild) { + if (type == 'CheckBox') { + this.FlightsRate.controls.forEach((group) => { + group.get(name)?.setValue(ViewChild['_checked']); + group.markAsDirty(); + }) + } else if (type == 'dropdown') { + if (ViewChild?.selectedValues[0]?.value) this.FlightsRate.controls.forEach((group) => { + group.get(name)?.setValue(ViewChild.selectedValues[0]?.value); + group.markAsDirty(); + }) + else this.FlightsRate.controls.forEach((group) => { + group.get(name)?.setValue(ViewChild.selectedValues[0]); + group.markAsDirty(); + }) + } else if (type == 'text') { + if (ViewChild?.nativeElement?.value) this.FlightsRate.controls.forEach((group) => { + group.get(name)?.setValue(ViewChild.nativeElement.value); + group.markAsDirty(); + }) + else this.FlightsRate.controls.forEach((group) => { + group.get(name)?.setValue(ViewChild.value); + group.markAsDirty(); + }) + } + this.FlightsRate.updateValueAndValidity(); + }; + copyOnUiFareTypeApplicability(ViewChild, check, name) { + this.FlightsRate.controls.forEach((group) => { + if (check == 'dropdown') { + if (ViewChild?.selectedValues[0]?.value) group.get(name)?.setValue(ViewChild.selectedValues[0]?.value) + else group.get(name)?.setValue(ViewChild.selectedValues[0]) + group.markAsDirty(); + } else if (check == 'text') { + if (ViewChild?.nativeElement?.value) group.get(name)?.setValue(ViewChild.nativeElement.value) + else group.get(name)?.setValue(ViewChild.value) + group.markAsDirty(); + } + }); + }; + copyOnUiCheckedBagIncluded(ViewChild, check, name) { + this.FlightsRate.controls.forEach((group) => { + if (check == 'main') { + group.get('is_checked_bag_included')?.setValue(ViewChild['_checked']); + this.UpdateBag(group); + group.markAsDirty(); + } else { + if (group.get('is_checked_bag_included').value) { + if (check == 'dropdown') { + if (ViewChild?.selectedValues[0]?.value) group.get(name)?.setValue(ViewChild.selectedValues[0]?.value) + else group.get(name)?.setValue(ViewChild.selectedValues[0]) + group.markAsDirty(); + } else if (check == 'text') { + if (ViewChild?.nativeElement?.value) group.get(name)?.setValue(ViewChild.nativeElement.value) + else group.get(name)?.setValue(ViewChild.value) + group.markAsDirty(); + } + }; + } + }); + }; + copyOnUiMealIncluded(ViewChild, check, name) { + this.FlightsRate.controls.forEach((group) => { + if (check == 'main') { + if (ViewChild?.selectedValues[0]?.value) group.get('is_meal_included')?.setValue(ViewChild.selectedValues[0]?.value); + else group.get('is_meal_included')?.setValue(ViewChild.selectedValues[0]) + this.UpdateMealTypeIncluded(group); + group.markAsDirty(); + } else { + if (group.get('is_meal_included').value == 'Yes') { + if (check == 'text') { + if (ViewChild?.nativeElement?.value) group.get(name)?.setValue(ViewChild.nativeElement.value) + else group.get(name)?.setValue(ViewChild.value) + group.markAsDirty(); + }; + }; + } + }); + } + copyOnUi() { + this.FlightsRate.controls.forEach((group) => { + group.get('is_stop_sale')?.setValue(this.is_stop_sale['_checked']); + group.get('fare_family_group_id')?.setValue(this.fare_family_group_id?.selectedValues[0] || null); + group.get('fare_family_name')?.setValue(this.fare_family_name.nativeElement.value); + group.get('adt_base_fare')?.setValue(this.adt_base_fare.nativeElement.value); + group.get('adt_tax')?.setValue(this.adt_tax.nativeElement.value); + group.get('chd_base_fare')?.setValue(this.chd_base_fare.nativeElement.value); + group.get('chd_tax')?.setValue(this.chd_tax.nativeElement.value); + group.get('inf_base_fare')?.setValue(this.inf_base_fare.nativeElement.value); + group.get('inf_tax')?.setValue(this.inf_tax.nativeElement.value); + if (this.FlightContractDetails?.trip_type == 'ONEWAY') { + group.get('round_trip_discount_type')?.setValue(this.round_trip_discount_type?.selectedValues[0]?.value); + this.UpdateValidationforDiscountTypegroup(group, this.round_trip_discount_type?.selectedValues[0]?.value); + group.get('is_apply_discount_with_same_vc_only')?.setValue(this.is_apply_discount_with_same_vc_only['_checked']); + group.get('adult_round_trip_discount')?.setValue(this.adult_round_trip_discount.nativeElement.value); + group.get('child_round_trip_discount')?.setValue(this.child_round_trip_discount.nativeElement.value); + group.get('infant_round_trip_discount')?.setValue(this.infant_round_trip_discount.nativeElement.value); + } + group.get('seat_allocation')?.setValue(this.seat_allocation.nativeElement.value); + group.get('is_checked_bag_included')?.setValue(this.is_checked_bag_included['_checked']); + this.UpdateBag(group); + if (this.is_checked_bag_included['_checked']) { + group.get('adt_check_bag')?.setValue(this.adt_check_bag.nativeElement.value); + group.get('chd_check_bag')?.setValue(this.chd_check_bag.nativeElement.value); + group.get('inf_check_bag')?.setValue(this.inf_check_bag.nativeElement.value); + group.get('_check_bag_unit')?.setValue(this._check_bag_unit?.selectedValues[0]?.value); + } + group.get('adt_cabin_bag')?.setValue(this.adt_cabin_bag.nativeElement.value); + group.get('chd_cabin_bag')?.setValue(this.chd_cabin_bag.nativeElement.value); + group.get('inf_cabin_bag')?.setValue(this.inf_cabin_bag.nativeElement.value); + group.get('_cabin_bag_unit')?.setValue(this._cabin_bag_unit?.selectedValues[0]?.value); + group.get('refund_type')?.setValue(this.refund_type?.selectedValues[0]?.value); + group.get('pnr')?.setValue(this.pnr.nativeElement.value); + group.get('is_instant_confirmation')?.setValue(this.is_instant_confirmation?.selectedValues[0]?.value); + group.get('adt_fare_rule')?.setValue(this.adt_fare_rule.nativeElement.value); + group.get('chd_fare_rule')?.setValue(this.chd_fare_rule.nativeElement.value); + group.get('inf_fare_rule')?.setValue(this.inf_fare_rule.nativeElement.value); + group.get('is_meal_included')?.setValue(this.is_meal_included?.selectedValues[0]?.value); + this.UpdateMealTypeIncluded(group); + group.get('meal_details')?.setValue(this.meal_details.nativeElement.value); + group.get('inclusions')?.setValue(this.inclusions.nativeElement.value); + }) + + }; + + public dateValidation(toDate): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (toDate && control.value < toDate) { + return { 'range': true }; + } + } + return null; + }; + } + Update_Validation() { + let from_date = this.Formdata.get('from_date').value; + if (from_date) { + this.Formdata.get("to_date").clearValidators(); + this.Formdata.get("to_date").setErrors(null); + this.Formdata.get("to_date").addValidators(Validators.compose([Validators.required, this.dateValidation(from_date)])); + this.Formdata.get("to_date").updateValueAndValidity(); + } + } + backClick() { + this.router.navigateByUrl("Services/FlightInventory/Search"); + } + selectAllDays() { + const weekDays = this.WeekDaysList.map(day => day); + this.Formdata.controls['days'].setValue(weekDays); + }; + + IsAllDaysSelected(): boolean { + let alldays = this.WeekDaysList.every(e => { + if (this.Formdata.controls['days']?.value && this.Formdata.controls['days']?.value.includes(e)) { + return true + } + return false + }) + return alldays + } + + clearAllDays() { + this.Formdata.controls['days'].setValue([]); + } +} diff --git a/src/app/modules/services/flight-inventory/flight-inventory-manage/flight-inventory-manage.module.ts b/src/app/modules/services/flight-inventory/flight-inventory-manage/flight-inventory-manage.module.ts new file mode 100644 index 0000000..aceec10 --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-manage/flight-inventory-manage.module.ts @@ -0,0 +1,48 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { EditFlightDetailsComponent } from './edit-flight-details/edit-flight-details.component'; +import { CalendarModule } from 'primeng/calendar'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { EditRateInventoryComponent } from './edit-rate-inventory/edit-rate-inventory.component'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { ToastModule } from 'primeng/toast'; +import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: 'EditFlight/:ContractId', + component: EditFlightDetailsComponent, + }, + { + path: 'EditRateInventory/:ContractId', + component: EditRateInventoryComponent, + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'Search', + }, +]; + +@NgModule({ + declarations: [ + EditFlightDetailsComponent, + EditRateInventoryComponent + ], + imports: [ + CommonModule, + ToastModule, + NgSelectModule, + CalendarModule, + ReactiveFormsModule, + FormsModule, + TooltipModule, + MatCheckboxModule, + RouterModule.forChild(routes), + ], + providers:[FlightContractService] +}) +export class FlightInventoryManageModule { } diff --git a/src/app/modules/services/flight-inventory/flight-inventory-search/flight-inventory-search.component.html b/src/app/modules/services/flight-inventory/flight-inventory-search/flight-inventory-search.component.html new file mode 100644 index 0000000..57b240f --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-search/flight-inventory-search.component.html @@ -0,0 +1,564 @@ + +
    +
    +
    +

    Flight Inventory

    +
    + +
    +
    +
    +
    +
    + + +
    +
    + +
    +
    + + + +
    +
    +
    +

    Trip Type

    +
    + +
    +
    +
    + One Way + Round + Trip +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Validating Airline

    +
    + +
    +
    +
    + {{item.airline_name}} + ({{item.airline_code}}) + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Origin

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Destination

    +
    + +
    +
    +
    + {{item.ct}} + ({{item.ac}}) +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Departure Days

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    + +
    + Departure Date + Return + Date +
    + + Please select date type +
    +
    +
    +
    + + + + + Please select from date +
    +
    +
    +
    + + + + + Please select to date + Please + select to date greater than from date +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Currency

    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Refund Type

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    RBD

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cabin Class

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Confirmation Type

    +
    + +
    +
    + +
    +
    +
    +
    +
    + Multi Day Operation +
    +
    + One-way sale allowed +
    +
    +
    +
    + + + + + + Download + Sample excel file +
    + +
    +
    +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Contract ID + + + + Contract Name + + + + + Validating Airline + + + + Trip Type + + + + Flight No. + + + + Origin + + + + Destination + + + + + + Contracted Cabins + + + + Contracted Pax Types + + + + Multi Day Operation + + + + Currency + + + + Updated By + + + + Updated On + + + + Status + + + Action + + + + + {{data.contract_id}} + {{data.contract_name}} + {{data.validating_airline}} + {{data.trip_type}} + {{data.flight_no}} + {{data.origin}} + {{data.destination}} + + + {{data.contracted_cabin_class}} + {{data.contracted_pax_type}} + {{data.Custom_multi_day}} + {{data.currency_code}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + {{data.status}} + + + +
    + + + + + + + + +
    + + +
    + + + No data found + + +
    +
    + + +
    +
    + + + Please + enter contract name +
    +
    + + +
    +
    + + + + +
    + \ No newline at end of file diff --git a/src/app/modules/services/flight-inventory/flight-inventory-search/flight-inventory-search.component.ts b/src/app/modules/services/flight-inventory/flight-inventory-search/flight-inventory-search.component.ts new file mode 100644 index 0000000..5cd2c69 --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory-search/flight-inventory-search.component.ts @@ -0,0 +1,333 @@ +import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormBuilder, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { Router } from '@angular/router'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { FlightDetailsSearchModel } from 'src/app/core/models/flight-service/flight-contracts.model'; +import { FlightContractSearhObj } from 'src/app/core/models/flight-service/flight-service-search/flight-service-search.model'; +import { API } from 'src/app/core/services/api.service'; +import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-flight-inventory-search', + templateUrl: './flight-inventory-search.component.html', +}) +export class FlightInventorySearchComponent implements OnInit { + Formdata: FormGroup; + AirlineList; + FlightAllDetails; + Cdn_url = environment.cdnFileUrl; + constructor( + public ApiServ: API, + public fb: FormBuilder, + public router: Router, + public _commonService: CommonFunctionService, + public _staticService: StaticDataService, + public _flightContractService: FlightContractService, + public validationService: ValidationService + ) { } + cols: any[]; + tripType = [ + { value: 'ONEWAY', displayName: 'One Way' }, + { value: 'ROUNDTRIP', displayName: 'Round Trip' }, + ]; + confirmation_type = [ + { value: 'INSTANT', displayName: 'Instant' }, + { value: 'MANUAL', displayName: 'Manual' }, +]; + ngOnInit(): void { + this.pageSetUp() + } + pageSetUp() { + this.OnInitForm(); + this.cols = [ + { field: 'contract_id', header: 'Contract Id' }, + { field: 'contract_name', header: 'Contract Name' }, + { field: 'validating_airline', header: 'Validating Airline' }, + { field: 'trip_type', header: 'Trip Type' }, + { field: 'flight_no', header: 'Flight No' }, + { field: 'origin', header: 'Origin' }, + { field: 'destination', header: 'Destination' }, + { field: 'contracted_cabin_class', header: 'Contracted Cabins' }, + { field: 'contracted_pax_type', header: 'Contracted Pax Types' }, + { field: 'Custom_multi_day', header: 'Multi Day Operation' }, + { field: 'currency_code', header: 'Currency' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + { field: 'status', header: 'Status' }, + ]; + }; + + OnInitForm() { + this.Formdata = this.fb.group({ + contract_name: [null], + airline_code : [null], + validating_airline: [null], + flight_no: [null], + trip_type: [null], + cabin_class: [null], + origin: [null], + destination: [null], + departure_days: [null], + date_type: [null], + from_date: [null], + to_date: [null], + pnr: [null], + currency_code: [null], + refund_type: [null], + rbd: [null], + confirmation_type: [], + is_multi_day: [false], + is_oneway_sale_allowed: [false], + }); + // remove this when User want Round Trip + if (this._commonService.clientId == '2109111018200000021') { + this.Formdata.get('trip_type').setValue('ONEWAY'); + } + }; + FlightContractForm: FormGroup; + OnInitFlightContractForm(data) { + this.FlightContractForm = this.fb.group({ + contract_id: [data.contract_id], + contract_name: [data.contract_name, Validators.required], + contract_description: [data.contract_description], + }) + }; + saveFlightContract() { + let value = this.FlightContractForm.getRawValue(); + if (this.FlightContractForm.status == "INVALID") { + this.validationService.showValidationsMsg(this.FlightContractForm); + return; + } + let payloadObject = { + contract_id: value.contract_id, + contract_name: value.contract_name, + contract_description: value.contract_description, + }; + this.ApiServ.Post('/FlightContract/UpdateContractFlight', payloadObject).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + this.displayPosition = false; + if (res['status']) this.GetFlightDetails(); + } + }); + }; + + GetFlightDetails() { + let value = this.Formdata.getRawValue(); + if (this.Formdata.status == "INVALID") { + this.validationService.showValidationsMsg(this.Formdata); + setTimeout(() => { + this.validationService.scrollToError(); + }, 50); + return; + } + let Postdata = new FlightDetailsSearchModel(); + Postdata.contract_name = value.contract_name ? value.contract_name : ''; + Postdata.validating_airline = value.validating_airline ? value.validating_airline : ''; + Postdata.airline_code = value.airline_code ? value.airline_code : ''; + Postdata.trip_type = value.trip_type ? value.trip_type : ''; + Postdata.flight_no = value.flight_no ? value.flight_no : ''; + Postdata.cabin_class = value.cabin_class ? value.cabin_class: ''; + Postdata.origin = value.origin ? value.origin : ''; + Postdata.destination = value.destination ? value.destination : ''; + Postdata.departure_days = value.departure_days ? value.departure_days.join(',') : ''; + Postdata.date_type = value.date_type ? value.date_type : ''; + Postdata.from_date = value.from_date ? this._commonService.convertDateToSave(value.from_date) : ''; + Postdata.to_date = value.to_date ? this._commonService.convertDateToSave(value.to_date) : ''; + Postdata.pnr = value.pnr ? value.pnr : ''; + Postdata.currency_code = value.currency_code ? value.currency_code : ''; + Postdata.refund_type = value.refund_type ? value.refund_type : ''; + Postdata.rbd = value.rbd ? value.rbd : ''; + Postdata.confirmation_type = value.confirmation_type ? value.confirmation_type: ''; + Postdata.is_multi_day = value.is_multi_day ? value.is_multi_day : false; + Postdata.is_oneway_sale_allowed = value.is_oneway_sale_allowed ? value.is_oneway_sale_allowed : false; + this.ApiServ.Post('/FlightContract/GetAllFlightContractBySearch', Postdata).subscribe(res => { + if (res) { + this.FlightAllDetails = res.data; + if (res.data && res.data.length > 0) { + this.FlightAllDetails.forEach(e => { + e['Custom_confirmation_type'] = e.confirmation_type ? 'Yes' : 'No'; + e['Custom_multi_day'] = e.is_multi_day ? 'Yes' : 'No'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['status'] = e.is_active ? 'Active' : 'Deactive'; + }); + } + } + }); + }; + updateStatus(id, val) { + let obj = { + Id: id, + Status: !val, + }; + this.ApiServ.Post('/FlightContract/UpdateStatusContractFlight', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.GetFlightDetails() : ''; + } + }); + } + + + ResetForm() { + let val = this.Formdata.getRawValue() + Object.keys(val).forEach(e => { + if (e == 'is_multi_day') this.Formdata.get(e).setValue(false); + // remove this when User want Round Trip + else if (e == 'trip_type') { + if(this._commonService.clientId == '2109111018200000021')this.Formdata.get(e).setValue('ONEWAY'); + else this.Formdata.get(e).setValue(null); + } + else this.Formdata.get(e).setValue(null); + }) + }; + // + + editRateInventry(contract_id) { + let obj = { id: contract_id }; + this.router.navigate(['/Services/FlightServices/Manage/EditRateAndInventory'], { queryParams: obj }); + }; + + displayPosition: boolean; + position: string; + closeFlightContract() { + this.displayPosition = false; + this.FlightContractForm.reset(); + }; + showPositionDialog(position: string, data) { + this.OnInitFlightContractForm(data); + this.position = position; + this.displayPosition = true; + }; + + + EditFlightDetails(ContractId) { + this.router.navigate(['/Services/FlightInventory/Manage/EditFlight/' + ContractId]); + }; + CloneFlightRule(ContractId) { + this.router.navigate(['/Services/FlightInventory/Clone/' + ContractId]); + }; + EditRateInventry(ContractId) { + this.router.navigate(['/Services/FlightInventory/Manage/EditRateInventory/' + ContractId]); + }; + SelectImage(e, filedata) { + if (e.currentFiles.length != 0) { + let file = e.files[0]; + if (file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') { + const reader = new FileReader(); + console.log(file) + reader.readAsText(file); // Read as binary data + reader.onload = (res) => { + const binaryString = res.target.result as string; + const hasScriptTag = this._commonService.hasScriptTagInBinary(binaryString); + if (hasScriptTag) { + filedata.clear(); + this._commonService.showMessage(false, 'Invalid file (contains script tag)'); + } else { + //base 64 + // this.HotelRoomForm.get(contol).setValue(file); + // if (fileInfo && fileInfo.length > 0 && fileArr && fileArr.length > 0) { + var formdata = new FormData(); + // fileArr.forEach((x) => { + formdata.append("file", file); + // }); + filedata.clear(); + // let file_info_list = JSON.stringify(fileInfo).replaceAll('ExtranetRoomId', edit_id); + this.ApiServ.PostFileExtranet("/FlightContract/UploadFlightContrctFromFile", formdata).subscribe(res=>{ + if(res){ + this._commonService.showMessage(res.status,res.message); + } + }); + // } + }; + } + } + } + + } + DateTypeSelection() { + let date_type = this.Formdata.value.date_type; + let from_date = this.Formdata.get('from_date').value; + this.Formdata.get("from_date").clearValidators(); + this.Formdata.get("from_date").setErrors(null); + this.Formdata.get("to_date").clearValidators(); + this.Formdata.get("to_date").setErrors(null); + if (date_type && date_type != "") { + this.Formdata.get("from_date").addValidators([Validators.required]); + this.Formdata.get("to_date").addValidators([Validators.required,this.dateValidation(from_date)]); + } + this.Formdata.get("from_date").updateValueAndValidity(); + this.Formdata.get("from_date").markAsUntouched(); + this.Formdata.get("to_date").updateValueAndValidity(); + this.Formdata.get("to_date").markAsUntouched(); + this.clearDateType(); + this.ManageDateValidations(); + } + + clearDateType() { + // Trigger 'SelectDateEvent' if both 'from_date' and 'to_date' are unset. + if(!this.Formdata.get("from_date").value && !this.Formdata.get("to_date").value) this.SelectDateEvent(); + } + public dateValidation(toDate): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (toDate && control.value <= toDate) { + return { 'range': true }; + } + } + return null; + }; + } + Update_Validation(){ + let from_date = this.Formdata.get('from_date').value; + if(from_date){ + this.Formdata.get("to_date").clearValidators(); + this.Formdata.get("to_date").setErrors(null); + this.Formdata.get("to_date").addValidators(Validators.compose([Validators.required,this.dateValidation(from_date)])); + // this.Formdata.get("date_to").markAsTouched(); + this.Formdata.get("to_date").updateValueAndValidity(); + } + this.ManageDateValidations(); + } + + SelectDateEvent() { + let from_date = this.Formdata.value.from_date; + let to_date = this.Formdata.value.to_date; + this.Formdata.get("date_type").clearValidators(); + this.Formdata.get("date_type").setErrors(null); + if ((from_date || to_date) && (from_date != "" || to_date != "")) { + this.Formdata.get("date_type").addValidators([Validators.required]); + } + this.Formdata.get("date_type").updateValueAndValidity(); + // this.Formdata.get("date_type").markAsUntouched(); + this.Update_Validation() + } + ManageDateValidations() { + const from_date = this.Formdata.get('from_date').value; + const to_date = this.Formdata.get('to_date').value; + const date_type = this.Formdata.get('date_type').value; + const hasValue = from_date || to_date || date_type; + if (hasValue) { + this.Formdata.get("date_type").setValidators(date_type ? null : Validators.required); + this.Formdata.get("from_date").setValidators(from_date ? null : Validators.required); + if(from_date){ + this.Formdata.get("to_date").addValidators([Validators.required, this.dateValidation(from_date)]); + } + } else { + this.Formdata.get("from_date").clearValidators(); + this.Formdata.get("to_date").clearValidators(); + this.Formdata.get("date_type").clearValidators(); + } + + this.Formdata.get("from_date").updateValueAndValidity(); + this.Formdata.get("to_date").updateValueAndValidity(); + this.Formdata.get("date_type").updateValueAndValidity(); + } + btnClick() { + this.router.navigateByUrl("Services/FlightInventory/Add"); + } +} diff --git a/src/app/modules/services/flight-inventory/flight-inventory.module.ts b/src/app/modules/services/flight-inventory/flight-inventory.module.ts new file mode 100644 index 0000000..4eead87 --- /dev/null +++ b/src/app/modules/services/flight-inventory/flight-inventory.module.ts @@ -0,0 +1,67 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { FlightInventorySearchComponent } from './flight-inventory-search/flight-inventory-search.component'; +import { FlightInventoryAddComponent } from './flight-inventory-add/flight-inventory-add.component'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'primeng/calendar'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { ToastModule } from 'primeng/toast'; +import { TableModule } from 'primeng/table'; +import { MatButtonModule } from '@angular/material/button'; +import { MatMenuModule } from '@angular/material/menu'; +import { ToolbarModule } from 'primeng/toolbar'; +import { MessageService } from 'primeng/api'; +import { InputTextModule } from 'primeng/inputtext'; +import { DialogModule } from 'primeng/dialog'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { FileUploadModule } from 'primeng/fileupload'; +import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service'; + +const routes: Routes = [ + { + path: 'Search', + component: FlightInventorySearchComponent, + }, + { + path: 'Add', + component: FlightInventoryAddComponent, + }, + { + path: 'Clone/:RuleId', + component: FlightInventoryAddComponent, + }, + { + path: 'Manage', + loadChildren: () => + import('./flight-inventory-manage/flight-inventory-manage.module').then( + (m) => m.FlightInventoryManageModule + ), + }, +] + +@NgModule({ + declarations: [ + FlightInventorySearchComponent, + FlightInventoryAddComponent + ], + imports: [ + ToastModule, + TableModule, + DialogModule, + CommonModule, + FileUploadModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + RouterModule.forChild(routes), + ], + providers: [MessageService,FlightContractService], +}) +export class FlightInventoryModule { } diff --git a/src/app/modules/services/flight-services/flight-services-add/flight-services-add.component.html b/src/app/modules/services/flight-services/flight-services-add/flight-services-add.component.html new file mode 100644 index 0000000..bc124e6 --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-add/flight-services-add.component.html @@ -0,0 +1,1125 @@ +
    + + Back +
    +
    Add Flight Contract
    +
    +
    +
    +
    + + + Please + contract name +
    +
    +
    + + +
    +
    +
    + + + +
    + +
    Trip Type
    +
    + +
    +
    + Please + select trip type +
    +
    + + + +
    + +
    From
    +
    + +
    +
    + Please + select from +
    +
    + + + +
    + +
    To
    +
    + +
    +
    + Please + select to +
    + +
    + + + Please + enter pnr +
    +
    + + + +
    + +
    Currency Code
    +
    + +
    +
    + Please + select currency +
    +
    + + + +
    + +
    Confirmation Type
    +
    + +
    +
    + Please + select confirmation type +
    +
    + + + +
    + +
    Contracted Cabins
    +
    + +
    +
    + Please + select contracted cabins +
    +
    + + + +
    + +
    Contracted Pax Types
    +
    + +
    +
    + Please + select contracted pax types +
    +
    + + + +
    + +
    Validating Airline
    +
    + +
    +
    + Please + select validating airline +
    +
    +
    + Is Multi Day Operation + +
    +
    +
    + + + Please + select outbound date +
    +
    + + +
    +
    + + + +
    + +
    Multi Day Operation Type
    +
    + +
    +
    + Please + select multi day operation type +
    +
    + + + Please + select operation valid from +
    +
    + + + Please + select operation valid to +
    +
    + + + +
    + +
    Outbound Days
    +
    + +
    +
    + Please + select outbound days +
    +
    + + + + Please + select outbound dates +
    +
    +
    +
    +
    Outbound
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    Airline code
    +
    Flight no.Aircraft TypeOriginDestinationDeparture TimeDeparture TerminalIs Next Day ArrivalArrival TimeArrival TerminalFlying TimeIs Departure Next Day
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    Return
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    Airline code
    +
    Flight no.Aircraft TypeOriginDestinationDeparture TimeDeparture TerminalIs Next Day ArrivalArrival TimeArrival TerminalFlying TimeIs Departure Next Day
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    Fare details
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    RBD
    +
    Cabin ClassAdult Base FareAdult TaxesChild Base FareChild TaxesInfant Base FareInfant TaxesSeats AllocationAdult Check BagChild Check BagInfant Check BagCheck Bag UnitAdult Cabin BagChild Cabin BagInfant Cabin BagCabin Bag UnitFare TypeAdult Fare RuleChild Fare RuleInfant Fare RuleMeal IncludedMeal DetailsInclusions
    +
    + + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + Is Active +
    +
    + +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/flight-services/flight-services-add/flight-services-add.component.ts b/src/app/modules/services/flight-services/flight-services-add/flight-services-add.component.ts new file mode 100644 index 0000000..61e4bb7 --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-add/flight-services-add.component.ts @@ -0,0 +1,605 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { Router } from '@angular/router'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { FlightContractDTO, FlightDetailDto, FlightsRateDto } from 'src/app/core/models/flight-service/flight-contracts.model'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-flight-services-add', + templateUrl: './flight-services-add.component.html', +}) +export class FlightServicesAddComponent implements OnInit { + + + constructor(public ApiServ: API, public Fb: FormBuilder, + public validationService: ValidationService, public CommonVar: StaticDataService, + public MsgService: MessageService, public router: Router) { } + Formdata: FormGroup; + CurrencyList; + AirCabinClassList; + AirPaxTypeList; + AtoZ = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] + lovKeyDataObj = { + AirCabinClass: [], + AirPaxType: [], + AirTripType: [], + DaySelect: [], + AirBaggageUnit: [], + AirFareType: [], + }; + AirportListFrom; + AirportListTO; + AirlineList; + AllAircraftTypeList; + + + ngOnInit(): void { + this.GetCurrency(); + this.GetLOVKeys('AirCabinClass,AirPaxType,AirTripType,DaySelect,AirBaggageUnit,AirFareType'); + this.OnInitForm(); + this.GetAllAircraftType(); + } + + ToasterMsg(msg) { + this.MsgService.add({ + severity: "error", + detail: msg, + }); + } + + + + OnInitForm() { + this.Formdata = this.Fb.group({ + contract_name: this.validationService.required, + contract_description: [''], + _trip_type: [1, Validators.required], + from_airport: this.validationService.required, + to_airport: this.validationService.required, + pnr: this.validationService.required, + currency_code: this.validationService.required, + is_instant_confirmation: ['Instant', Validators.required], + contracted_cabin: this.validationService.required, + contracted_pax_types: this.validationService.required, + validating_airline: this.validationService.required, + is_multi_day: [false], + outbound_date: this.validationService.required, + return_date: [''], + is_multi_day_range: [''], + operation_from: [''], + operation_to: [''], + outbound_days: [''], + outbound_dates: [''], + + FlightDetail: this.Fb.array([ + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: this.validationService.required, + to_airport: this.validationService.required, + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: this.validationService.required, + is_next_day_arrival: [false], + arrival_hour: [''], + arrival_minutes: [''], + arrival_terminal: [''], + flying_duration_hour: [''], + flying_duration_minutes: [''], + is_next_day_departure: [false], + }) + ]), + + FlightsRate: this.Fb.array([ + this.Fb.group({ + rbd: this.validationService.required, + cabin_class: this.validationService.required, + adt_base_fare: this.validationService.decimal, + adt_tax: this.validationService.decimal, + chd_base_fare: this.validationService.decimal, + chd_tax: this.validationService.decimal, + inf_base_fare: this.validationService.decimal, + inf_tax: this.validationService.decimal, + seat_allocation: this.validationService.number, + seat_booked: [''], // + seat_remaining: [''], // + adt_check_bag: this.validationService.number, + chd_check_bag: this.validationService.number, + inf_check_bag: this.validationService.number, + _check_bag_unit: this.validationService.required, + adt_cabin_bag: this.validationService.number, + chd_cabin_bag: this.validationService.number, + inf_cabin_bag: this.validationService.number, + _cabin_bag_unit: this.validationService.required, + _fare_type: this.validationService.required, + adt_fare_rule: this.validationService.required, + chd_fare_rule: this.validationService.required, + inf_fare_rule: this.validationService.required, + is_meal_included: [''], + meal_details: [''], + inclusions: [''], + is_instant_confirmation: [''], + is_stop_sale: [''], + }) + ]), + is_active: [false] + }); + }; + + get FlightDetail() { + return this.Formdata.get('FlightDetail') as FormArray; + } + get FlightsRate() { + return this.Formdata.get('FlightsRate') as FormArray; + } + get FlightRateDetail() { + return this.Formdata.get('FlightRateDetail') as FormArray; + } + + addFlightGroupBtn(FormName) { + let formgroup; + FormName == 'FlightDetail' ? formgroup = this.FlightDetail : formgroup = this.FlightRateDetail; + + formgroup.push( + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: this.validationService.required, + to_airport: this.validationService.required, + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: this.validationService.required, + is_next_day_arrival: [false], + arrival_hour: [''], + arrival_minutes: [''], + arrival_terminal: [''], + flying_duration_hour: [''], + flying_duration_minutes: [''], + is_next_day_departure: [false], + }) + ); + }; + addFlightsRateGroupBtn() { + this.FlightsRate.push(this.Fb.group({ + rbd: this.validationService.required, + cabin_class: this.validationService.required, + adt_base_fare: this.validationService.decimal, + adt_tax: this.validationService.decimal, + chd_base_fare: this.validationService.decimal, + chd_tax: this.validationService.decimal, + inf_base_fare: this.validationService.decimal, + inf_tax: this.validationService.decimal, + seat_allocation: this.validationService.number, + seat_booked: [''], // + seat_remaining: [''], // + adt_check_bag: this.validationService.number, + chd_check_bag: this.validationService.number, + inf_check_bag: this.validationService.number, + _check_bag_unit: this.validationService.required, + adt_cabin_bag: this.validationService.number, + chd_cabin_bag: this.validationService.number, + inf_cabin_bag: this.validationService.number, + _cabin_bag_unit: this.validationService.required, + _fare_type: this.validationService.required, + adt_fare_rule: this.validationService.required, + chd_fare_rule: this.validationService.required, + inf_fare_rule: this.validationService.required, + is_meal_included: [''], + meal_details: [''], + inclusions: [''], + is_instant_confirmation: [''], + is_stop_sale: [''], + })) + } + removeFlightGroupBtn(ind, formname) { + let formgroup; + formname == 'FlightDetail' ? formgroup = this.FlightDetail : formgroup = this.FlightRateDetail; + formgroup.removeAt(ind); + }; + + removeFlightsRateGroupBtn(ind) { + this.FlightsRate.removeAt(ind); + }; + RemoveFlightrRoundArr() { + this.Formdata.removeControl('FlightRateDetail'); + }; + + AddFLightRoundArr() { + this.Formdata.addControl( + 'FlightRateDetail', this.Fb.array([ + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: this.validationService.required, + to_airport: this.validationService.required, + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: this.validationService.required, + is_next_day_arrival: [false], + arrival_hour: [''], + arrival_minutes: [''], + arrival_terminal: [''], + flying_duration_hour: [''], + flying_duration_minutes: [''], + is_next_day_departure: [false], + }) + ]) + ); + }; + + trip_type(val) { + console.log(val) + if (val == 2) { + this.Formdata.get('is_multi_day').setValue(false) + this.AddFLightRoundArr() + } else this.RemoveFlightrRoundArr() + + } + + GetCurrency() { + this.ApiServ.Get('/Currency/GetCurrency').subscribe(obj => { + if (obj) { + this.CurrencyList = obj; + } + }) + } + + getAirportDetails(val, check) { + if (val.length >= 3) { + this.ApiServ.Get('/MasterSearch/GetAllMasterSearch/en/' + val).subscribe(obj => { + if (obj) { + if (check) this.AirportListFrom = obj; + if (!check) this.AirportListTO = obj; + } + }); + } + } + GetAllAirline(val) { + if (val) { + this.ApiServ.Get('/MasterSearch/GetAllAirline/en/' + val).subscribe(obj => { + if (obj) { + this.AirlineList = obj; + } + }); + } + } + + GetAllAircraftType() { + this.ApiServ.Get('/MasterSearch/GetAllAircraftType').subscribe(obj => { + if (obj) { + this.AllAircraftTypeList = obj; + } + }); + } + + + + + + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + }; + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.ApiServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + }; + + + + // validation + + nextdayarrivelcheck(check, ind, formname) { + if (check) { + this.AddOutboundtvalid(ind, 'arrival_hour', 'add', formname); + this.AddOutboundtvalid(ind, 'arrival_minutes', 'add', formname); + this.AddOutboundtvalid(ind, 'arrival_terminal', 'add', formname); + this.AddOutboundtvalid(ind, 'flying_duration_hour', 'add', formname); + this.AddOutboundtvalid(ind, 'flying_duration_minutes', 'add', formname); + } else { + this.AddOutboundtvalid(ind, 'arrival_hour', 'remove', formname); + this.AddOutboundtvalid(ind, 'arrival_minutes', 'remove', formname); + this.AddOutboundtvalid(ind, 'arrival_terminal', 'remove', formname); + this.AddOutboundtvalid(ind, 'flying_duration_hour', 'remove', formname); + this.AddOutboundtvalid(ind, 'flying_duration_minutes', 'remove', formname); + } + + } + + + MealTypeIncludedcheck(val, ind) { + console.log(val) + if (val == 'Yes') this.addvalidMealTypeIncluded(ind, 'meal_details', 'add') + else this.addvalidMealTypeIncluded(ind, 'meal_details', 'remove') + + } + + AddOutboundtvalid(index, name, type, formname) { + let formgroup; + formname == 'FlightDetail' ? formgroup = this.FlightDetail : formgroup = this.FlightRateDetail + if (type == 'add') { + formgroup.controls[index].get(name).addValidators([Validators.required]); + formgroup.controls[index].get(name).updateValueAndValidity(); + } else { + formgroup.controls[index].get(name).clearValidators(); + formgroup.controls[index].get(name).updateValueAndValidity(); + formgroup.controls[index].get(name).markAsUntouched(); + } + }; + addvalidMealTypeIncluded(index, name, type) { + if (type == 'add') { + this.FlightsRate.controls[index].get(name).addValidators([Validators.required]); + this.FlightsRate.controls[index].get(name).updateValueAndValidity(); + } else { + this.FlightsRate.controls[index].get(name).clearValidators(); + this.FlightsRate.controls[index].get(name).updateValueAndValidity(); + this.FlightsRate.controls[index].get(name).markAsUntouched(); + } + }; + addvalid(name, type) { + if (type == 'add') { + this.Formdata.controls[name].addValidators([Validators.required]); + this.Formdata.controls[name].updateValueAndValidity(); + } else { + this.Formdata.controls[name].clearValidators(); + this.Formdata.controls[name].updateValueAndValidity(); + this.Formdata.controls[name].markAsUntouched(); + } + }; + // + multi_day_check(val) { + console.log(val) + if (val) { + this.addvalid('is_multi_day_range', 'add'); + this.addvalid('operation_from', 'add'); + this.addvalid('operation_to', 'add'); + } else { + this.addvalid('is_multi_day_range', 'remove'); + this.addvalid('operation_from', 'remove'); + this.addvalid('operation_to', 'remove'); + this.Formdata.get('is_multi_day_range').setValue('') + } + } + multi_day_range(val) { + if (val == 'Range') { + this.addvalid('outbound_dates', 'remove'); + this.addvalid('outbound_days', 'add'); + } else { + this.addvalid('outbound_days', 'remove'); + this.addvalid('outbound_dates', 'add'); + } + } + + // save + saveData() { + let value = this.Formdata.getRawValue(); + let OutbondList = this.FlightDetail.getRawValue(); + let lastNumber = OutbondList.length - 1; + + console.log(value) + if (this.Formdata.status == "INVALID") { + this.validationService.showValidationsMsg(this.Formdata); + return; + } + if (!OutbondList[lastNumber].to_airport && !value.to_airport && !value.from_airport && !OutbondList[0].from_airport) { + this.ToasterMsg("Please enter departure and arrival city or airport") + return; + } + if (OutbondList[lastNumber].to_airport != value.to_airport || OutbondList[0].from_airport != value.from_airport) { + this.ToasterMsg("Departure must be different from arrival") + return; + }; + + let FlightRateVal = this.FlightsRate.getRawValue(); + let date = moment(new Date).format('YYYY-MM-DD'); + let AllFlightDetailslist = []; + + + /// flight details + + OutbondList.map((e, i) => { + let fligtDetlPostData = new FlightDetailDto(); + fligtDetlPostData.airline_code = e.airline_code + fligtDetlPostData.flight_no = e.flight_no; + // fligtDetlPostData._aircraft_type = e._aircraft_type; + fligtDetlPostData.from_airport = e.from_airport; + fligtDetlPostData.to_airport = e.to_airport; + fligtDetlPostData.departure_time = date + 'T' + e.departure_Hour + ':' + e.departure_minutes + ':00'; + fligtDetlPostData.is_next_day_departure = e.is_next_day_departure; + fligtDetlPostData.departure_terminal = e.departure_terminal; + fligtDetlPostData.is_next_day_arrival = e.is_next_day_arrival; + fligtDetlPostData.arrival_time = date + 'T' + e.arrival_hour + ':' + e.arrival_minutes + ':00'; + fligtDetlPostData.arrival_terminal = e.arrival_terminal; + fligtDetlPostData.flying_duration = date + 'T' + e.flying_duration_hour + ':' + e.flying_duration_minutes + ':00'; + fligtDetlPostData._sector_type = '1'; + fligtDetlPostData.leg_nbr = i + 1; + console.log(fligtDetlPostData); + AllFlightDetailslist.push(fligtDetlPostData); + }); + + if (value._trip_type == 2) { + let returnList = this.FlightRateDetail.getRawValue(); + let last = returnList.length - 1; + if (!returnList[last].to_airport && !value.to_airport && !value.from_airport && !returnList[0].from_airport) { + this.ToasterMsg("Please enter departure and arrival city or airport") + return; + } + if (returnList[last].to_airport != value.from_airport || returnList[0].from_airport != value.to_airport) { + this.ToasterMsg("Departure must be different from arrival") + return; + }; + returnList.map((e, i) => { + let fligtDetlPostData = new FlightDetailDto(); + fligtDetlPostData.airline_code = e.airline_code + fligtDetlPostData.flight_no = e.flight_no; + // fligtDetlPostData._aircraft_type = e._aircraft_type; + fligtDetlPostData.from_airport = e.from_airport; + fligtDetlPostData.to_airport = e.to_airport; + fligtDetlPostData.departure_time = date + 'T' + e.departure_Hour + ':' + e.departure_minutes + ':00'; + fligtDetlPostData.is_next_day_departure = e.is_next_day_departure; + fligtDetlPostData.departure_terminal = e.departure_terminal; + fligtDetlPostData.is_next_day_arrival = e.is_next_day_arrival; + fligtDetlPostData.arrival_time = date + 'T' + e.arrival_hour + ':' + e.arrival_minutes + ':00'; + fligtDetlPostData.arrival_terminal = e.arrival_terminal; + fligtDetlPostData.flying_duration = date + 'T' + e.flying_duration_hour + ':' + e.flying_duration_minutes + ':00'; + fligtDetlPostData._sector_type = '2'; + fligtDetlPostData.leg_nbr = i + 1; + console.log(fligtDetlPostData); + AllFlightDetailslist.push(fligtDetlPostData); + }); + }; + + + // flight Rate + let FlightRate = [] + FlightRateVal.map(e => { + let Ratepostdata = new FlightsRateDto(); + Ratepostdata.rbd = e.rbd; + Ratepostdata.cabin_class = this.checkClassType(e.cabin_class); + Ratepostdata.adt_base_fare = e.adt_base_fare; + Ratepostdata.adt_tax = e.adt_tax; + Ratepostdata.chd_base_fare = e.chd_base_fare; + Ratepostdata.chd_tax = e.chd_tax; + Ratepostdata.inf_base_fare = e.inf_base_fare; + Ratepostdata.inf_tax = e.inf_tax; + Ratepostdata.seat_allocation = e.seat_allocation; + Ratepostdata.seat_booked = 0; // + Ratepostdata.seat_remaining = 0; // + Ratepostdata.adt_check_bag = e.adt_check_bag; + Ratepostdata.chd_check_bag = e.chd_check_bag; + Ratepostdata.inf_check_bag = e.inf_check_bag; + Ratepostdata._check_bag_unit = e._check_bag_unit; + Ratepostdata.adt_cabin_bag = e.adt_cabin_bag; + Ratepostdata.adt_fare_rule = e.adt_fare_rule; + Ratepostdata.chd_cabin_bag = e.chd_cabin_bag; + Ratepostdata.inf_cabin_bag = e.inf_cabin_bag; + Ratepostdata._cabin_bag_unit = e._cabin_bag_unit; + Ratepostdata._fare_type = e._fare_type; + Ratepostdata.adt_fare_rule = e.adt_fare_rule; + Ratepostdata.chd_fare_rule = e.chd_fare_rule; + Ratepostdata.is_meal_included = e.is_meal_included == 'Yes' ? true : false; + Ratepostdata.meal_details = e.is_meal_included == 'Yes' ? e.meal_details : ''; + Ratepostdata.inclusions = e.inclusions; + Ratepostdata.inf_fare_rule = e.inf_fare_rule; + Ratepostdata.pnr = value.pnr; + FlightRate.push(Ratepostdata) + + }) + + // Post data + + let PostData = new FlightContractDTO(); + PostData.contract_name = value.contract_name; + PostData.contract_description = value.contract_description; + PostData._trip_type = value._trip_type.toString(); + PostData.from_airport = value.from_airport; + PostData.to_airport = value.to_airport; + PostData.pnr = value.pnr; + PostData.is_instant_confirmation = value.is_instant_confirmation == 'Instant' ? true : false; + PostData.is_economy = false; + PostData.is_premium_economy = false; + PostData.is_business = false; + PostData.is_first_class = false; + + value.contracted_cabin ? value.contracted_cabin.map(e => { + e == 1 ? PostData.is_economy = true : ''; + e == 2 ? PostData.is_premium_economy = true : ''; + e == 3 ? PostData.is_business = true : ''; + e == 4 ? PostData.is_first_class = true : ''; + }) : '' + PostData.is_adult = false; + PostData.is_child = false; + PostData.is_infant = false; + value.contracted_pax_types ? value.contracted_pax_types.map(e => { + e == 1 ? PostData.is_adult = true : ''; + e == 2 ? PostData.is_child = true : ''; + e == 3 ? PostData.is_infant = true : ''; + }) : '' + PostData.is_all_pax_type = PostData.is_adult && PostData.is_child && PostData.is_infant ? true : false; + PostData.validating_airline = value.validating_airline; + PostData.is_multi_day = value.is_multi_day; + PostData.outbound_date = moment(value.outbound_date).format('YYYY-MM-DD'); + PostData.return_date = value._trip_type == 2 ? value.return_date ? moment(value.return_date).format('YYYY-MM-DD') : '' : date; + PostData.is_multi_day_range = value.is_multi_day_range == 'Range' ? true : false; + PostData.operation_from = value.is_multi_day ? value.operation_from ? moment(value.operation_from).format('YYYY-MM-DD') : '' : date; + PostData.operation_to = value.is_multi_day ? value.operation_to ? moment(value.operation_to).format('YYYY-MM-DD') : '' : date; + PostData.outbound_days = value.is_multi_day && value.is_multi_day_range == 'Range' ? value.outbound_days.join(',') : ''; + let outbond_dates = [] + value.outbound_dates ? value.outbound_dates.map(e => outbond_dates.push(moment(e).format('YYYY-MM-DD'))) : '' + PostData.outbound_dates = value.is_multi_day && value.is_multi_day_range != 'Range' ? outbond_dates ? outbond_dates.join(',') : '' : ''; + PostData.supplier_id = ''; + PostData.is_active = value.is_active; + PostData.currency_code = value.currency_code; + PostData.flightDetail = AllFlightDetailslist; + PostData.flightRate = FlightRate; + PostData.org_id = '2105311837100000021'; + + console.log(PostData) + this.ApiServ.Post('/FlightContract/SaveFlightContracts', PostData).subscribe(obj => { + if (obj) { + this.MsgService.add({ + severity: obj["status"] ? "success" : "error", + detail: obj["message"], + }); + obj["status"] ? setTimeout(() => { + this.router.navigate(['/Services/FlightServices/Search']) + }, 500) : ''; + } + }); + + }; + + // + + checkClassType(classType) { + let value = '' + if (classType == 4) { + value = 'F' + } else if (classType == 3) { + value = 'J' + } else if (classType == 2) { + value = 'W' + } else if (classType == 1) { + value = 'Y' + } + return value + } + + + // static dropdown + + + Confirmation_Type = [ + { id: 0, name: 'Instant' }, + { id: 1, name: 'Manual' }, + ]; + Multi_day_type = [ + { name: 'Range' }, + { name: 'Specific Dates' }, + + ]; + + Option = [ + { id: 2, name: 'Yes' }, + { id: 3, name: 'No' }, + ]; + + +} diff --git a/src/app/modules/services/flight-services/flight-services-manage/edit-contract/edit-contract-details.html b/src/app/modules/services/flight-services/flight-services-manage/edit-contract/edit-contract-details.html new file mode 100644 index 0000000..5db6ff0 --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-manage/edit-contract/edit-contract-details.html @@ -0,0 +1,56 @@ +
    +
    Add Flight Contract
    +
    +
    + + +
    +
    + + +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Contracted Pax Types
    +
    + +
    +
    +
    +
    +
    + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/flight-services/flight-services-manage/edit-contract/edit-contract-details.ts b/src/app/modules/services/flight-services/flight-services-manage/edit-contract/edit-contract-details.ts new file mode 100644 index 0000000..693e1a8 --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-manage/edit-contract/edit-contract-details.ts @@ -0,0 +1,117 @@ +import { Component, Inject } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { ActivatedRoute } from '@angular/router'; +import { MessageService } from 'primeng/api'; +import { ContractDetailDto } from 'src/app/core/models/flight-service/flight-service-manage/edit-contract-details.model'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + templateUrl: './edit-contract-details.html', +}) +export class EditContractDetailsComponents { + + Formdata: FormGroup; + constructor(@Inject(MAT_DIALOG_DATA) public data: any, public ApiServ: API, + public Fb: FormBuilder, public route: ActivatedRoute, public MsgService: MessageService) { } + AircabinList; + AirpaxList; + cabin_type = []; + pax_type = []; + ngOnInit(): void { + this.Formdata = this.Fb.group({ + contract_name: [''], + contract_description: [''], + contracted_cabins: [null], + contracted_pax_types: [null] + }); + + this.GetLOVHotelPickupPointType(); + } + + + GetLOVHotelPickupPointType() { + let formdata = { + "lov_types": [ + { "lov_type": "AirCabinClass" }, + { "lov_type": "AirPaxType" }, + ], + "lov_lang": "en" + } + this.ApiServ.Post("/LovMaster/GetLov", formdata).subscribe(data => { + if (data) { + this.AircabinList = data.responseObject[0].keys; + this.AirpaxList = data.responseObject[1].keys; + this.ApiServ.Get('/FlightContract/GetFlightContract?ContractId=' + this.data.contractId).subscribe(data => { + console.log(data) + this.SetFormValue(data.responseObject) + }); + } + }); + }; + + + + +SetFormValue(data) { + this.cabin_type = [] + this.pax_type = [] + Object.keys(data).forEach(e => { + if (e == 'contract_name' || e == 'contract_description') { + this.Formdata.get(e).setValue(data[e]) + } else if (e == 'is_all_pax_type' || e == 'is_premium_economy' || e == 'is_economy' || e == 'is_business' || e == 'is_first_class') { + let arr = [] + + 'is_economy' == e && data[e] ? this.cabin_type.push(1) : '' + 'is_premium_economy' == e && data[e] ? this.cabin_type.push(2) : '' + 'is_business' == e && data[e] ? this.cabin_type.push(3) : '' + 'is_first_class' == e && data[e] ? this.cabin_type.push(4) : '' + this.Formdata.get('contracted_cabins').setValue(this.cabin_type); + } else if (e == 'is_adult' || e == 'is_child' || e == 'is_infant') { + e == 'is_adult' && data[e] ? this.pax_type.push(1) : '' + e == 'is_child' && data[e] ? this.pax_type.push(2) : '' + e == 'is_infant' && data[e] ? this.pax_type.push(3) : '' + this.Formdata.get('contracted_pax_types').setValue(this.pax_type) + } + }); +}; +saveformData() { + let value = this.Formdata.getRawValue(); + let postdata = new ContractDetailDto(); + postdata.contract_name = value.contract_name; + postdata.contract_description = value.contract_description; + postdata.contract_id = this.data.contractId; + postdata.is_economy = false; + postdata.is_premium_economy = false; + postdata.is_business = false; + postdata.is_first_class = false; + value.contracted_cabins ? value.contracted_cabins.map(e => { + e == 1 ? postdata.is_economy = true : ''; + e == 2 ? postdata.is_premium_economy = true : ''; + e == 3 ? postdata.is_business = true : ''; + e == 4 ? postdata.is_first_class = true : ''; + }) : '' + postdata.is_adult = false; + postdata.is_child = false; + postdata.is_infant = false + value.contracted_pax_types ? value.contracted_pax_types.map(e => { + e == 1 ? postdata.is_adult = true : ''; + e == 2 ? postdata.is_child = true : ''; + e == 3 ? postdata.is_infant = true : ''; + }) : '' + postdata.is_all_pax_type = postdata.is_adult && postdata.is_child && postdata.is_infant ? true : false; + + this.ApiServ.Post("/FlightContract/UpdateContractDetails", postdata).subscribe(data => { + if (data) { + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + } + }); +} + + + +} + diff --git a/src/app/modules/services/flight-services/flight-services-manage/edit-flight-details/edit-flight-details.component.html b/src/app/modules/services/flight-services/flight-services-manage/edit-flight-details/edit-flight-details.component.html new file mode 100644 index 0000000..97f8c3f --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-manage/edit-flight-details/edit-flight-details.component.html @@ -0,0 +1,604 @@ +
    + + Back +
    +
    Date Filter
    +
    +
    +
    +
    + + + +
    + + {{date.day}} + + + {{date.day}} + +
    +
    + Please + select dates +
    +
    + + + +
    + +
    Outbound Days
    +
    + +
    +
    + Please + select days +
    +
    +
    +
    +
    Depature
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    Airline code
    +
    Flight no.Aircraft TypeOriginDestinationDeparture TimeDeparture TerminalIs Next Day ArrivalArrival TimeArrival TerminalFlying TimeIs Departure Next Day
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + +
    Return
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    Airline code
    +
    Flight no.Aircraft TypeOriginDestinationDeparture TimeDeparture TerminalIs Next Day ArrivalArrival TimeArrival TerminalFlying TimeIs Departure Next Day
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    + + + +
    + +
    Pickup Time
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    + +
    + +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/flight-services/flight-services-manage/edit-flight-details/edit-flight-details.component.ts b/src/app/modules/services/flight-services/flight-services-manage/edit-flight-details/edit-flight-details.component.ts new file mode 100644 index 0000000..69d2fc0 --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-manage/edit-flight-details/edit-flight-details.component.ts @@ -0,0 +1,546 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Route, Router } from '@angular/router'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { StaticDataService } from 'src/app/core/common/static-data.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { FlightDetailobj, UpdateFlightDetail } from 'src/app/core/models/flight-service/flight-service-manage/edit-flight-details.model'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-edit-flight-details', + templateUrl: './edit-flight-details.component.html', +}) +export class EditFlightDetailsComponent implements OnInit { + + constructor(public router: ActivatedRoute, + private ApiServ: API, + public Fb: FormBuilder, public CommonVar: StaticDataService, + public validationService: ValidationService, + public MsgService: MessageService, public route: Router + ) { } + contract_id; + Formdata: FormGroup; + SearchForm: FormGroup; + is_search = false; + is_round_trip = false; + AirportListFrom; + AirportListTO; + lovKeyDataObj = { + DaySelect: [], + }; + AirlineList; + datelist; + AllAircraftTypeList + @ViewChild('calender') calender + + + + + ngOnInit(): void { + this.GetAllAircraftType(); + this.checkIsRangetype(); + this.OnIntForm(); + this.GetLOVKeys('DaySelect'); + } + + checkDateForHighlight(date) { + let month = date.month > 9 ? date.month : '0' + date.month; + let d = new Date(date.year, date.month, date.day); + let new_Date = month + '-' + date.day + '-' + date.year; + let Checkformat = moment(new_Date).format('MM-DD-YYYY') + let validate; + validate = false; + if (new_Date == Checkformat) { + let format = moment(d).format('MM-DD-YYYY') + let valid = this.datelist.filter(e => e == format) + if (valid.length > 0) { + validate = true; + } + } + return validate + } + + checkIsRangetype() { + this.router.queryParams.subscribe(obj => { + this.contract_id = obj['id'] + this.ApiServ.Get('/FlightContract/GetFlightDates?ContractId=' + this.contract_id).subscribe(data => { + if (data) { + this.GetFlightDetails(); + if (data.responseObject.is_multi_day && !data.responseObject.is_round_trip) { + this.SetTimeAvali(data.responseObject.dates); + this.is_search = false; + this.setFilterValid(true); + } else { + this.is_search = true; + this.AddFLightRoundArr(); + this.Formdata.removeControl('date') + this.Formdata.removeControl('days') + } + if (data.responseObject.is_round_trip) { + this.is_round_trip = true; + } + + } + }); + }) + } + formDate; + SetTimeAvali(allDate) { + this.datelist = allDate.split(','); + let obj = []; + this.datelist.map(e => { + obj.push(moment(e).format('MM-DD-YYYY')); + }) + this.datelist = obj; + } + // + DateRangecheck() { + let date_range = this.Formdata.get('date').value + if (date_range[1]) { + this.calender.overlayVisible = false; + let AllSelectDate = [] + this.datelist.filter(e => { + let from = moment(date_range[0]).format('MM:DD:YYYY').split(':') + let To = moment(date_range[1]).format('DD:MMM:YYYY').split(':') + let maindate = moment(e).format('DD:MMM:YYYY').split(':') + if (from[1] == maindate[1] || To[1] == maindate[1]) { + let date = new Date(e).getDate(); + let St = new Date(date_range[0]).getDate(); + let et = new Date(date_range[1]).getDate(); + (date >= St && date <= et) ? AllSelectDate.push(e) : '' + } + }) + this.formDate = AllSelectDate; + console.log(AllSelectDate) + } + } + + GetFlightDetails() { + this.ApiServ.Get('/FlightContract/GetFlightDetails?ContractId=' + this.contract_id).subscribe(data => { + if (data) { + this.SetValForm(data.responseObject) + } + }); + } + + + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + }; + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.ApiServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + }; + + OnIntForm() { + this.Formdata = this.Fb.group({ + date: this.validationService.required, + days: this.validationService.required, + FlightDetail: this.Fb.array([ + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: [{ value: '', disabled: true }, Validators.required], + to_airport: [{ value: '', disabled: true }, Validators.required], + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: this.validationService.required, + is_next_day_arrival: [false], + sector_nbr: [], + arrival_hour: this.validationService.required, + arrival_minutes: this.validationService.required, + arrival_terminal: this.validationService.required, + flying_duration_hour: this.validationService.required, + flying_duration_minutes: this.validationService.required, + is_next_day_departure: [false], + }) + ]) + + }); + } + + get FlightDetail() { + return this.Formdata.get('FlightDetail') as FormArray; + } + get Return_flight() { + return this.Formdata.get('Return_flight') as FormArray; + } + + + + // all hit + + + GetAllAirline(val) { + if (val) { + this.ApiServ.Get('/MasterSearch/GetAllAirline/en/' + val).subscribe(obj => { + if (obj) { + this.AirlineList = obj; + } + }); + } + } + + GetAllAircraftType() { + this.ApiServ.Get('/MasterSearch/GetAllAircraftType').subscribe(obj => { + if (obj) { + this.AllAircraftTypeList = obj; + } + }); + } + + getAirportDetails(val, check) { + if (val.length >= 3) { + this.ApiServ.Get('/MasterSearch/GetAllMasterSearch/en/' + val).subscribe(obj => { + if (obj) { + if (check) this.AirportListFrom = obj; + if (!check) this.AirportListTO = obj; + } + }); + } + } + + addFlightGroupBtn(FormName) { + let formgroup + FormName == 'FlightDetail' ? formgroup = this.FlightDetail : formgroup = this.Return_flight + formgroup.push( + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: [{ value: '', disabled: true }, Validators.required], + to_airport: [{ value: '', disabled: true }, Validators.required], + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: this.validationService.required, + is_next_day_arrival: [false], + sector_nbr: [''], + arrival_hour: this.validationService.required, + arrival_minutes: this.validationService.required, + arrival_terminal: this.validationService.required, + flying_duration_hour: this.validationService.required, + flying_duration_minutes: this.validationService.required, + is_next_day_departure: [false], + }) + ) + }; + removeFlightGroupBtn(ind, formname) { + let formgroup + formname == 'FlightDetail' ? formgroup = this.FlightDetail : formgroup = this.Return_flight + formgroup.removeAt(ind); + }; + Saveflightdetails() { + if (this.Formdata.status == "INVALID") { + this.validationService.showValidationsMsg(this.Formdata); + return; + } + let value = this.Formdata.getRawValue(); + let OutbondList = this.FlightDetail.getRawValue() + let returnList = this.Return_flight ? this.Return_flight.getRawValue() : [] + let date = moment(new Date).format('YYYY-MM-DD'); + let AllFlightDetailslist = []; + OutbondList.map((e, i) => { + let fligtDetlPostData = new FlightDetailobj(); + fligtDetlPostData.airline_code = e.airline_code + fligtDetlPostData.flight_no = e.flight_no; + // fligtDetlPostData._aircraft_type = e._aircraft_type; + fligtDetlPostData.from_airport = e.from_airport; + fligtDetlPostData.to_airport = e.to_airport; + fligtDetlPostData.departure_time = date + 'T' + e.departure_Hour + ':' + e.departure_minutes + ':00'; + fligtDetlPostData.is_next_day_departure = e.is_next_day_departure; + fligtDetlPostData.departure_terminal = e.departure_terminal; + fligtDetlPostData.is_next_day_arrival = e.is_next_day_arrival; + fligtDetlPostData.arrival_time = date + 'T' + e.arrival_hour + ':' + e.arrival_minutes + ':00'; + fligtDetlPostData.arrival_terminal = e.arrival_terminal; + fligtDetlPostData.flying_duration = date + 'T' + e.flying_duration_hour + ':' + e.flying_duration_minutes + ':00'; + fligtDetlPostData._sector_type = '1'; + fligtDetlPostData.sector_nbr = e.sector_nbr; + fligtDetlPostData.leg_nbr = i + 1; + AllFlightDetailslist.push(fligtDetlPostData); + }); + + this.is_search ? returnList.map((e, i) => { + let fligtDetlPostData = new FlightDetailobj(); + fligtDetlPostData.airline_code = e.airline_code + fligtDetlPostData.flight_no = e.flight_no; + // fligtDetlPostData._aircraft_type = e._aircraft_type; + fligtDetlPostData.from_airport = e.from_airport; + fligtDetlPostData.to_airport = e.to_airport; + fligtDetlPostData.departure_time = date + 'T' + e.departure_Hour + ':' + e.departure_minutes + ':00'; + fligtDetlPostData.is_next_day_departure = e.is_next_day_departure; + fligtDetlPostData.departure_terminal = e.departure_terminal; + fligtDetlPostData.is_next_day_arrival = e.is_next_day_arrival; + fligtDetlPostData.arrival_time = date + 'T' + e.arrival_hour + ':' + e.arrival_minutes + ':00'; + fligtDetlPostData.arrival_terminal = e.arrival_terminal; + fligtDetlPostData.flying_duration = date + 'T' + e.flying_duration_hour + ':' + e.flying_duration_minutes + ':00'; + fligtDetlPostData._sector_type = '2'; + fligtDetlPostData.sector_nbr = e.sector_nbr; + fligtDetlPostData.leg_nbr = i + 1; + AllFlightDetailslist.push(fligtDetlPostData); + }) : ''; + + let postdata = new UpdateFlightDetail(); + postdata.contract_id = this.contract_id; + postdata.departure_dates = this.is_search ? '' : this.formDate.join(','); + postdata.flight_detail = AllFlightDetailslist; + postdata.outbound_days = this.is_search ? '' : value.days.join(','); + this.ApiServ.Post('/FlightContract/UpdateFlightDetails', postdata).subscribe(data => { + if (data) { + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + data["status"] ? setTimeout(() => { + this.route.navigate(['/Services/FlightServices/Search']) + }, 500) : ''; + } + }); + + + }; + SetValForm(Obj) { + let departure = Obj.filter(e => e._sector_type == '1') + let Round = Obj.filter(e => e._sector_type == '2') + let departure_arr = departure.sort((a, b) => a.leg_nbr - b.leg_nbr) + let round_arr = Round.sort((a, b) => a.leg_nbr - b.leg_nbr) + departure_arr ? departure_arr.map((list_obj, i) => { + i == 0 ? '' : this.addFlightGroupBtn('FlightDetail') + Object.keys(list_obj).forEach(d => { + if (d == 'arrival_hour') { + this.FlightDetail.controls[i].get(d).setValue(list_obj[d]) + } else if (d == 'sector_nbr') { + this.FlightDetail.controls[i].get('sector_nbr').setValue(list_obj[d]) + } else if (d == 'airline_code') { + this.GetAllAirline(list_obj[d]) + this.FlightDetail.controls[i].get(d).setValue(list_obj[d]) + } else if (d == 'flight_no' || d == '_aircraft_type' || d == 'arrival_terminal' || + d == 'departure_terminal' || d == 'is_next_day_arrival' || d == 'is_next_day_departure') { + this.FlightDetail.controls[i].get(d).setValue(list_obj[d]) + + } else if (d == 'from_airport' || d == 'to_airport') { + d == 'from_airport' ? this.getAirportDetails(list_obj[d], true) : this.getAirportDetails(list_obj[d], false) + this.FlightDetail.controls[i].get(d).setValue(list_obj[d]) + } else if (d == 'departure_time') { + let hour = moment(list_obj[d]).format('h:mm').split(':')[0] + let minutes = moment(list_obj[d]).format('h:mm').split(':')[1] + this.FlightDetail.controls[i].get('departure_Hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.FlightDetail.controls[i].get('departure_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + + } else if (d == 'arrival_time') { + let hour = moment(list_obj[d]).format('h:mm').split(':')[0] + let minutes = moment(list_obj[d]).format('h:mm').split(':')[1] + this.FlightDetail.controls[i].get('arrival_hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.FlightDetail.controls[i].get('arrival_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } else if (d == 'flying_duration') { + let hour = moment(list_obj[d]).format('h:mm').split(':')[0] + let minutes = moment(list_obj[d]).format('h:mm').split(':')[1] + this.FlightDetail.controls[i].get('flying_duration_hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.FlightDetail.controls[i].get('flying_duration_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } + }); + }) : ''; + + round_arr ? round_arr.map((list_obj, i) => { + i == 0 ? '' : this.addFlightGroupBtn('Return_flight') + Object.keys(list_obj).forEach(d => { + if (d == 'arrival_hour') { + this.Return_flight.controls[i].get(d).setValue(list_obj[d]) + } else if (d == 'sector_nbr') { + this.Return_flight.controls[i].get('sector_nbr').setValue(list_obj[d]) + } + else if (d == 'airline_code') { + this.GetAllAirline(list_obj[d]) + this.Return_flight.controls[i].get(d).setValue(list_obj[d]) + } else if (d == 'flight_no' || d == '_aircraft_type' || d == 'arrival_terminal' || + d == 'departure_terminal' || d == 'is_next_day_arrival' || d == 'is_next_day_departure') { + this.Return_flight.controls[i].get(d).setValue(list_obj[d]) + + } else if (d == 'from_airport' || d == 'to_airport') { + d == 'from_airport' ? this.getAirportDetails(list_obj[d], true) : this.getAirportDetails(list_obj[d], false) + this.Return_flight.controls[i].get(d).setValue(list_obj[d]) + } else if (d == 'departure_time') { + let hour = moment(list_obj[d]).format('h:mm').split(':')[0] + let minutes = moment(list_obj[d]).format('h:mm').split(':')[1] + this.Return_flight.controls[i].get('departure_Hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.Return_flight.controls[i].get('departure_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + + } else if (d == 'arrival_time') { + let hour = moment(list_obj[d]).format('h:mm').split(':')[0] + let minutes = moment(list_obj[d]).format('h:mm').split(':')[1] + this.Return_flight.controls[i].get('arrival_hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.Return_flight.controls[i].get('arrival_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } else if (d == 'flying_duration') { + let hour = moment(list_obj[d]).format('h:mm').split(':')[0] + let minutes = moment(list_obj[d]).format('h:mm').split(':')[1] + this.Return_flight.controls[i].get('flying_duration_hour').setValue(hour.length != 2 ? '0' + hour : hour) + this.Return_flight.controls[i].get('flying_duration_minutes').setValue(minutes.length != 2 ? '0' + minutes : minutes) + } + }); + }) : ''; + + + }; + + /// validation form + setFilterValid(check) { + if (check) { + this.addvalid('date', 'add'); + this.addvalid('days', 'add'); + } else { + this.addvalid('date', 'remove'); + this.addvalid('days', 'remove'); + } + }; + + addvalid(name, type) { + if (type == 'add') { + this.Formdata.controls[name].addValidators([Validators.required]); + this.Formdata.controls[name].updateValueAndValidity(); + } else { + this.Formdata.controls[name].clearValidators(); + this.Formdata.controls[name].updateValueAndValidity(); + this.Formdata.controls[name].markAsUntouched(); + } + }; + + // validation + // nextdayarrivelcheck(check, ind, formname) { + // if (check) { + // this.AddOutboundtvalid(ind, 'arrival_hour', 'add', formname); + // this.AddOutboundtvalid(ind, 'arrival_minutes', 'add', formname); + // this.AddOutboundtvalid(ind, 'arrival_terminal', 'add', formname); + // this.AddOutboundtvalid(ind, 'flying_duration_hour', 'add', formname); + // this.AddOutboundtvalid(ind, 'flying_duration_minutes', 'add', formname); + // } else { + // this.AddOutboundtvalid(ind, 'arrival_hour', 'remove', formname); + // this.AddOutboundtvalid(ind, 'arrival_minutes', 'remove', formname); + // this.AddOutboundtvalid(ind, 'arrival_terminal', 'remove', formname); + // this.AddOutboundtvalid(ind, 'flying_duration_hour', 'remove', formname); + // this.AddOutboundtvalid(ind, 'flying_duration_minutes', 'remove', formname); + // } + + // } + + AddOutboundtvalid(index, name, type, formname) { + let formgroup; + formname == 'FlightDetail' ? formgroup = this.FlightDetail : formgroup = this.Return_flight + if (type == 'add') { + formgroup.controls[index].get(name).addValidators([Validators.required]); + formgroup.controls[index].get(name).updateValueAndValidity(); + } else { + formgroup.controls[index].get(name).clearValidators(); + formgroup.controls[index].get(name).updateValueAndValidity(); + formgroup.controls[index].get(name).markAsUntouched(); + } + }; + + + AddFLightRoundArr() { + this.Formdata.addControl( + 'Return_flight', this.Fb.array([ + this.Fb.group({ + airline_code: this.validationService.required, + flight_no: this.validationService.required, + _aircraft_type: this.validationService.required, + from_airport: [{ value: '', disabled: true }, Validators.required], + to_airport: [{ value: '', disabled: true }, Validators.required], + departure_Hour: this.validationService.required, + departure_minutes: this.validationService.required, + departure_terminal: this.validationService.required, + is_next_day_arrival: [false], + sector_nbr: [''], + arrival_hour: this.validationService.required, + arrival_minutes: this.validationService.required, + arrival_terminal: this.validationService.required, + flying_duration_hour: this.validationService.required, + flying_duration_minutes: this.validationService.required, + is_next_day_departure: [false], + }) + ]) + ); + }; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rangeDates: Date[]; + cities = [ + { id: 1, name: 'Oneway' }, + { id: 2, name: 'Roundtrip' }, + ]; + AirlineCode = [ + { id: 0, name: 'Select' }, + { id: 1, name: 'EK' }, + ]; + selectAirlineCode = this.AirlineCode[0].name; + + AircraftType = [ + { id: 0, name: 'Select' }, + { id: 1, name: 'a' }, + { id: 1, name: 'b' }, + { id: 1, name: 'c' }, + ]; + selectAircraftType = this.AircraftType[0].name; + date1: Date; + date2: Date; + date3: Date; + date4: Date; + // rangeDates: Date[]; + selectedCity = this.cities[0].name; + + + + +} diff --git a/src/app/modules/services/flight-services/flight-services-manage/edit-rate-and-inventory/edit-rate-and-inventory.component.html b/src/app/modules/services/flight-services/flight-services-manage/edit-rate-and-inventory/edit-rate-and-inventory.component.html new file mode 100644 index 0000000..b0d0369 --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-manage/edit-rate-and-inventory/edit-rate-and-inventory.component.html @@ -0,0 +1,659 @@ +
    + + Back +
    +
    Date Filter
    +
    +
    +
    + + + +
    + + {{date.day}} + + + {{date.day}} + +
    +
    + +
    +
    + + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    + + + +
    + +
    Outbound Days
    +
    + +
    +
    +
    +
    + + +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    + Stop Sale + +
    +
    +
    + Adult Base Fare + +
    +
    +
    + Adult Taxes + +
    +
    +
    + Child Base Fare + +
    +
    +
    + Child Taxes + +
    +
    +
    + Infant Base Fare + +
    +
    +
    + Infant Taxes + +
    +
    +
    + Seats Allocation + +
    +
    +
    + Adult Check Bag + +
    +
    +
    + Child Check Bag + +
    +
    +
    + Infant Check Bag + +
    +
    +
    + Check Bag Unit + +
    +
    +
    + Adult Cabin Bag + +
    +
    +
    + Child Cabin Bag + +
    +
    +
    + Infant Cabin Bag + +
    +
    +
    + Cabin Bag Unit + +
    +
    +
    + Fare Type + +
    +
    +
    + PNR + +
    +
    +
    + Confirmation Type + +
    +
    +
    + Adult Fare Rule + +
    +
    +
    + Child Fare Rule + +
    +
    +
    + Infant Fare Rule + +
    +
    +
    + Meal Included + +
    +
    +
    + Meal Details + +
    +
    +
    + Inclusions + +
    +
    + {{list.get('outbound_date').value | date : "dd MMM YYYY" }} + & {{list.get('return_date').value | date : "dd MMM YYYY" }} + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + +
    O
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/flight-services/flight-services-manage/edit-rate-and-inventory/edit-rate-and-inventory.component.ts b/src/app/modules/services/flight-services/flight-services-manage/edit-rate-and-inventory/edit-rate-and-inventory.component.ts new file mode 100644 index 0000000..d60531c --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-manage/edit-rate-and-inventory/edit-rate-and-inventory.component.ts @@ -0,0 +1,380 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { NgSelectComponent } from '@ng-select/ng-select'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { dtoFlightRate, FlightRateobj, UpdateFlightRate } from 'src/app/core/models/flight-service/flight-service-manage/edit-Rate-inventry.model'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-edit-rate-and-inventory', + templateUrl: './edit-rate-and-inventory.component.html', +}) +export class EditRateAndInventoryComponent implements OnInit { + value: Date; + constructor(public router: ActivatedRoute, + private ApiServ: API, public fb: FormBuilder, + public validationService: ValidationService, public MsgService: MessageService, public route: Router) { } + contract_id; + formdata: FormGroup; + SearchForm: FormGroup; + AtoZ = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] + is_search = false + lovKeyDataObj = { + AirCabinClass: [], + AirPaxType: [], + AirTripType: [], + DaySelect: [], + AirBaggageUnit: [], + AirFareType: [], + }; + // all Copy ui + + @ViewChild('is_stop_sale') is_stop_sale: ElementRef; + @ViewChild('adt_base_fare') adt_base_fare: ElementRef; + @ViewChild('adt_tax') adt_tax: ElementRef; + @ViewChild('chd_base_fare') chd_base_fare: ElementRef; + @ViewChild('chd_tax') chd_tax: ElementRef; + @ViewChild('inf_base_fare') inf_base_fare: ElementRef; + @ViewChild('inf_tax') inf_tax: ElementRef; + @ViewChild('pnr') pnr: ElementRef; + @ViewChild('seat_allocation') seat_allocation: ElementRef; + @ViewChild('adt_check_bag') adt_check_bag: ElementRef; + @ViewChild('chd_check_bag') chd_check_bag: ElementRef; + @ViewChild('inf_check_bag') inf_check_bag: ElementRef; + @ViewChild('_check_bag_unit') _check_bag_unit: NgSelectComponent + @ViewChild('adt_cabin_bag') adt_cabin_bag: ElementRef; + @ViewChild('chd_cabin_bag') chd_cabin_bag: ElementRef; + @ViewChild('inf_cabin_bag') inf_cabin_bag: ElementRef; + @ViewChild('_cabin_bag_unit') _cabin_bag_unit: NgSelectComponent; + @ViewChild('_fare_type') _fare_type: NgSelectComponent; + @ViewChild('is_instant_confirmation') is_instant_confirmation: NgSelectComponent; + @ViewChild('adt_fare_rule') adt_fare_rule: ElementRef; + @ViewChild('chd_fare_rule') chd_fare_rule: ElementRef; + @ViewChild('inf_fare_rule') inf_fare_rule: ElementRef; + @ViewChild('is_meal_included') is_meal_included: ElementRef; + @ViewChild('meal_details') meal_details: ElementRef + @ViewChild('inclusions') inclusions: ElementRef + ngOnInit(): void { + this.GetLOVKeys('AirCabinClass,AirPaxType,AirTripType,DaySelect,AirBaggageUnit,AirFareType'); + this.SearchForm = this.fb.group({ + date: [''], + days: [''], + _rbd: [''], + currency: [''], + }); + + this.formdata = this.fb.group({ + FlightRate: this.fb.array([ + ]) + }); + this.checkIsRangetype(); + this.GetFlightRate(); + }; + checkIsRangetype() { + this.router.queryParams.subscribe(obj => { + this.contract_id = obj['id'] + this.ApiServ.Get('/FlightContract/GetFlightDates?ContractId=' + obj['id']).subscribe(data => { + if (data) { + if (data.responseObject.is_multi_day && !data.responseObject.is_round_trip) { + this.is_search = false; + this.SetTimeAvali(data.responseObject.dates); + } else this.is_search = true; + } + this.SearchForm.get('currency').setValue(data.responseObject.currency_code); + }); + }) + } + get FlightRate() { + return this.formdata.get('FlightRate') as FormArray; + } + + copyOnUi() { + let value = this.FlightRate.getRawValue(); + value.map((obj, i) => { + Object.keys(obj).forEach(e => { + if (e == 'is_stop_sale') { + this.FlightRate.controls[i].get(e).setValue(this.is_stop_sale['_checked']) + } else if (e == 'adt_base_fare') { + this.FlightRate.controls[i].get(e).setValue(this.adt_base_fare.nativeElement.value) + } else if (e == 'adt_tax') { + this.FlightRate.controls[i].get(e).setValue(this.adt_tax.nativeElement.value) + } else if (e == 'chd_base_fare') { + this.FlightRate.controls[i].get(e).setValue(this.chd_base_fare.nativeElement.value) + } else if (e == 'inf_base_fare') { + this.FlightRate.controls[i].get(e).setValue(this.inf_base_fare.nativeElement.value) + } else if (e == 'inf_tax') { + this.FlightRate.controls[i].get(e).setValue(this.inf_tax.nativeElement.value) + } else if (e == 'seat_allocation') { + this.FlightRate.controls[i].get(e).setValue(this.seat_allocation.nativeElement.value) + } else if (e == 'adt_check_bag') { + this.FlightRate.controls[i].get(e).setValue(this.adt_check_bag.nativeElement.value) + } else if (e == 'chd_check_bag') { + this.FlightRate.controls[i].get(e).setValue(this.chd_check_bag.nativeElement.value) + } else if (e == 'inf_check_bag') { + this.FlightRate.controls[i].get(e).setValue(this.inf_check_bag.nativeElement.value) + } else if (e == 'adt_cabin_bag') { + this.FlightRate.controls[i].get(e).setValue(this.adt_cabin_bag.nativeElement.value) + } else if (e == 'chd_cabin_bag') { + this.FlightRate.controls[i].get(e).setValue(this.chd_cabin_bag.nativeElement.value) + } else if (e == 'inf_cabin_bag') { + this.FlightRate.controls[i].get(e).setValue(this.inf_cabin_bag.nativeElement.value) + } else if (e == 'adt_fare_rule') { + this.FlightRate.controls[i].get(e).setValue(this.adt_fare_rule.nativeElement.value) + } else if (e == 'chd_fare_rule') { + this.FlightRate.controls[i].get(e).setValue(this.chd_fare_rule.nativeElement.value) + } else if (e == 'inf_fare_rule') { + this.FlightRate.controls[i].get(e).setValue(this.inf_fare_rule.nativeElement.value) + } else if (e == 'is_meal_included') { + this.FlightRate.controls[i].get(e).setValue(this.is_meal_included['_checked'] ? 'Yes' : 'No') + } else if (e == 'meal_details') { + this.FlightRate.controls[i].get(e).setValue(this.meal_details.nativeElement.value) + } else if (e == 'inclusions') { + this.FlightRate.controls[i].get(e).setValue(this.inclusions.nativeElement.value) + console.log(this.inclusions.nativeElement) + } else if (e == '_check_bag_unit') { + let check_bag = this._check_bag_unit.selectedValues[0] ? this._check_bag_unit.selectedValues[0].lov_key : ''; + this.FlightRate.controls[i].get(e).setValue(check_bag); + } else if (e == '_cabin_bag_unit') { + let cabin_bag = this._cabin_bag_unit.selectedValues[0] ? this._cabin_bag_unit.selectedValues[0].lov_key : ''; + this.FlightRate.controls[i].get(e).setValue(cabin_bag); + } else if (e == '_fare_type') { + let fare_type = this._fare_type.selectedValues[0] ? this._fare_type.selectedValues[0].lov_key : ''; + this.FlightRate.controls[i].get(e).setValue(fare_type); + } else if (e == 'is_instant_confirmation') { + let fare_type = this.is_instant_confirmation.selectedValues[0] ? this.is_instant_confirmation.selectedValues[0].name : ''; + this.FlightRate.controls[i].get(e).setValue(fare_type); + } else if (e == 'chd_tax') { + this.FlightRate.controls[i].get(e).setValue(this.chd_tax.nativeElement.value); + } else if (e == 'pnr') { + this.FlightRate.controls[i].get(e).setValue(this.pnr.nativeElement.value); + } + }) + }) + + }; + + addformgroup() { + this.FlightRate.push( + this.fb.group({ + rate_id: [''], + outbound_date: [''], + adt_base_fare: this.validationService.decimal, + adt_tax: this.validationService.decimal, + chd_base_fare: this.validationService.decimal, + chd_tax: this.validationService.decimal, + inf_base_fare: this.validationService.decimal, + inf_tax: this.validationService.decimal, + seat_allocation: this.validationService.number, + adt_check_bag: this.validationService.number, + chd_check_bag: this.validationService.number, + inf_check_bag: this.validationService.number, + _check_bag_unit: this.validationService.required, + adt_cabin_bag: this.validationService.number, + chd_cabin_bag: this.validationService.number, + inf_cabin_bag: this.validationService.number, + _cabin_bag_unit: this.validationService.required, + _fare_type: this.validationService.required, + adt_fare_rule: this.validationService.required, + chd_fare_rule: this.validationService.required, + inf_fare_rule: this.validationService.required, + is_meal_included: this.validationService.required, + meal_details: [''], + inclusions: [''], + pnr: this.validationService.required, + return_date: [''], + is_instant_confirmation: this.validationService.required, + is_stop_sale: [false], + }) + ) + } + + GetFlightRate() { + let postdata = new FlightRateobj(); + let val = this.SearchForm.getRawValue(); + postdata._id = this.contract_id; + postdata._from_date = val.date[0] ? moment(val.date[0]).format('YYYY-MM-DD') : ''; + postdata._rbd = val._rbd ? val._rbd : ''; + postdata._to_date = val.date[1] ? moment(val.date[1]).format('YYYY-MM-DD') : ''; + postdata.days = val.days ? val.days.join(',') : ''; + + this.ApiServ.Post('/FlightContract/GetFlightRate', postdata).subscribe(data => { + if (data) { + this.formdata.reset(); + this.FlightRate.clear(); + if (data.responseObject) { + this.addformgroup() + this.SetValue(data.responseObject); + } + } + }); + }; + + + + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + }; + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.ApiServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + }; + + saveRateDetails() { + if (this.formdata.status == "INVALID") { + this.validationService.showValidationsMsg(this.formdata); + return; + } + let value = this.FlightRate.getRawValue(); + let flight_list_arr = []; + value.map(e => { + let post_obj = new dtoFlightRate(); + post_obj.rate_id = e.rate_id; + post_obj.outbound_date = e.outbound_date; + post_obj.adt_base_fare = e.adt_base_fare; + post_obj.adt_tax = e.adt_tax; + post_obj.chd_base_fare = e.chd_base_fare; + post_obj.chd_tax = e.chd_tax; + post_obj.inf_base_fare = e.inf_base_fare; + post_obj.inf_tax = e.inf_tax; + post_obj.seat_allocation = e.seat_allocation; + post_obj.adt_check_bag = e.adt_check_bag; + post_obj.chd_check_bag = e.chd_check_bag; + post_obj.inf_check_bag = e.inf_check_bag; + post_obj._check_bag_unit = e._check_bag_unit; + post_obj.adt_cabin_bag = e.adt_cabin_bag; + post_obj.chd_cabin_bag = e.chd_cabin_bag; + post_obj.inf_cabin_bag = e.inf_cabin_bag; + post_obj._cabin_bag_unit = e._cabin_bag_unit; + post_obj._fare_type = e._fare_type; + post_obj.adt_fare_rule = e.adt_fare_rule; + post_obj.chd_fare_rule = e.chd_fare_rule; + post_obj.inf_fare_rule = e.inf_fare_rule; + post_obj.is_meal_included = e.is_meal_included == 'Yes' ? true : false; + post_obj.meal_details = e.is_meal_included == 'Yes' ? e.meal_details : ''; + post_obj.inclusions = e.inclusions; + post_obj.pnr = e.pnr; + post_obj.is_instant_confirmation = e.is_instant_confirmation == 'Instant' ? true : false; + post_obj.is_stop_sale = e.is_stop_sale; + flight_list_arr.push(post_obj); + }) + + let postdata = new UpdateFlightRate(); + postdata.contract_id = this.contract_id; + postdata.flight_rate = flight_list_arr; + + this.ApiServ.Post('/FlightContract/UpdateRatesAndInventory', postdata).subscribe(data => { + if (data) { + this.MsgService.add({ + severity: data["status"] ? "success" : "error", + detail: data["message"], + }); + data["status"] ? setTimeout(() => { + this.route.navigate(['/Services/FlightServices/Search']) + }, 500) : ''; + } + }) + }; + + SetValue(data) { + + data ? data.map((obj, i) => { + i != 0 ? this.addformgroup() : '' + Object.keys(obj).forEach(e => { + if (e == 'is_meal_included') this.FlightRate.controls[i].get(e).setValue(obj[e] ? 'Yes' : 'No'); + else if (e == 'is_instant_confirmation') this.FlightRate.controls[i].get(e).setValue(obj[e] ? 'Instant' : 'Manual'); + else this.FlightRate.controls[i].get(e).setValue(obj[e]); + }) + }) : '' + }; + + Confirmation_Type = [ + { id: 0, name: 'Instant' }, + { id: 1, name: 'Manual' }, + ]; + + Option = [ + { id: 2, name: 'Yes' }, + { id: 3, name: 'No' }, + ]; + + formDate; + datelist + SetTimeAvali(allDate) { + this.datelist = allDate.split(','); + let obj = []; + this.datelist.map(e => { + obj.push(moment(e).format('MM-DD-YYYY')); + }) + this.datelist = obj; + } + @ViewChild('calender') calender + DateRangecheck() { + let date_range = this.SearchForm.get('date').value + if (date_range[1]) { + this.calender.overlayVisible = false; + let AllSelectDate = [] + this.datelist.filter(e => { + let from = moment(date_range[0]).format('MM:DD:YYYY').split(':') + let To = moment(date_range[1]).format('DD:MMM:YYYY').split(':') + let maindate = moment(e).format('DD:MMM:YYYY').split(':') + if (from[1] == maindate[1] || To[1] == maindate[1]) { + let date = new Date(e).getDate(); + let St = new Date(date_range[0]).getDate(); + let et = new Date(date_range[1]).getDate(); + (date >= St && date <= et) ? AllSelectDate.push(e) : '' + } + }) + this.formDate = AllSelectDate; + // this.GetFlightRate() + }; + }; + + checkDateForHighlight(date) { + let month = date.month > 9 ? date.month : '0' + date.month; + let d = new Date(date.year, date.month, date.day); + let new_Date = month + '-' + date.day + '-' + date.year; + let Checkformat = moment(new_Date).format('MM-DD-YYYY') + let validate; + validate = false; + if (new_Date == Checkformat) { + let format = moment(d).format('MM-DD-YYYY') + let valid = this.datelist.filter(e => e == format) + if (valid.length > 0) { + validate = true; + } + } + return validate; + } + + MealTypeIncludedcheck(val, ind) { + console.log(val) + if (val == 'Yes') this.addvalidMealTypeIncluded(ind, 'meal_details', 'add') + else this.addvalidMealTypeIncluded(ind, 'meal_details', 'remove') + + } + + addvalidMealTypeIncluded(index, name, type) { + if (type == 'add') { + this.formdata.controls[index].get(name).addValidators([Validators.required]); + this.formdata.controls[index].get(name).updateValueAndValidity(); + } else { + this.formdata.controls[index].get(name).clearValidators(); + this.formdata.controls[index].get(name).updateValueAndValidity(); + this.formdata.controls[index].get(name).markAsUntouched(); + } + }; +} diff --git a/src/app/modules/services/flight-services/flight-services-manage/flight-services-manage.module.ts b/src/app/modules/services/flight-services/flight-services-manage/flight-services-manage.module.ts new file mode 100644 index 0000000..047d2a8 --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-manage/flight-services-manage.module.ts @@ -0,0 +1,74 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { EditContractDetailsComponents } from './edit-contract/edit-contract-details'; +import { EditFlightDetailsComponent } from './edit-flight-details/edit-flight-details.component'; +import { EditRateAndInventoryComponent } from './edit-rate-and-inventory/edit-rate-and-inventory.component'; +import { RouterModule, Routes } from '@angular/router'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { CheckboxModule } from 'primeng/checkbox'; +import { InputNumberModule } from 'primeng/inputnumber'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TreeModule } from 'primeng/tree'; +import { CalendarModule } from 'primeng/calendar'; +import { MessageService } from 'primeng/api'; +import { ToastModule } from 'primeng/toast'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: 'EditRateAndInventory', + component: EditRateAndInventoryComponent, + }, + { + path: 'EditFlight', + component: EditFlightDetailsComponent, + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'Search', + }, +]; + +@NgModule({ + declarations: [ + EditFlightDetailsComponent, + EditRateAndInventoryComponent, + EditContractDetailsComponents + ], + imports: [ + CommonModule, + CommonModule, + ButtonModule, + NgSelectModule, + TreeModule, + ToolbarModule, + TableModule, + MatMenuModule, + MatButtonModule, + CheckboxModule, + InputTextModule, + InputNumberModule, + CalendarModule, + FormsModule, + MatDialogModule, + // FormsModule, + TooltipModule, + ReactiveFormsModule, + MatButtonModule, + MatCheckboxModule, + ToastModule, + RouterModule.forChild(routes), + + ], + providers: [MessageService], +}) +export class FlightServicesManageModule { } diff --git a/src/app/modules/services/flight-services/flight-services-search/flight-services-search.component.html b/src/app/modules/services/flight-services/flight-services-search/flight-services-search.component.html new file mode 100644 index 0000000..ceacf81 --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-search/flight-services-search.component.html @@ -0,0 +1,436 @@ +
    +
    +
    +

    Search Flight Contract

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    + +
    Trip Type
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Airline
    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    + +
    Origin
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Destination
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Departure Days
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Return Days
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    + + + +
    +
    +
    +
    + + +
    +
    +
    +
    + Is Multi Day Operation +
    +
    +
    +
    + + + +
    + +
    Currency
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Fare Type
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    RBD
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Cabin Class
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    + +
    Confirmation Type
    +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Contract Id + + + + Contract Name + + + + Supplier Name + + + + Trip Type + + + + Airline + + + + Flight No. + + + + Origin + + + + Destination + + + + PNR + + + + Is Multi Day Operation + + + + Currency + + + + Status + + + Action + + + + + {{ FlightAllDetails.contract_id }} + {{ FlightAllDetails.contract_name }} + {{ FlightAllDetails.supplier_name }} + {{FlightAllDetails._trip_type == lovKeyDataObj.AirTripType[0].lov_key ? + lovKeyDataObj.AirTripType[0].lov_value : lovKeyDataObj.AirTripType[1].lov_value }} + {{FlightAllDetails.validating_airline }} + {{FlightAllDetails.flight_no }} + {{FlightAllDetails.from_airport }} + {{FlightAllDetails.to_airport }} + {{FlightAllDetails.pnr }} + {{FlightAllDetails.is_multi_day ? 'Yes' : 'NO' }} + {{FlightAllDetails.currency_code }} + + {{FlightAllDetails.is_active + ? 'Active' : 'Deactive' }} + + +
    + + + + + + + + +
    + + +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/services/flight-services/flight-services-search/flight-services-search.component.ts b/src/app/modules/services/flight-services/flight-services-search/flight-services-search.component.ts new file mode 100644 index 0000000..00a66ec --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services-search/flight-services-search.component.ts @@ -0,0 +1,349 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Product } from 'src/app/core/services/product'; +import { ProductService } from 'src/app/core/services/product.service'; +import * as FileSaver from 'file-saver'; +import { MatDialog } from '@angular/material/dialog'; +import { MatMenuTrigger } from '@angular/material/menu'; +import { EditContractDetailsComponents } from '../flight-services-manage/edit-contract/edit-contract-details'; +import { API } from 'src/app/core/services/api.service'; +import { FlightContractSearhObj } from 'src/app/core/models/flight-service/flight-service-search/flight-service-search.model'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { Router } from '@angular/router'; +@Component({ + selector: 'app-flight-services-search', + templateUrl: './flight-services-search.component.html', +}) +export class FlightServicesSearchComponent implements OnInit { + @ViewChild('menuTrigger') menuTrigger: MatMenuTrigger; + lovKeyDataObj = { + AirCabinClass: [], + AirPaxType: [], + AirTripType: [], + DaySelect: [], + AirBaggageUnit: [], + AirFareType: [], + }; + Formdata: FormGroup; + CurrencyList; + AirlineList; + AirportListFrom; + AirportListTO; + AtoZ = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] + FlightAllDetails; + constructor( + private productService: ProductService, + public dialog: MatDialog, + public ApiServ: API, + public fb: FormBuilder, + public MsgService: MessageService, + public router: Router + ) { } + + ngOnInit(): void { + this.OnInitForm(); + this.GetLOVKeys('AirCabinClass,AirPaxType,AirTripType,DaySelect,AirBaggageUnit,AirFareType'); + this.GetCurrency(); + + } + + OnInitForm() { + this.Formdata = this.fb.group({ + contract_name: [''], + supplier_name: [''], + _trip_type: [''], + airline_code: [''], + flight_no: [''], + from_airport: [''], + to_airport: [''], + is_multi_day: [false], + pnr: [''], + currency_code: [''], + fare_type: [''], + Cabin_Class: [], + is_instant_confirmation: [''], + rbd: [''], + ret_days: [''], + dep_days: [''], + departure_date: [''], + return_date: [''], + }); + } + + + + GetFlightDetails() { + let value = this.Formdata.getRawValue(); + let Postdata = new FlightContractSearhObj(); + Postdata.contract_name = value.contract_name; + Postdata.supplier_name = value.supplier_name; + Postdata._trip_type = value._trip_type.toString(); + Postdata.airline_code = value.airline_code; + Postdata.flight_no = value.flight_no; + Postdata.from_airport = value.from_airport; + Postdata.to_airport = value.to_airport; + Postdata.dep_from_date = value.departure_date[0] ? moment(value.departure_date[0]).format('YYYY-MM-DD') : ''; + Postdata.dep_to_date = value.departure_date[1] ? moment(value.departure_date[1]).format('YYYY-MM-DD') : ''; + Postdata.ret_from_date = value.return_date[0] ? moment(value.return_date[0]).format('YYYY-MM-DD') : ''; + Postdata.ret_to_date = value.return_date[1] ? moment(value.return_date[1]).format('YYYY-MM-DD') : ''; + Postdata.is_multi_day = value.is_multi_day; + Postdata.pnr = value.pnr; + Postdata.rbd = value.rbd; + Postdata.ret_days = value.ret_days ? value.ret_days.join(',') : ''; + Postdata.dep_days = value.dep_days ? value.dep_days.join(',') : ''; + Postdata.currency_code = value.currency_code; + Postdata.fare_type = value.fare_type ? value.fare_type : 0; + Postdata.is_instant_confirmation = value.is_instant_confirmation == 'Instant' && value.is_instant_confirmation ? true : false; + value.Cabin_Class == 1 ? Postdata.is_economy = true : Postdata.is_economy = false; + value.Cabin_Class == 2 ? Postdata.is_premium_economy = true : Postdata.is_premium_economy = false; + value.Cabin_Class == 3 ? Postdata.is_business = true : Postdata.is_business = false; + value.Cabin_Class == 4 ? Postdata.is_first_class = true : Postdata.is_first_class = false; + this.ApiServ.Post('/FlightContract/GetAllFlightContractView', Postdata).subscribe(obj => { + if (obj) { + this.FlightAllDetails = obj.responseObject; + } + }); + } + + GetLOVKeys(lov_key_names) { + let lov_key_names_arr = lov_key_names.split(','); + let lov_obj = { + "lov_types": [], + "lov_lang": "en" + }; + lov_key_names_arr.forEach(key_name => { + lov_obj.lov_types.push({ "lov_type": key_name }); + }); + this.ApiServ.Post('/LovMaster/GetLov', lov_obj).subscribe(lov_data => { + if (lov_data && lov_data.status) { + lov_key_names_arr.forEach(key_name => { + let arr = lov_data.responseObject.filter(el => el.lov_type == key_name); + arr.length > 0 ? this.lovKeyDataObj[key_name] = arr[0].keys : ''; + }); + } + }); + }; + + updateStatus(id, val) { + let obj = { + Id: id, + Status: val ? false : true, + UpdatedBy: '' + } + this.ApiServ.Post('/FlightContract/UpdateStatus', obj).subscribe(obj => { + if (obj) { + this.GetFlightDetails(); + this.MsgService.add({ + severity: obj["status"] ? "success" : "error", + detail: obj["message"], + }); + } + }); + } + GetAllAirline(val) { + if (val.value) { + this.ApiServ.Get('/MasterSearch/GetAllAirline/en/' + val.value).subscribe(obj => { + if (obj) { + this.AirlineList = obj; + } + }); + } + } + GetCurrency() { + this.ApiServ.Get('/Currency/GetCurrency').subscribe(obj => { + if (obj) { + this.CurrencyList = obj; + } + }) + } + // static dropdown + + Confirmation_Type = [ + { id: 0, name: 'Instant' }, + { id: 1, name: 'Manual' }, + ]; + + ResetVal() { + let val = this.Formdata.getRawValue() + Object.keys(val).forEach(e => { + if (e == 'is_multi_day') this.Formdata.get(e).setValue(false) + else this.Formdata.get(e).setValue(''); + + }) + } + + + getAirportDetails(val, check) { + if (val.value.length >= 3) { + this.ApiServ.Get('/MasterSearch/GetAllMasterSearch/en/' + val.value).subscribe(obj => { + if (obj) { + if (check) this.AirportListFrom = obj + if (!check) this.AirportListTO = obj + } + }); + } + } + + editRateInventry(contract_id) { + let obj = { id: contract_id }; + this.router.navigate(['/Services/FlightServices/Manage/EditRateAndInventory'], { queryParams: obj }); + }; + EditFlightDetails(contract_id) { + let obj = { id: contract_id }; + this.router.navigate(['/Services/FlightServices/Manage/EditFlight'], { queryParams: obj }); + } + + + + + + + + + + + + + + + + + + + + + + + displayModal: boolean; + showModalDialog() { + this.displayModal = true; + } + openDialog(Id) { + const dialogRef = this.dialog.open(EditContractDetailsComponents, { + width: '35rem', + restoreFocus: false, + data: { + contractId: Id, + } + }); + + // Manually restore focus to the menu trigger since the element that + // opens the dialog won't be in the DOM any more when the dialog closes. + dialogRef.afterClosed().subscribe(() => this.menuTrigger.focus()); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cities = [ + { id: 1, name: 'Vilnius' }, + { id: 2, name: 'Kaunas' }, + { id: 3, name: 'Pavilnys', disabled: true }, + { id: 4, name: 'Pabradė' }, + { id: 5, name: 'Klaipėda' }, + ]; + selectedCity = this.cities[0].name; + + + + rangeDates: Date[]; + + minDate: Date; + + maxDate: Date; + + es: any; + + invalidDates: Array; + // table + cols!: any[]; + + productDialog!: boolean; + + products!: Product[]; + + product!: Product; + + selectedProducts!: Product[]; + + submitted!: boolean; + + openNew() { + this.product = {}; + this.submitted = false; + this.productDialog = true; + } + + findIndexById(id: string): number { + let index = -1; + for (let i = 0; i < this.products.length; i++) { + if (this.products[i].id === id) { + index = i; + break; + } + } + return index; + } + createId(): string { + let id = ''; + var chars = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + for (var i = 0; i < 5; i++) { + id += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return id; + } + exportExcel() { + import('xlsx').then((xlsx) => { + console.log(xlsx); + const worksheet = xlsx.utils.json_to_sheet(this.products); + const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] }; + const excelBuffer: any = xlsx.write(workbook, { + bookType: 'xlsx', + type: 'array', + }); + this.saveAsExcelFile(excelBuffer, 'products'); + }); + } + + saveAsExcelFile(buffer: any, fileName: string): void { + import('file-saver').then((abc) => { + let EXCEL_TYPE = + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; + let EXCEL_EXTENSION = '.xlsx'; + const data: Blob = new Blob([buffer], { + type: EXCEL_TYPE, + }); + console.log(FileSaver); + FileSaver.saveAs( + data, + fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION + ); + }); + } +} diff --git a/src/app/modules/services/flight-services/flight-services.module.ts b/src/app/modules/services/flight-services/flight-services.module.ts new file mode 100644 index 0000000..b62f77e --- /dev/null +++ b/src/app/modules/services/flight-services/flight-services.module.ts @@ -0,0 +1,77 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FlightServicesSearchComponent } from './flight-services-search/flight-services-search.component'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { CheckboxModule } from 'primeng/checkbox'; +import { ProductService } from 'src/app/core/services/product.service'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TreeModule } from 'primeng/tree'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatButtonModule } from '@angular/material/button'; +import { InputNumberModule } from 'primeng/inputnumber'; +import { InputTextModule } from 'primeng/inputtext'; +import { FlightServicesAddComponent } from './flight-services-add/flight-services-add.component'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { CalendarModule } from 'primeng/calendar'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatDialogModule } from '@angular/material/dialog'; +// import { FlightServicesManageComponent } from './flight-services-manage/flight-services-manage.component'; +import { MessageService } from 'primeng/api'; +import { ToastModule } from 'primeng/toast'; + +const routes: Routes = [ + { + path: 'Search', + component: FlightServicesSearchComponent, + }, + { + path: 'Add', + component: FlightServicesAddComponent, + }, + { + path: 'Manage', + loadChildren: () => + import('./flight-services-manage/flight-services-manage.module').then( + (m) => m.FlightServicesManageModule + ), + }, + + { + path: '', + pathMatch: 'full', + redirectTo: 'Search', + }, +]; + +@NgModule({ + declarations: [ + FlightServicesSearchComponent, + FlightServicesAddComponent, + ], + imports: [ + CommonModule, + ButtonModule, + NgSelectModule, + TreeModule, + ToolbarModule, + TableModule, + MatMenuModule, + MatButtonModule, + CheckboxModule, + InputTextModule, + InputNumberModule, + CalendarModule, + FormsModule, + ReactiveFormsModule, + MatDialogModule, + MatButtonModule, + MatCheckboxModule, + RouterModule.forChild(routes), + ToastModule + ], + providers: [ProductService, MessageService], +}) +export class FlightServicesModule { } diff --git a/src/app/modules/services/hotel/hotel-add/hotel-add.component.html b/src/app/modules/services/hotel/hotel-add/hotel-add.component.html new file mode 100644 index 0000000..6815c47 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-add/hotel-add.component.html @@ -0,0 +1,99 @@ + +
    +
    +
    +

    Add Hotel Form

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Hotel Name

    +
    + +
    +
    +
    + + {{item.hotelName }} {{item.cityName }}, {{item.countryName }} + +
    + Please + select hotel name +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Currency

    +
    + +
    +
    +
    + + {{item.currency_code }} + +
    + Please + select currency +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-add/hotel-add.component.ts b/src/app/modules/services/hotel/hotel-add/hotel-add.component.ts new file mode 100644 index 0000000..6903c82 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-add/hotel-add.component.ts @@ -0,0 +1,119 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-hotel-add', + templateUrl: './hotel-add.component.html', +}) +export class HotelAddComponent implements OnInit { + + constructor(private apiserv: API,public fb:FormBuilder, public validserv:ValidationService,public MsgService:MessageService, private router: Router) { } + HotelList; + CurrencyList; + timer; + selectedRow; + ddLoader = { + hotel_list:false, + currency_list:false + }; + HotelDetailForm:FormGroup; + + ngOnInit(): void { + this.HotelDetailForm = this.fb.group({ + hotel_code_mapping:this.validserv.required, + currency:this.validserv.required, + star_rating:'', + country_code:'', + city_code:'', + city_name:'', + country_name:'' + }) + } + + GetHotels(event){ + if (event.value.length >= 2) { + let obj ={ + languageCode:'en', + cityName:event.value, + lattitude:'0', + longitude:'0', + } + this.ddLoader['hotel_list'] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGoPost(`/Hotel/GetHotels`,obj).subscribe(res => { + if (res) { + this.HotelList = res.hotels; + this.ddLoader['hotel_list'] = false; + } + }); + }, 500); + } + } + GetCurrency(event){ + if (event.value.length >= 2) { + let obj ={ + langcode:'en', + query:event.value + } + this.ddLoader['currency_list'] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGoPost(`/MasterSearch/GetAllCurrency`,obj).subscribe(res => { + if (res) { + this.CurrencyList = res.Result; + this.ddLoader['currency_list'] = false; + } + }); + }, 500); + } + } + SetHotelDet(event){ + this.selectedRow = this.HotelList.find(row => row.hotelId === event); + if(this.selectedRow){ + this.HotelDetailForm.get('country_name').setValue(this.selectedRow.countryName); + this.HotelDetailForm.get('city_name').setValue(this.selectedRow.cityName); + this.HotelDetailForm.get('city_code').setValue(this.selectedRow.cityCode); + this.HotelDetailForm.get('country_code').setValue(this.selectedRow.countryCode); + this.HotelDetailForm.get('star_rating').setValue(this.selectedRow.Rating); + } + } + + Save(){ + if (this.HotelDetailForm.status == "INVALID") { + this.validserv.showValidationsMsg(this.HotelDetailForm); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.HotelDetailForm.getRawValue(); + let ReqObj={ + hotel_code_mapping:val.hotel_code_mapping, + currency:val.currency, + star_rating:val.star_rating ? parseInt(val.star_rating) : 0, + country_code:val.country_code ? val.country_code : '', + city_code:val.city_code ? val.city_code : '' + } + this.apiserv.Post('/ExtranetHotel/SaveExtranetHotel',ReqObj).subscribe(data=>{ + if(data){ + this.MsgService.add({ + severity: data.status ? "success" : "error", + detail: data.message, + }); + data.status ? this.backbutton() : ''; + } + }) + } + + backbutton(){ + this.router.navigateByUrl("Services/Hotel/HotelSearch"); + } + backClick() { + this.router.navigateByUrl("Services/Hotel/HotelSearch"); + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/allocation/allocation-add/allocation-add.component.html b/src/app/modules/services/hotel/hotel-manage/allocation/allocation-add/allocation-add.component.html new file mode 100644 index 0000000..cd2c5ce --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/allocation/allocation-add/allocation-add.component.html @@ -0,0 +1,259 @@ + +
    +
    +
    +
    +

    Add Allocation

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + {{item}} + {{item}} + {{data.room_name + (data.room_view_name ? ', ' : '') + data.room_view_name}} +
    + Please + select room name +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Select + Specific Dates + Season +
    + Please + select Date type +
    +
    + +
    +
    +
    +
    + +
    +
    + + + Please select date greater than from previous range + + + Please select range to date + + + Please select date range + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Season

    +
    + +
    +
    +
    + {{data.season_name}} +
    + + info + + Please + select Season +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Allocation Days

    +
    + +
    +
    +
    + {{item}} + {{item}} +
    + Please + select allocation days +
    +
    +
    +
    + + + +
    +
    +
    +

    Allocation Type

    +
    + +
    +
    +
    + Select + Free Sale + Count Sale +
    + Please + select allocation type +
    +
    +
    +
    +
    +
    + + + Please + enter allocation +
    +
    +
    +
    + + + Please + enter release days +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    {{item.season_name}}
    +
    +

    {{date}}

    +
    +
    +
    + + + +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/allocation/allocation-add/allocation-add.component.ts b/src/app/modules/services/hotel/hotel-manage/allocation/allocation-add/allocation-add.component.ts new file mode 100644 index 0000000..4bf6d9d --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/allocation/allocation-add/allocation-add.component.ts @@ -0,0 +1,322 @@ +import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { API } from 'src/app/core/services/api.service'; +import { BreakpointsService } from 'src/app/core/services/breakpoints.services'; + +@Component({ + selector: 'app-allocation-add', + templateUrl: './allocation-add.component.html', +}) +export class AllocationAddComponent implements OnInit { + Extranet_Hotel_Id; + Season_List = []; + AllSeason; + SelectAllRoom = []; + ClearAllRoom = []; + IsMobile; + AllRoomsData; + MinDate = new Date(); + position: string; + displayPosition: boolean; + Allocation_Form:FormGroup; + AllDaysArr = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']; + SelectAllVal = ["Select All"]; + DaysArrValue = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']; + SelectAll=["Select All"]; + constructor( + private router: Router, + public activateRoute:ActivatedRoute, + private hotelmanageserv:ManageHotelService, + public apiserv:API,public fb:FormBuilder,public validserv:ValidationService,public commonMasterSer:CommonFunctionService, + public brkpointsrv:BreakpointsService + ) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Allocation_Form = this.fb.group({ + extranet_room_id:this.validserv.required, + date_type:this.validserv.required, + AllocationDays:this.fb.array([ + this.fb.group({ + allocation_days:this.validserv.required, + allocation_type:this.validserv.required + }) + ]) + }); + this.getAllData(); + this.IsMobile = this.brkpointsrv.IsMobile.getValue(); + } + ShowDateTypeFields(event){ + this.Season_List = []; + if(event == 'SPECIFICDATES'){ + this.Allocation_Form.addControl('ContractDatesArr',new FormArray([this.fb.group({ + date:['', Validators.compose([Validators.required, this.dateValidation(new Date())])], + })])); + this.Allocation_Form.removeControl('Season_Id'); + }else if(event == 'SEASON'){ + this.Allocation_Form.addControl('Season_Id',new FormControl('',Validators.required)) + this.Allocation_Form.removeControl('ContractDatesArr'); + }else { + this.Allocation_Form.removeControl('Season_Id'); + this.Allocation_Form.removeControl('ContractDatesArr'); + } + } + addDate() { + let formArray = this.Allocation_Form.controls['ContractDatesArr'] as FormArray; + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if(formArray.length > 0){ + if (formArray.length > 0) { + let formdate = formArray.controls[formArray.length - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + formArray.push(this.fb.group({ + extranet_season_detail_id:'', + date: ['', Validators.compose([ + Validators.required, + this.dateValidation(currentDate) + ])] + })); + } + } + public dateValidation(toDate): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + if (toDate && control.value.length <= 1 || control.value[0] <= toDate) { + return { 'range': true }; + } + } + return null; + }; + } + removeDate(index) { + let formArray = this.Allocation_Form.controls['ContractDatesArr'] as FormArray; + formArray.removeAt(index); + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if (formArray.length > 0) { + if(index > 0){ + let formdate = formArray.controls[index - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + if (formArray.controls.length >= (index + 1)) { + formArray.controls[index].get("date").clearValidators(); + formArray.controls[index].get("date").setErrors(null); + formArray.controls[index].get("date").addValidators([Validators.required,this.dateValidation(currentDate)]); + formArray.controls[index].get("date").markAsTouched(); + formArray.controls[index].get("date").updateValueAndValidity(); + formArray.controls[index].get("date").markAsTouched(); + } + } + } + showPositionDialog(position) { + this.position = position; + this.displayPosition = true; + }; + backClick(){ + this.hotelmanageserv.Active_tab = 'Allocation'; + this.router.navigateByUrl("Services/Hotel/HotelManage/"+ this.Extranet_Hotel_Id); + } + SeasonDataAddRemove(){ + this.Season_List = []; + let selected_season = this.Allocation_Form.controls['Season_Id'].value; + selected_season.forEach(data=>{ + let matched_season_by_id = this.AllSeason.find(e=>e.extranet_season_id == data); + if(matched_season_by_id){ + if(typeof(matched_season_by_id['date_range']) == 'string'){ + matched_season_by_id['date_range'] = matched_season_by_id.date_range.split(', '); + matched_season_by_id['date_range'].forEach((z,i)=>{ + matched_season_by_id['date_range'][i] = moment(z.split(' - ')[0]).format('DD MMM YYYY') + ' to ' + moment(z.split(' - ')[1]).format('DD MMM YYYY') + }) + } + this.Season_List.push(matched_season_by_id); + console.log(this.Season_List) + } + }) + } + getAllData() { + forkJoin( + this.GetAllRooms(), + this.GetAllSeason() + ).subscribe(res=>{ + if(res && res.length > 0){ + this.AllRoomsData = res[0] ? res[0].data : []; + if(res[0].data){ + this.SelectAllRoom = ['Select All']; + } + this.AllSeason = res[1].data ? res[1].data : []; + } + }); + } + GetAllRooms(){ + let ReqObj = { + extranet_hotel_id : this.Extranet_Hotel_Id, + extranet_room_id : '', + room_name : '', + room_view_name : '', + } + return this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetHotelRoomName',ReqObj) + } + GetAllSeason(){ + let ReqObj = { + season_name:'', + hotel_id:this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj) + } + CloseCalender(element, index) { + let formArray = this.Allocation_Form.controls['ContractDatesArr']['controls']; + if (element.value[0] && element.value[1]) { + element.overlayVisible = false; + element.datepickerClick = true; + if (formArray.length >= (index + 2)) { + formArray[index + 1].get("date").clearValidators(); + formArray[index + 1].get("date").setErrors(null); + formArray[index + 1].get("date").addValidators([Validators.required,this.dateValidation(element.value[1])]); + formArray[index + 1].get("date").markAsTouched(); + formArray[index + 1].get("date").updateValueAndValidity(); + formArray[index + 1].get("date").markAsTouched(); + } + } + } + AllocationTypeCheck(ind,event){ + let formgroup = this.Allocation_Form.controls['AllocationDays']['controls'][ind] as FormGroup; + if(event == 'COUNTSALE'){ + formgroup.addControl('allocation_limit',new FormControl('',Validators.required)); + formgroup.addControl('release_days',new FormControl('',Validators.required)); + }else { + formgroup.removeControl('allocation_limit'); + formgroup.removeControl('release_days'); + } + } + ChangeinWeekDays(i?,event?){ + let selected_days_by_room = []; + let formdata = this.Allocation_Form.controls['AllocationDays'].value; + if(event?.includes('Select All')){ + formdata[i].allocation_days.splice(formdata[i].allocation_days.indexOf('Select All'), 1); + this.DaysArrValue.forEach(days_val=>{ + formdata[i].allocation_days.push(days_val); + }) + this.Allocation_Form.controls['AllocationDays']['controls'][i]['controls']['allocation_days'].setValue(formdata[i].allocation_days); + } + formdata.forEach(e=>{ + if(e.allocation_days && e.allocation_days.length > 0){ + e.allocation_days.forEach(days=>{ + selected_days_by_room.push(days); + }) + } + }) + this.DaysArrValue = this.AllDaysArr.filter(item => !selected_days_by_room.includes(item)); + if(this.DaysArrValue.length == 0){ + this.SelectAllVal = [] + }else { + this.SelectAllVal = this.SelectAll; + } + } + AddAllocationDays(){ + let formArray = this.Allocation_Form.controls['AllocationDays'] as FormArray; + formArray.push(this.fb.group({ + allocation_days:this.validserv.required, + allocation_type:this.validserv.required + })); + } + RemoveAllocation(i){ + let formArray = this.Allocation_Form.controls['AllocationDays'] as FormArray; + formArray.removeAt(i); + this.ChangeinWeekDays(); + } + Save(){ + if (this.Allocation_Form.status == "INVALID") { + this.validserv.showValidationsMsg(this.Allocation_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Allocation_Form.getRawValue(); + let postObjArr = []; + val.extranet_room_id.forEach(room_Id=>{ + let PostObj = { + extranet_room_id:room_Id, + extranet_hotel_id:this.Extranet_Hotel_Id, + date_range:'', + AllocationDays:[] + }; + if(val.date_type == 'SPECIFICDATES'){ + let date_Arr = []; + val.ContractDatesArr.forEach(data=>{ + date_Arr.push({ + date_from: moment(data.date[0]).format('YYYY-MM-DD'), + date_to: moment(data.date[1]).format('YYYY-MM-DD'), + }) + }); + PostObj['date_range'] = JSON.stringify(date_Arr); + } + if(val.date_type == 'SEASON'){ + let date_Arr = []; + this.Season_List.forEach(data=>{ + data.date_range.forEach(season_date=>{ + date_Arr.push({ + date_from: moment(season_date.split(' to ')[0]).format('YYYY-MM-DD'), + date_to: moment(season_date.split(' to ')[1]).format('YYYY-MM-DD'), + }) + }) + }); + PostObj['date_range'] = JSON.stringify(date_Arr); + } + val.AllocationDays.forEach(allocation_data=>{ + PostObj.AllocationDays.push({ + allocation_days:allocation_data.allocation_days ? allocation_data.allocation_days.join(',') : '', + allocation_type:allocation_data.allocation_type, + allocation_limit:allocation_data.allocation_limit ? parseInt(allocation_data.allocation_limit) : 0, + release_days:allocation_data.release_days ? parseInt(allocation_data.release_days) : 0 + }) + }); + postObjArr.push(PostObj); + }) + + this.apiserv.Post('/ExtranetAllocation/SaveExtranetAllocation',postObjArr).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.backClick() : ''; + } + }) + } + + SelectAndRemoveAllRoom(){ + const contract_id = this.Allocation_Form.get('extranet_room_id').value + if (contract_id && contract_id.length > 0 && (contract_id.includes('Select All') || contract_id.length == this.AllRoomsData.length) && !contract_id.includes('Clear All')) { + let room_id_List = [] + this.AllRoomsData.forEach(d=>{ + room_id_List.push(d.extranet_room_id) + }); + this.Allocation_Form.get('extranet_room_id').setValue(room_id_List); + this.SelectAllRoom = []; + this.ClearAllRoom = ['Clear All']; + } else if (contract_id && contract_id.length > 0 && (contract_id.includes('Clear All'))){ + this.Allocation_Form.get('extranet_room_id').setValue([]); + this.SelectAllRoom = ['Select All']; + this.ClearAllRoom = []; + } else { + this.SelectAllRoom = ['Select All']; + if(contract_id?.length > 0){ + this.ClearAllRoom = ['Clear All']; + } + } + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/allocation/allocation-view/allocation-view.component.html b/src/app/modules/services/hotel/hotel-manage/allocation/allocation-view/allocation-view.component.html new file mode 100644 index 0000000..e90394e --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/allocation/allocation-view/allocation-view.component.html @@ -0,0 +1,153 @@ +
    +
    +
    +

    Allocation

    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + {{data.room_name + (data.room_view_name ? ', ' : '') + data.room_view_name}} +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Room ID + + + + Room Name + + + + Allocation Date Range + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + {{data.extranet_room_id}} + {{data.room_name}} + {{item}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + +
    + + +
    + + + No data found + + +
    +
    +
    + + \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/allocation/allocation-view/allocation-view.component.ts b/src/app/modules/services/hotel/hotel-manage/allocation/allocation-view/allocation-view.component.ts new file mode 100644 index 0000000..3846bb0 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/allocation/allocation-view/allocation-view.component.ts @@ -0,0 +1,104 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'allocation-view', + templateUrl: './allocation-view.component.html', +}) +export class AllocationViewComponent implements OnInit { + Extranet_Hotel_Id; + AllRoomsData; + Room_Id; + Result; + cols; + constructor( + public activateRoute:ActivatedRoute, + public apiserv:API, + public _commonService:CommonFunctionService, + public router:Router + ) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.GetAllRooms() + this.cols = [ + { field: 'extranet_room_id', header: 'Room Id' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'date_range_arr', header: 'Allocation Date Range' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_updated_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + } + GetAllRooms(){ + let ReqObj = { + extranet_hotel_id : this.Extranet_Hotel_Id, + extranet_room_id : '', + room_name : '', + room_view_name : '', + } + this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetHotelRoomName',ReqObj).subscribe(res=>{ + this.AllRoomsData = res ? res.data : []; + }) + } + // updateStatus(id, val) { + // let obj = { + // Id: id, + // status: val ? false : true, + // }; + // this.apiserv.Post('/ExtranetAllocation/UpdateExtranetAllocationStatus', obj).subscribe(res => { + // if (res) { + // this._commonService.showMessage(res['status'], res['message']); + // res['status'] ? this.Search() : ''; + // } + // }); + // } + + Search(){ + let ReqObj = { + extranet_room_id:this.Room_Id ? this.Room_Id : '', + extranet_hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetAllocation/GetAllExtranetAllocation',ReqObj).subscribe(res=>{ + if(res){ + this.Result = res.data ? res.data : []; + if(res.data){ + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['date_range_arr'] = e['date_ranges'] ? JSON.parse(e['date_ranges']) : []; + if(typeof(e['date_range_arr']) != 'string'){ + e.date_range_arr.forEach((data,ind)=>{ + e.date_range_arr[ind] = moment(data.date_from).format('DD MMM YYYY') + ' - ' + moment(data.date_to).format('DD MMM YYYY'); + }) + } + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + + Edit(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/UpdateAllocation/${this.Extranet_Hotel_Id}/${Id}`); + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/allocation/allocation.component.html b/src/app/modules/services/hotel/hotel-manage/allocation/allocation.component.html new file mode 100644 index 0000000..150afcb --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/allocation/allocation.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/allocation/allocation.component.ts b/src/app/modules/services/hotel/hotel-manage/allocation/allocation.component.ts new file mode 100644 index 0000000..1c25b46 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/allocation/allocation.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'allocation', + templateUrl: './allocation.component.html', +}) +export class AllocationComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/allocation/allocation.module.ts b/src/app/modules/services/hotel/hotel-manage/allocation/allocation.module.ts new file mode 100644 index 0000000..0bbca9b --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/allocation/allocation.module.ts @@ -0,0 +1,58 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AllocationViewComponent } from './allocation-view/allocation-view.component'; +import { AllocationAddComponent } from './allocation-add/allocation-add.component'; +import { Routes, RouterModule } from '@angular/router'; +import { AllocationComponent } from './allocation.component'; +import { MatMenuModule } from '@angular/material/menu'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TableModule } from 'primeng/table'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { InputTextModule } from 'primeng/inputtext'; +import { CalendarModule } from 'primeng/calendar'; +import { DialogModule } from 'primeng/dialog'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { ToastModule } from 'primeng/toast'; +import { MatButtonModule } from '@angular/material/button'; + + +const routes: Routes = [ + { + path: 'AddAllocation/:Hotel_Eaxtranet_Id', + component: AllocationAddComponent, + }, + // { + // path: 'UpdateAllocation/:Hotel_Eaxtranet_Id/:RuleId', + // component: AllocationViewComponent, + // }, +] + + +@NgModule({ + declarations: [ + AllocationComponent, + AllocationViewComponent, + AllocationAddComponent + ], + imports: [ + TableModule, + DialogModule, + ButtonModule, + CommonModule, + ToolbarModule, + MatMenuModule, + ToastModule, + NgSelectModule, + CalendarModule, + FormsModule, + ReactiveFormsModule, + InputTextModule, + MatButtonModule, + RouterModule.forChild(routes), + ], + exports:[ + AllocationComponent + ] +}) +export class AllocationModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-add-block-date/hotel-add-block-date.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-add-block-date/hotel-add-block-date.component.html new file mode 100644 index 0000000..a2c30af --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-add-block-date/hotel-add-block-date.component.html @@ -0,0 +1,85 @@ + +
    +
    +
    +

    Add Block Dates

    +
    +
    +
    +
    +
    + + + Please + enter rule name +
    +
    + + + +
    +
    +
    +

    Block Date Type

    +
    + +
    +
    +
    + Select + Check-in Date + Check-out Date +
    + Please + select block date type +
    +
    +
    +
    +
    + + + + Please + select from date +
    +
    + + + + Please + select to date +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-add-block-date/hotel-add-block-date.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-add-block-date/hotel-add-block-date.component.ts new file mode 100644 index 0000000..c235bcb --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-add-block-date/hotel-add-block-date.component.ts @@ -0,0 +1,109 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import * as moment from 'moment'; + +@Component({ + selector: 'app-hotel-add-block-date', + templateUrl: './hotel-add-block-date.component.html', +}) +export class HotelAddBlockDateComponent implements OnInit { + + Extranet_Hotel_Id; + Edit_Id; + minDate = new Date(); + constructor(public activateRoute:ActivatedRoute,private apiserv: API,public fb:FormBuilder, public validserv:ValidationService,public MsgService:MessageService, private router: Router,private hotelmanageserv:ManageHotelService) { } + BlockSearchDaysForm; + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.BlockSearchDaysForm= this.fb.group({ + rule_name:this.validserv.required, + block_date_type:this.validserv.required, + extranet_block_date_rule_id:'', + DateRange:this.fb.array([ + this.fb.group({ + date_from:this.validserv.required, + date_to:this.validserv.required, + extranet_block_date_id:'', + }) + ]) + }); + if(this.Edit_Id){ + this.apiserv.Get('/ExtranetBlockDate/GetExtranetBlockDateById/'+this.Edit_Id).subscribe(res=>{ + if(res && res.status){ + this.setvalue(res.data) + } + }) + } + } + addDateArr(){ + this.BlockSearchDaysForm.controls['DateRange'].push( + this.fb.group({ + date_from:this.validserv.required, + date_to:this.validserv.required, + extranet_block_date_id:'', + }) + ) + } + removeDateArr(i){ + this.BlockSearchDaysForm.controls['DateRange'].removeAt(i) + } + setvalue(data){ + this.BlockSearchDaysForm.get('rule_name').setValue(data[0].rule_name); + this.BlockSearchDaysForm.get('extranet_block_date_rule_id').setValue(data[0].extranet_block_date_rule_id); + this.BlockSearchDaysForm.get('block_date_type').setValue(data[0].block_date_type); + data.forEach((date_arr,ind)=>{ + if(ind > 0)this.addDateArr() + this.BlockSearchDaysForm.controls['DateRange']['controls'][ind].get('extranet_block_date_id').setValue(date_arr.extranet_block_date_id); + console.log(new Date(date_arr.date_from)) + this.BlockSearchDaysForm.controls['DateRange']['controls'][ind].get('date_from').setValue(new Date(date_arr.date_from)); + this.BlockSearchDaysForm.controls['DateRange']['controls'][ind].get('date_to').setValue(new Date(date_arr.date_to)); + }) + } + + Save(){ + if (this.BlockSearchDaysForm.status == "INVALID") { + this.validserv.showValidationsMsg(this.BlockSearchDaysForm); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let Req_value = this.BlockSearchDaysForm.getRawValue(); + let ReqObj = [] + Req_value.DateRange.forEach(val=>{ + let from_date = new Date(Date.UTC(val.date_from.getFullYear(), val.date_from.getMonth(), val.date_from.getDate())) + let to_date = new Date(Date.UTC(val.date_to.getFullYear(), val.date_to.getMonth(), val.date_to.getDate())) + let Obj={ + extranet_block_date_id:val.extranet_block_date_id, + extranet_block_date_rule_id:Req_value.extranet_block_date_rule_id ? Req_value.extranet_block_date_rule_id :'', + extranet_hotel_id:this.Extranet_Hotel_Id ? this.Extranet_Hotel_Id : '', + rule_name:Req_value.rule_name ? Req_value.rule_name : '', + block_date_type:Req_value.block_date_type ? Req_value.block_date_type : '', + date_from:val.date_from ? moment(from_date).toISOString() : '', + date_to:val.date_to ? moment(to_date).toISOString() : '' + } + ReqObj.push(Obj) + }) + this.apiserv.Post('/ExtranetBlockDate/SaveExtranetBlockDate',ReqObj).subscribe(data=>{ + if(data){ + this.MsgService.add({ + severity: data.status ? "success" : "error", + detail: data.message, + }); + data.status ? this.backbutton() : ''; + } + }) + } + + backbutton(){ + this.hotelmanageserv.Active_tab = 'BlockDates'; + this.router.navigateByUrl("/Services/Hotel/HotelManage/"+this.Extranet_Hotel_Id); + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.component.html new file mode 100644 index 0000000..a6264a3 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.component.html @@ -0,0 +1,163 @@ +
    +
    +
    +

    Block Dates

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Block Date Type

    +
    + +
    +
    +
    + Select + Check-in Date + Check-out Date +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Rule Name + + + + Block Date Type + + + + Dates + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.rule_name}} + {{data.block_date_type}} + {{item}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.component.ts new file mode 100644 index 0000000..772451b --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.component.ts @@ -0,0 +1,97 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'hotel-block-date', + templateUrl: './hotel-block-date.component.html', +}) +export class HotelBlockDateComponent implements OnInit { + + Extranet_Hotel_Id; + Result; + cols; + Rule_Name; + Date_Type; + constructor(public activateRoute:ActivatedRoute,private apiserv:API,public _commonService:CommonFunctionService,private router:Router) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.cols = [ + { field: 'rule_name', header: 'Rule Name' }, + { field: 'block_date_type', header: 'Block Date Type' }, + { field: 'date_range_arr', header: 'Dates' }, + { field: 'status', header: 'status' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + } + + Search(){ + let ReqObj = { + rule_name:this.Rule_Name ? this.Rule_Name : '', + block_date_type:this.Date_Type ? this.Date_Type : '', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetBlockDate/GetAllExtranetBlockDate',ReqObj).subscribe(res=>{ + if(res){ + this.Result = res.data ? res.data : []; + if(res.data){ + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['date_range_arr'] = e['date_range'] ? e['date_range'].split(', ') : e['date_range']; + if(typeof(e['date_range_arr']) != 'string'){ + e.date_range_arr.forEach((data,ind)=>{ + e.date_range_arr[ind] = moment(data.split(' - ')[0]).format('DD MMM YYYY') + ' - ' + moment(data.split(' - ')[1]).format('DD MMM YYYY'); + }) + } + e['Custom_created_on'] = this._commonService.convertDateWithTimeToShow(e.created_on); + e['block_date_type'] = e.block_date_type == 'CHECKINDATE' ? 'Check-in Date' : 'Check-out Date'; + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + updateStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetBlockDate/UpdateExtranetBlockDateStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + + Edit(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/HotelEditBlockDate/${this.Extranet_Hotel_Id}/${Id}`); + } + Reset(){ + this.Rule_Name = undefined; + this.Date_Type = undefined; + } + btnClick() { + this.router.navigateByUrl("Services/FlightInventory/Add"); + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.module.ts new file mode 100644 index 0000000..afe57a7 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-block-date/hotel-block-date.module.ts @@ -0,0 +1,60 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelBlockDateComponent } from './hotel-block-date.component'; +import { HotelAddBlockDateComponent } from './hotel-add-block-date/hotel-add-block-date.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { CalendarModule } from 'primeng/calendar'; + +const routes: Routes = [ + + { + path: 'HotelAddBlockDate/:Hotel_Eaxtranet_Id', + component:HotelAddBlockDateComponent, + }, + { + path: 'HotelEditBlockDate/:Hotel_Eaxtranet_Id/:RuleId', + component:HotelAddBlockDateComponent, + } +] + +@NgModule({ + declarations: [ + HotelBlockDateComponent, + HotelAddBlockDateComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ], + exports:[ + HotelBlockDateComponent + ] +}) +export class HotelBlockDateModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-manage.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-manage.component.html new file mode 100644 index 0000000..6c8d82f --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-manage.component.html @@ -0,0 +1,103 @@ +
    + + Back +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-manage.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-manage.component.ts new file mode 100644 index 0000000..a100c4f --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-manage.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; + +@Component({ + selector: 'app-hotel-manage', + templateUrl: './hotel-manage.component.html', +}) +export class HotelManageComponent implements OnInit { + + constructor(public hotelmanageserv:ManageHotelService,private activateRoute:ActivatedRoute,public commonserv:CommonFunctionService) { } + + ngOnInit(): void { + this.hotelmanageserv.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + window.scrollTo(0, 0); + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-manage.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-manage.module.ts new file mode 100644 index 0000000..01d677c --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-manage.module.ts @@ -0,0 +1,173 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelManageComponent } from './hotel-manage.component'; +import { TabViewModule } from 'primeng/tabview'; +import { RouterModule, Routes } from '@angular/router'; +import { FormsModule } from '@angular/forms'; +import { HotelRoomModule } from './hotel-room/hotel-room.module'; +import { HotelSeasonModule } from './hotel-season/hotel-season.module'; +import { RateSettingModule } from './rate-setting/rate-setting.module'; +import {MatMenuModule} from '@angular/material/menu'; +import { HotelMealModule } from './hotel-meal/hotel-meal.module'; +import { HotelBlockDateModule } from './hotel-block-date/hotel-block-date.module'; +import { HotelOffersModule } from './hotel-offers/hotel-offers.module'; +import { HotelSupplementsModule } from './hotel-supplements/hotel-supplements.module'; +import { AllocationModule } from './allocation/allocation.module'; +import { HotelUpdateAdultModule } from './hotel-update-adult/hotel-update-adult.module'; +import { HotelUpdateChildModule } from './hotel-update-child/hotel-update-child.module'; +import { HotelUpdateCancellationModule } from './hotel-update-cancellation/hotel-update-cancellation.module'; +import { HotelUpdateNationalityModule } from './hotel-update-nationality/hotel-update-nationality.module'; +import { HotelUpdateMealAddOnModule } from './hotel-update-meal-add-on/hotel-update-meal-add-on.module'; +import { HotelUpdateAllocationModule } from './hotel-update-allocation/hotel-update-allocation.module'; +import { OverviewModule } from './overview/overview.module'; +import { MinimumStayModule } from './minimum-stay/minimum-stay.module'; + +const routes: Routes = [ + { + path: ':Hotel_Eaxtranet_Id', + component:HotelManageComponent, + }, + { + path: 'RoomSearch', + loadChildren: () => + import('./hotel-room/hotel-room.module').then( + (m) => m.HotelRoomModule + ), + }, + { + path: 'SeasonSearch', + loadChildren: () => + import('./hotel-season/hotel-season.module').then( + (m) => m.HotelSeasonModule + ), + }, + { + path: 'RateSettingSearch', + loadChildren: () => + import('./rate-setting/rate-setting.module').then( + (m) => m.RateSettingModule ), + }, + // { + // path: 'Allocation', + // loadChildren: () => + // import('./allocation/allocation.module').then( + // (m) => m.AllocationModule + // ), + // }, + { + path: 'MealSearch', + loadChildren: () => + import('./hotel-meal/hotel-meal.module').then( + (m) => m.HotelMealModule + ), + }, + { + path: 'BlockDateSearch', + loadChildren: () => + import('./hotel-block-date/hotel-block-date.module').then( + (m) => m.HotelBlockDateModule + ), + }, + { + path: 'UpdateAdult', + loadChildren: () => + import('./hotel-update-adult/hotel-update-adult.module').then( + (m) => m.HotelUpdateAdultModule + ), + }, + { + path: 'UpdateChild', + loadChildren: () => + import('./hotel-update-child/hotel-update-child.module').then( + (m) => m.HotelUpdateChildModule + ), + }, + { + path: 'UpdateCancellation', + loadChildren: () => + import('./hotel-update-cancellation/hotel-update-cancellation.module').then( + (m) => m.HotelUpdateCancellationModule + ), + }, + { + path: 'UpdateNationality', + loadChildren: () => + import('./hotel-update-nationality/hotel-update-nationality.module').then( + (m) => m.HotelUpdateNationalityModule + ), + }, + { + path: 'UpdateMealAddOn', + loadChildren: () => + import('./hotel-update-meal-add-on/hotel-update-meal-add-on.module').then( + (m) => m.HotelUpdateMealAddOnModule + ), + }, + { + path: 'UpdateAllocation', + loadChildren: () => + import('./hotel-update-allocation/hotel-update-allocation.module').then( + (m) => m. HotelUpdateAllocationModule + ), + }, + { + path: 'Offers', + loadChildren: () => + import('./hotel-offers/hotel-offers.module').then( + (m) => m.HotelOffersModule + ), + }, + { + path: 'Supplements', + loadChildren: () => + import('./hotel-supplements/hotel-supplements.module').then( + (m) => m.HotelSupplementsModule + ), + }, + { + path: 'OverView', + loadChildren: () => + import('./overview/overview.module').then( + (m) => m.OverviewModule + ), + }, + { + path: 'MinimumStay', + loadChildren: () => + import('./minimum-stay/minimum-stay.module').then( + (m) => m.MinimumStayModule + ), + }, +] + + +@NgModule({ + declarations: [ + HotelManageComponent, + ], + imports: [ + CommonModule, + FormsModule, + MatMenuModule, + HotelRoomModule, + TabViewModule, + AllocationModule, + HotelSeasonModule, + RateSettingModule, + HotelUpdateAdultModule, + HotelUpdateChildModule, + HotelUpdateCancellationModule, + HotelUpdateNationalityModule, + HotelUpdateMealAddOnModule, + HotelUpdateAllocationModule, + HotelMealModule, + OverviewModule, + HotelBlockDateModule, + HotelOffersModule, + HotelSupplementsModule, + MinimumStayModule, + RouterModule.forChild(routes), + +] +}) +export class HotelManageModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal-add/hotel-meal-add.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal-add/hotel-meal-add.component.html new file mode 100644 index 0000000..f3425e9 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal-add/hotel-meal-add.component.html @@ -0,0 +1,236 @@ + +
    +
    +
    +

    Add Meal Add-On

    +
    +
    +
    +
    +
    +
    + + + Please + enter meal add-on name +
    +
    +
    +
    + + + +
    +
    +
    +

    Meal Plan

    +
    + +
    +
    +
    + Select + {{data.meal_plan_name}} +
    + Please + select meal plan +
    +
    +
    +
    + + + +
    +
    +
    +

    Currency

    +
    + +
    +
    +
    + + {{item.currency_code }} + +
    + Please + select currency +
    +
    +
    +
    + + + Please + enter adult rate +
    +
    +
    +
    +
    + Paid Child +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Paid Child Age From

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select paid child age from + Please + select age greater than previous age range +
    +
    +
    +
    + + + +
    +
    +
    +

    Paid Child Age To

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select paid child age to + Please + select age to greater than age from +
    +
    +
    +
    + + + Please + enter paid child rate +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal-add/hotel-meal-add.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal-add/hotel-meal-add.component.ts new file mode 100644 index 0000000..b4d32d5 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal-add/hotel-meal-add.component.ts @@ -0,0 +1,188 @@ +import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; + + +@Component({ + selector: 'app-hotel-meal-add', + templateUrl: './hotel-meal-add.component.html', +}) +export class HotelMealAddComponent implements OnInit { + + Extranet_Hotel_Id; + constructor(public activateRoute:ActivatedRoute,private router:Router,private hotelmanageserv:ManageHotelService, + public apiserv:API,public fb:FormBuilder,public validserv:ValidationService,public commonMasterSer:CommonFunctionService) { } + ddLoader; + timer; + MealPlan; + CurrencyList; + Edit_Id; + occupancy_Limit_Child = [0,1,2,3,4,5,6,7,8,9,10,11]; + MealAddForm:FormGroup; + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.initForm(); + this.GetAllMeal(); + this.GetMealAddOnById(); + } + initForm(){ + this.MealAddForm = this.fb.group({ + extranet_meal_addon_id:'', + extranet_meal_plan_id:this.validserv.required, + addon_name:this.validserv.required, + currency:this.validserv.required, + adult_rate:this.validserv.required, + is_paid_child:false, + }) + } + SetMealAddOn(data){ + this.MealAddForm.get('extranet_meal_addon_id').setValue(data.extranet_meal_addon_id); + this.MealAddForm.get('extranet_meal_plan_id').setValue(data.extranet_meal_plan_id); + this.MealAddForm.get('addon_name').setValue(data.addon_name); + this.MealAddForm.get('currency').setValue(data.currency); + this.MealAddForm.get('adult_rate').setValue(data.adult_rate); + this.MealAddForm.get('is_paid_child').setValue(data.is_paid_child); + if(data.child_range_1_from || data.child_range_1_to || data.child_range_1_rate){ + this.PaidChildArr(true); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][0].get('from_age').setValue(data.child_range_1_from ? data.child_range_1_from : 0); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][0].get('to_age').setValue(data.child_range_1_to ? data.child_range_1_to : 0); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][0].get('child_rate').setValue(data.child_range_1_rate ? data.child_range_1_rate : 0); + if(data.child_range_2_from || data.child_range_2_to || data.child_range_2_rate){ + this.AddChildArr(); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][1].get('from_age').setValue(data.child_range_2_from ? data.child_range_2_from : 0); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][1].get('to_age').setValue(data.child_range_2_to ? data.child_range_2_to : 0); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][1].get('child_rate').setValue(data.child_range_2_rate ? data.child_range_2_rate : 0); + } + } + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'HotelMeal'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + GetAllMeal(){ + this.apiserv.Get('/ExtranetMealAddon/GetAllExtranetMeal/EN').subscribe(res=>{ + if(res){ + this.MealPlan = res.data; + } + }) + } + + GetCurrency(event){ + if (event.value.length >= 2) { + let obj ={ + langcode:'en', + query:event.value + } + this.ddLoader = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGoPost(`/MasterSearch/GetAllCurrency`,obj).subscribe(res => { + if (res) { + this.CurrencyList = res.Result; + this.ddLoader = false; + } + }); + }, 500); + } +} +PaidChildArr(event){ + if(event){ + this.MealAddForm.addControl('ExtranetChildAgeRange',new FormArray([this.fb.group({ + from_age:this.validserv.required, + to_age:this.validserv.required, + child_rate:this.validserv.required, + })])); + }else { + this.MealAddForm.removeControl('ExtranetChildAgeRange'); + } +} +AddChildArr(){ + let formArray = this.MealAddForm.controls['ExtranetChildAgeRange'] as FormArray; + formArray.push( + this.fb.group({ + from_age:['', Validators.compose([Validators.required,this.AmountRangeValidation(formArray.controls[0].get('to_age') ? formArray.controls[0].get('to_age').value : '')])], + to_age:this.validserv.required, + child_rate:this.validserv.required, + }) + ) +} +RemoveChildArr(i){ + let formArray = this.MealAddForm.controls['ExtranetChildAgeRange'] as FormArray; + formArray.removeAt(i); +} +ChangeFeeMinValue(controlname,min,i?) { + let min_amt = min; + if (i == 0 || i) { + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).clearValidators(); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).addValidators([Validators.required, this.AmountRangeValidation(min_amt)]); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).markAsUntouched(); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).setErrors(null); + this.MealAddForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).updateValueAndValidity(); + }else { + this.MealAddForm.controls[controlname].clearValidators(); + this.MealAddForm.controls[controlname].addValidators([Validators.required, this.AmountRangeValidation(min_amt)]); + this.MealAddForm.controls[controlname].markAsUntouched(); + this.MealAddForm.controls[controlname].setErrors(null); + this.MealAddForm.controls[controlname].updateValueAndValidity(); + } +}; +private AmountRangeValidation(initialValue): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value || control.value == 0) { + if (initialValue && parseInt(control.value) <= parseInt(initialValue)) { + return { 'range': true }; + } + } + return null; + }; +} +Save(){ + if (this.MealAddForm.status == "VALID") { + let val = this.MealAddForm.getRawValue(); + let reqObj={ + extranet_meal_addon_id: val.extranet_meal_addon_id ? val.extranet_meal_addon_id :'', + extranet_hotel_id: this.Extranet_Hotel_Id, + addon_name: val.addon_name, + currency: val.currency, + extranet_meal_plan_id: val.extranet_meal_plan_id, + adult_rate: parseFloat(val.adult_rate), + is_paid_child: val.is_paid_child, + } + if(val.ExtranetChildAgeRange && val.ExtranetChildAgeRange.length > 0){ + val.ExtranetChildAgeRange.forEach((child_obj,ind)=>{ + reqObj['child_range_'+(ind + 1)+'_from'] = child_obj.from_age; + reqObj['child_range_'+(ind + 1)+'_to'] = child_obj.to_age; + reqObj['child_range_'+(ind + 1)+'_rate'] = child_obj.child_rate ? parseFloat(child_obj.child_rate) : 0; + }) + } + this.apiserv.Post('/ExtranetMealAddon/SaveExtranetMealAddon',reqObj).subscribe(resp=>{ + if(resp){ + this.BackButton(); + } + this.commonMasterSer.showMessage(resp.status,resp.message) + }) + }else { + this.validserv.showValidationsMsg(this.MealAddForm); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + } +} + GetMealAddOnById() { + if (this.Edit_Id) { + this.apiserv.Get("/ExtranetMealAddon/GetExtranetMealAddonById/" + this.Edit_Id).subscribe(res=>{ + if(res){ + this.SetMealAddOn(res.data) + } + }) + } + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.component.html new file mode 100644 index 0000000..d247f0e --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.component.html @@ -0,0 +1,197 @@ +
    +
    +
    +

    Meal Add-On

    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Meal Add-On Name

    +
    + +
    +
    +
    + Select + {{data.addon_name}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Meal Plan

    +
    + +
    +
    +
    + Select + {{data.meal_plan_name}} +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Meal Add-On Name + + + + Meal Plan + + + + Currency + + + + Adult Rate + + + + Paid Child + + + + Meal Add-On Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.addon_name}} + {{data.meal_plan_name}} + {{data.currency}} + {{data.adult_rate}} + {{data.is_paid_child}} + {{data.extranet_meal_addon_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.component.ts new file mode 100644 index 0000000..58f9b27 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.component.ts @@ -0,0 +1,113 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { forkJoin } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'hotel-meal', + templateUrl: './hotel-meal.component.html', +}) +export class HotelMealComponent implements OnInit { + + Extranet_Hotel_Id; + Result; + AllMealPlan; + AllMealAddon; + MealPlan; + MealAddon; + cols; + constructor(public activateRoute:ActivatedRoute,private router:Router, public apiserv:API,public _commonService:CommonFunctionService) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.cols = [ + { field: 'addon_name', header: 'Meal Add-On Name' }, + { field: 'meal_plan_name', header: 'Meal Plan' }, + { field: 'currency', header: 'Currency' }, + { field: 'adult_rate', header: 'Adult Rate' }, + { field: 'currency', header: 'Currency' }, + { field: 'is_paid_child', header: 'Paid Child' }, + { field: 'status', header: 'Status' }, + { field: 'extranet_meal_addon_id', header: 'Meal Add-On Id' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + this.getAllData(); + } + + Search(){ + let ReObj = { + addon_name:this.MealAddon ? this.MealAddon : '', + extranet_meal_plan_id:this.MealPlan ? this.MealPlan : '', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetMealAddon/GetAllExtranetMealAddon',ReObj).subscribe(res=>{ + if (res) { + this.Result = res.data ? res.data : []; + if (res.data) { + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + getAllData() { + forkJoin( + this.GetAllMealPlan(), + this.GetAllMealAddon(), + ).subscribe(result => { + if (result && result.length > 0) { + this.AllMealPlan = result[0].data; + this.AllMealAddon = result[1].data; + } + }) + } + GetAllMealPlan(){ + return this.apiserv.Get('/ExtranetMealAddon/GetAllExtranetMeal/EN') + } + GetAllMealAddon(){ + return this.apiserv.Get('/ExtranetMealAddon/GetAllExtranetMealAddonByOrg/'+ this.Extranet_Hotel_Id) + } + updateStatus(id, val) { + let obj = { + Id: id, + Status: val ? false : true, + }; + this.apiserv.Post('/ExtranetMealAddon/UpdateExtranetMealAddOnStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + Edit(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/HotelMealEdit/${this.Extranet_Hotel_Id}/${Id}`); + } + Reset(){ + this.MealAddon = undefined; + this.MealPlan = undefined; + } + btnClick() { + this.router.navigateByUrl("Services/FlightInventory/Add"); + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.module.ts new file mode 100644 index 0000000..81e918b --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-meal/hotel-meal.module.ts @@ -0,0 +1,61 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelMealComponent } from './hotel-meal.component'; +import { HotelMealAddComponent } from './hotel-meal-add/hotel-meal-add.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; + + +const routes: Routes = [ + + { + path: 'HotelMealAdd/:Hotel_Eaxtranet_Id', + component:HotelMealAddComponent, + }, { + path: 'HotelMealEdit/:Hotel_Eaxtranet_Id/:RuleId', + component:HotelMealAddComponent, + }, +] + + +@NgModule({ + declarations: [ + HotelMealComponent, + HotelMealAddComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ], + exports:[ + HotelMealComponent + ] +}) +export class HotelMealModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.component.html new file mode 100644 index 0000000..a93d1e5 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.component.html @@ -0,0 +1 @@ + diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.component.ts new file mode 100644 index 0000000..277d770 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'hotel-offers', + templateUrl: './hotel-offers.component.html', +}) +export class HotelOffersComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.module.ts new file mode 100644 index 0000000..ac14397 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-offers/hotel-offers.module.ts @@ -0,0 +1,58 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { OffersAddComponent } from './offers-add/offers-add.component'; +import { OffersViewComponent } from './offers-view/offers-view.component'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { ButtonModule } from 'primeng/button'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { MatMenuModule } from '@angular/material/menu'; +import { CalendarModule } from 'primeng/calendar'; +import { InputTextModule } from 'primeng/inputtext'; +import { HotelOffersComponent } from './hotel-offers.component'; +import { FormsModule,ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; + +const routes: Routes = [ + { + path: 'View', + component: OffersViewComponent, + }, + { + path: 'AddOffer/:Hotel_Eaxtranet_Id', + component: OffersAddComponent, + }, + { + path: 'EditOffer/:Hotel_Eaxtranet_Id/:RuleId', + component: OffersAddComponent, + }, +] + +@NgModule({ + declarations: [ + HotelOffersComponent, + OffersAddComponent, + OffersViewComponent + ], + imports: [ + CommonModule, + NgSelectModule, + MatCheckboxModule, + ButtonModule, + TableModule, + FormsModule, + ReactiveFormsModule, + ToolbarModule, + MatMenuModule, + MatButtonModule, + InputTextModule, + CalendarModule, + RouterModule.forChild(routes), + ], + exports:[ + HotelOffersComponent + ] +}) +export class HotelOffersModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-add/offers-add.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-add/offers-add.component.html new file mode 100644 index 0000000..74cad33 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-add/offers-add.component.html @@ -0,0 +1,961 @@ + +
    +
    +
    +

    Add Offers

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Contracts

    +
    + +
    +
    + +
    + {{item}} + {{item}} + {{data.room_name}} +
    + Please + select rooms +
    +
    +
    +
    + + +
    +
    +
    +
    + + + Please + enter offer name +
    +
    +
    +
    + + + +
    +
    +
    +

    Meal Plan

    +
    + +
    +
    +
    + Early Bird + Stay Pay + Long Stay + Discount + Contract Remark +
    + Please + select offer type +
    +
    +
    + Combinable Offer +
    +
    +
    + + + +
    +
    +
    +

    Meal Plan

    +
    + +
    +
    +
    + {{item.offer_name}} +
    +
    +
    +
    +
    + + + Please + enter discount code +
    +
    +
    + Minimum + Stay +
    +
    +
    + + + Please + enter minimum stay value +
    +
    +
    + Maximum + Stay +
    +
    +
    + + + Please + enter maximum stay value +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality type

    +
    + +
    +
    +
    + Select + Include + Exclude +
    + Please + enter select nationality type +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality Applicability

    +
    + +
    +
    +
    + Select + {{data.Label}} +
    + Please + select nationality applicability +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select nationality +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence Type

    +
    + +
    +
    +
    + Select + Include + Exclude +
    + Please + select residence type +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence Applicability

    +
    + +
    +
    +
    + Select + {{data.Label}} +
    + Please + select residence applicalbility +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select residence +
    +
    +
    +
    +
    +
    +
    + + + + Please select date greater than from previous range + + + Please select range to date + + + Please select date range + + + Please enter unique values for each row + +
    +
    +
    +
    + + + + Please select date greater than from previous range + + + Please select range greater than previous range + + + Please select date range + +
    +
    +
    +
    + + + Please + enter check in before days +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
    +

    Offer Days

    +
    + +
    +
    + +
    + {{item}} + {{item.Key}} +
    + Please + select offer days +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy

    +
    + +
    +
    +
    + Select + Original + Non Refundable + Custom Policy +
    + Please + select cancellation policy +
    +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy

    +
    + +
    +
    +
    + Select + Day +
    + Please + select cancellation policy type +
    +
    +
    + +
    +
    +
    +
    + + + Please + enter from + Please + enter range greater than previous range +
    +
    + + + Please + enter to + Please + enter to value greater than from value +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Type

    +
    + +
    +
    +
    + Select + Full Charges + Night Count + Amount + Percentage +
    + Please + select cancellation type +
    +
    + + + +
    +
    +
    +

    Night Type

    +
    + +
    +
    +
    + Select + First + Last + Cheapest + Highest +
    + Please + select night type +
    +
    + + + Please + enter value +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Applicable Adult Occupancy

    +
    + +
    +
    + +
    + {{item}} + {{item}} Adult +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Applicable Child Occupancy

    +
    + +
    +
    + +
    + {{item}} + {{item}} Child +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Offer Applicable On

    +
    + +
    +
    +
    + Select + Room Rate Only + Total Room Rate including + Supplement +
    + Please + select offer applicable on +
    +
    +
    +
    + + + +
    +
    +
    +

    Stay Pay Applicable On

    +
    + +
    +
    +
    + Select + First Night + Last Night + Cheapest Night + Costliest Night +
    + Please + select stay pay applicable on +
    +
    +
    +
    + + + Please + enter stay night +
    +
    +
    +
    + + + Please + enter pay night +
    +
    +
    + Multiple Stay Pay Allowed + +
    +
    +
    + + +
    +
    +
    +
    + + + Please + enter long stay +
    +
    +
    +
    + + + +
    +
    +
    +

    Discount Type

    +
    + +
    +
    +
    + Select + Amount + Percentage +
    + Please + select discount type +
    +
    +
    +
    + + + Please + enter discount value +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + Please + enter contract remark +
    +
    +
    +
    +
    +
    + +
    + +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-add/offers-add.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-add/offers-add.component.ts new file mode 100644 index 0000000..f44d4a8 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-add/offers-add.component.ts @@ -0,0 +1,733 @@ +import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-offers-add', + templateUrl: './offers-add.component.html', +}) +export class OffersAddComponent implements OnInit { + + Extranet_Hotel_Id; + AllContrtact; + combineOfferList; + timer; + Check_Same_Value_Arr = []; + MinDate = new Date(); + ddLoader = { + Country:false, + Residence:false, + }; + CountryList; + Adult_Occupancy_List; + Child_Occupancy_List; + selectAll = ['Select All']; + Nationality_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + Residence_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + selectAllAdult = []; + selectAllChild = []; + SelectAllRoom = []; + ClearAllRoom = []; + AllDaysArr = [ + {Key:'Mon',Value:'Monday'}, + {Key:'Tue',Value:'Tuesday'}, + {Key:'Wed',Value:'Wednesday'}, + {Key:'Thu',Value:'Thursday'}, + {Key:'Fri',Value:'Friday'}, + {Key:'Sat',Value:'Saturday'}, + {Key:'Sun',Value:'Sunday'} + ]; + Offers_Form:FormGroup; + Edit_Id; + constructor( + private router: Router, + public activateRoute:ActivatedRoute, + private hotelmanageserv:ManageHotelService, + public apiserv:API,public fb:FormBuilder,public validserv:ValidationService,public commonMasterSer:CommonFunctionService) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Initform(); + this.GetAllData(); + } + GetAllContract(){ + let obj = { + extranet_hotel_id:this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetOffer/GetAllExtranetOfferAndSupplementContracts',obj) + } + GetHotelDetail(){ + return this.apiserv.Get('/ExtranetHotel/GetExtranetHotelById/' + this.Extranet_Hotel_Id) + } + GetAllData(){ + forkJoin( + this.GetAllContract(), + this.GetHotelDetail(), + this.GetOfferById(this.Edit_Id) + ).subscribe(res=>{ + if(res && res.length > 0){ + this.AllContrtact = res[0].data; + if(res[0].data){ + this.SelectAllRoom = ['Select All']; + } + if(res[1]?.data)this.Offers_Form.get('currency').setValue(res[1].data.currency); + this.SetOfferFormValue(res[2] ? res[2].data :'') + } + }) + } + GetOfferById(Editid) { + if (Editid) + return this.apiserv.Get('/ExtranetOffer/GetExtranetOfferById/' + Editid) + else + return of(null) + }; + Initform(){ + this.Offers_Form = this.fb.group({ + extranet_offer_id:'', + extranet_room_id:this.validserv.required, + offer_name:this.validserv.required, + currency:this.validserv.required, + offer_type:this.validserv.required, + is_combinable_offer:false, + combinable_offer_id:'', + offer_days:this.validserv.required, + is_min_stay:false, + is_max_stay:false, + is_stay_pay_multiple:false, + max_reoccurence:'', + residence_type:'', + residence_applicable_type:'', + offer_nationality_type:'', + nationality_applicable_type:'', + cancellation_policy_type:this.validserv.required, + type:this.validserv.required, + applicable_on:this.validserv.required, + applicable_adult_occupancy:'', + applicable_child_occupancy:'', + offer_description:'', + date_criteria:this.fb.array([]), + custom_cancellation_policy:this.fb.array([this.fb.group({ + from: [0,Validators.compose([Validators.required])], + to: ['',Validators.compose([Validators.required,this.AmountRangeValidation(0)])], + charge_type: this.validserv.required, + charge_value: this.validserv.required, + })]) + }); + this.addDate() + } + addDate() { + let formArray = this.Offers_Form.controls['date_criteria'] as FormArray; + formArray.push(this.fb.group({ + booking_date_range: ['', Validators.compose([ + Validators.required, + this.dateValidation() + ])], + checkin_date_range: ['', Validators.compose([ + Validators.required, + this.dateValidation() + ])], + })); + if(this.Offers_Form.controls['offer_type'].value != 'CONTRACTREMARK'){ + let group = formArray.controls[formArray.controls.length - 1] as FormGroup; + group.addControl('checkin_before_days',new FormControl('',Validators.required)); + } + this.Check_Same_Value_Arr[formArray.controls.length - 1] = false; + } + public dateValidation(): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + } + return null; + }; + } + removeDate(index) { + let formArray = this.Offers_Form.controls['date_criteria'] as FormArray; + this.Check_Same_Value_Arr[index] = false; + formArray.removeAt(index); + this.check_Unique_Values(); + } + Check_Offer_Type(event){ + if(event == 'STAYPAY'){ + this.Offers_Form.addControl('stay_pay_applicable_on',new FormControl('',Validators.required)); + this.Offers_Form.addControl('stay_night',new FormControl('',Validators.required)); + this.Offers_Form.addControl('pay_night',new FormControl('',Validators.required)); + if(!this.Offers_Form['discount_code']){ + this.Offers_Form.addControl('discount_code',new FormControl('',Validators.required)); + } + this.Offers_Form.removeControl('contract_remark'); + this.Offers_Form.removeControl('long_stay_night') + this.CheckAddremovecontrol('offer_days',this.Offers_Form,true); + this.CheckAddremovecontrol('cancellation_policy_type',this.Offers_Form,true); + this.CheckAddremovecontrol('type',this.Offers_Form,true); + this.CheckAddremovecontrol('applicable_on',this.Offers_Form,true); + this.Offers_Form.removeControl('discount_type'); + this.Offers_Form.removeControl('discount_value'); + let formArray = this.Offers_Form.controls['date_criteria'] as FormArray; + formArray.controls.forEach((control:FormGroup)=>{ + this.CheckAddremovecontrol('checkin_before_days',control,true) + }); + this.Check_Cancel_Type(); + } + if(event != 'STAYPAY' && event!= 'CONTRACTREMARK'){ + if(!this.Offers_Form['discount_type']){ + this.Offers_Form.addControl('discount_type',new FormControl('',Validators.required)); + this.Offers_Form.addControl('discount_value',new FormControl('',Validators.required)); + } + if(!this.Offers_Form['discount_code']){ + this.Offers_Form.addControl('discount_code',new FormControl('',Validators.required)); + } + let formArray = this.Offers_Form.controls['date_criteria'] as FormArray; + formArray.controls.forEach((control:FormGroup)=>{ + this.CheckAddremovecontrol('checkin_before_days',control,true) + }); + this.CheckAddremovecontrol('offer_days',this.Offers_Form,true); + this.CheckAddremovecontrol('cancellation_policy_type',this.Offers_Form,true); + this.CheckAddremovecontrol('type',this.Offers_Form,true); + this.CheckAddremovecontrol('applicable_on',this.Offers_Form,true); + this.Check_Cancel_Type(); + } + if(event == 'CONTRACTREMARK'){ + this.Offers_Form.addControl('contract_remark',new FormControl('',Validators.required)); + this.Offers_Form.removeControl('stay_pay_applicable_on'); + this.Offers_Form.removeControl('stay_night'); + this.Offers_Form.removeControl('pay_night'); + this.Offers_Form.removeControl('discount_code'); + this.Offers_Form.removeControl('long_stay_night'); + this.Offers_Form.removeControl('discount_type'); + this.Offers_Form.removeControl('discount_value'); + let formArray = this.Offers_Form.controls['date_criteria'] as FormArray; + formArray.controls.forEach((control:FormGroup)=>{ + this.CheckAddremovecontrol('checkin_before_days',control,false) + }); + this.CheckAddremovecontrol('offer_days',this.Offers_Form,false); + this.CheckAddremovecontrol('cancellation_policy_type',this.Offers_Form,false); + this.CheckAddremovecontrol('type',this.Offers_Form,false); + this.CheckAddremovecontrol('custom_cancellation_policy',this.Offers_Form,false); + this.CheckAddremovecontrol('applicable_on',this.Offers_Form,false); + } + if(event == 'LONGSTAY'){ + this.Offers_Form.addControl('long_stay_night',new FormControl('',Validators.required)); + if(!this.Offers_Form['discount_code']){ + this.Offers_Form.addControl('discount_code',new FormControl('',Validators.required)); + } + this.Offers_Form.removeControl('stay_pay_applicable_on'); + this.Offers_Form.removeControl('stay_night'); + this.Offers_Form.removeControl('pay_night'); + this.Offers_Form.removeControl('contract_remark'); + let formArray = this.Offers_Form.controls['date_criteria'] as FormArray; + formArray.controls.forEach((control:FormGroup)=>{ + this.CheckAddremovecontrol('checkin_before_days',control,true) + }); + this.CheckAddremovecontrol('offer_days',this.Offers_Form,true); + this.CheckAddremovecontrol('cancellation_policy_type',this.Offers_Form,true); + this.CheckAddremovecontrol('type',this.Offers_Form,true); + this.CheckAddremovecontrol('applicable_on',this.Offers_Form,true); + this.Check_Cancel_Type(); + }else if(event == 'EARLYBIRD'){ + if(!this.Offers_Form['discount_code']){ + this.Offers_Form.addControl('discount_code',new FormControl('',Validators.required)); + } + this.Offers_Form.removeControl('contract_remark'); + this.Offers_Form.removeControl('stay_pay_applicable_on'); + this.Offers_Form.removeControl('stay_night'); + this.Offers_Form.removeControl('pay_night'); + this.Offers_Form.removeControl('long_stay_night'); + let formArray = this.Offers_Form.controls['date_criteria'] as FormArray; + formArray.controls.forEach((control:FormGroup)=>{ + this.CheckAddremovecontrol('checkin_before_days',control,true) + }); + this.CheckAddremovecontrol('offer_days',this.Offers_Form,true); + this.CheckAddremovecontrol('cancellation_policy_type',this.Offers_Form,true); + this.CheckAddremovecontrol('type',this.Offers_Form,true); + this.CheckAddremovecontrol('applicable_on',this.Offers_Form,true); + this.Check_Cancel_Type(); + } + } + CheckAddremovecontrol(controlname,formgroup,check){ + if(check){ + if(!formgroup.get(controlname)){ + formgroup.addControl(controlname,new FormControl('',Validators.required)); + } + }else { + formgroup.removeControl(controlname); + } + } + ChangeFeeMinValue(controlname,min,i?) { + let min_amt = min; + if(this.Offers_Form.controls['custom_cancellation_policy']['controls'][i] && controlname != 'from'){ + this.Offers_Form.controls['custom_cancellation_policy']['controls'][i].get(controlname).clearValidators(); + this.Offers_Form.controls['custom_cancellation_policy']['controls'][i].get(controlname).addValidators([Validators.required, this.AmountRangeValidation(min_amt)]); + this.Offers_Form.controls['custom_cancellation_policy']['controls'][i].get(controlname).markAsUntouched(); + this.Offers_Form.controls['custom_cancellation_policy']['controls'][i].get(controlname).setErrors(null); + this.Offers_Form.controls['custom_cancellation_policy']['controls'][i].get(controlname).updateValueAndValidity(); + } + if(controlname == 'from' && this.Offers_Form.controls['custom_cancellation_policy']['controls'][i]){ + this.Offers_Form.controls['custom_cancellation_policy']['controls'][i].get(controlname).setValue(min_amt ? (parseInt(min_amt) + 1) : 0) + this.ChangeFeeMinValue('to',min_amt ? (parseInt(min_amt) + 1) : 0 ,i); + } + } + private AmountRangeValidation(initialValue): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value || control.value == 0) { + if (initialValue && parseInt(control.value) <= parseInt(initialValue)) { + return { 'range': true }; + } + } + return null; + }; + } + AddCancelArr(ind){ + let formArray = this.Offers_Form.controls['custom_cancellation_policy'] as FormArray; + let cancel_arr = this.Offers_Form.controls['custom_cancellation_policy']['controls'][ind]; + let min_amnt = cancel_arr.get('to').value; + formArray.push( + this.fb.group({ + from: [min_amnt ? (parseInt(min_amnt) + 1) : '',Validators.compose([Validators.required])], + to: this.validserv.required, + charge_type: this.validserv.required, + charge_value: this.validserv.required, + }) + ) + if(min_amnt){ + formArray.controls[formArray['controls'].length -1].get('from').setValue(min_amnt ? parseInt(min_amnt) : '') + this.ChangeFeeMinValue('to',min_amnt ? parseInt(min_amnt) : min_amnt ,ind+1); + } + } + removeCancelArr(room_ind){ + let formArray = this.Offers_Form.controls['custom_cancellation_policy'] as FormArray; + formArray.removeAt(room_ind); + if(formArray.controls[room_ind]){ + let amount = room_ind == 0 ? '' : formArray.controls[room_ind-1].get('to').value; + this.ChangeFeeMinValue('from',amount,room_ind); + } + } + Checkcanceltype(event,room_ind){ + let formcontrol = this.Offers_Form.controls['custom_cancellation_policy']['controls'][room_ind] as FormGroup; + if(event == 'NIGHTCOUNT'){ + formcontrol.addControl('night_type',new FormControl('',Validators.required)); + if(!formcontrol.controls['charge_value']){ + formcontrol.addControl('charge_value',new FormControl('',Validators.required)); + } + } else if(event == 'FULLCHARGES'){ + formcontrol.removeControl('night_type'); + formcontrol.removeControl('charge_value'); + } else { + if(!formcontrol.controls['charge_value']){ + formcontrol.addControl('charge_value',new FormControl('',Validators.required)); + } + formcontrol.removeControl('night_type'); + } + } + MinStay(event){ + if(event){ + this.Offers_Form.addControl('min_stay_value',new FormControl('',Validators.required)); + }else { + this.Offers_Form.removeControl('min_stay_value') + } + } + MaxStay(event){ + if(event){ + this.Offers_Form.addControl('max_stay_value',new FormControl('',Validators.required)); + }else { + this.Offers_Form.removeControl('max_stay_value') + } + } + CheckcontractType(){ + let val = this.Offers_Form.get('extranet_room_id').value; + this.Adult_Occupancy_List = []; + this.Child_Occupancy_List = []; + let child_occ = 0; + let adult_occ = 0; + if (val && val.length > 0 && (val.includes('Select All') || val.length == this.AllContrtact.length) && !val.includes('Clear All')) { + let room_id_List = [] + this.AllContrtact.forEach(d=>{ + room_id_List.push(d.extranet_room_id) + }); + this.Offers_Form.get('extranet_room_id').setValue(room_id_List); + this.SelectAllRoom = []; + this.ClearAllRoom = ['Clear All']; + } else if (val && val.length > 0 && (val.includes('Clear All'))){ + this.Offers_Form.get('extranet_room_id').setValue([]); + this.SelectAllRoom = ['Select All']; + this.ClearAllRoom = []; + } else { + this.SelectAllRoom = ['Select All']; + if(val?.length > 0){ + this.ClearAllRoom = ['Clear All']; + } + } + if(val && val.length > 0){ + let arr = []; + val.forEach(item=>{ + let contract_det = this.AllContrtact.find(e=>item == e.extranet_room_id); + arr.push(contract_det.extranet_room_id); + if(contract_det.max_child_occupancy > child_occ){ + child_occ = contract_det.max_child_occupancy; + this.Child_Occupancy_List = []; + let selected_val = this.Offers_Form.get('applicable_child_occupancy').value + if(selected_val){ + for(let i=selected_val.length;i>0;i--){ + if(selected_val[i] > child_occ){ + selected_val.splice(i,1) + } + } + this.Offers_Form.get('applicable_child_occupancy').setValue(selected_val); + } + for(let i=0;i adult_occ){ + adult_occ = contract_det.max_adult_occupancy; + this.Adult_Occupancy_List = []; + let selected_val = this.Offers_Form.get('applicable_adult_occupancy').value + if(selected_val){ + for(let i=selected_val.length;i>0;i--){ + if(selected_val[i] > adult_occ){ + selected_val.splice(i,1) + } + } + this.Offers_Form.get('applicable_adult_occupancy').setValue(selected_val); + } + for(let i=0;i{ + if(res?.data){ + let filter_array = res.data.filter(elm=>elm.extranet_offer_id != this.Edit_Id); + this.combineOfferList = filter_array.length > 0 ? filter_array : undefined; + }else { + this.combineOfferList = undefined; + this.Offers_Form.get('combinable_offer_id').setValue('') + } + }) + }else { + this.Offers_Form.get('applicable_child_occupancy').setValue(null); + this.Offers_Form.get('applicable_adult_occupancy').setValue(null); + + } + this.CheckAdultSelection(); + this.CheckChildSelection(); + } + NationalityShowhide(event){ + if(event == 'SPECIFIC'){ + this.Offers_Form.addControl('nationality',new FormControl('',Validators.required)) + }else{ + this.Offers_Form.removeControl('nationality'); + } + } + NationalityTypeCheck(event){ + if(event == 'INCLUDE'){ + this.Nationality_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + }else{ + this.Nationality_type = [{Label:'Specific',Value:'SPECIFIC'}]; + if(this.Offers_Form.controls['nationality_applicable_type'].value == 'ALL'){ + this.Offers_Form.get('nationality_applicable_type').setValue(''); + } + } + } + getCountryList(event,name) { + if (event.value.length >= 2) { + this.ddLoader[name] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGet(`/MasterSearch/GetAllCountry/en/${event.value}`).subscribe(res => { + if (res) { + this.CountryList = res; + this.ddLoader[name] = false; + } + }); + }, 500); + } + } + Check_day_type(){ + let daysArr = [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday' + ]; + let value = this.Offers_Form.get('offer_days').value; + if(value && value.length > 0 && (value.includes('Select All') || value.length == 7)){ + this.Offers_Form.get('offer_days').setValue(daysArr); + this.selectAll = [] + }else { + this.selectAll = ['Select All'] + } + } + CheckAdultSelection() { + if (this.Offers_Form.controls['applicable_adult_occupancy']) { + let value = this.Offers_Form.get('applicable_adult_occupancy').value; + if (value && value.length > 0 && (value.includes('Select All') || value.length == this.Adult_Occupancy_List.length)) { + this.Offers_Form.get('applicable_adult_occupancy').setValue(this.Adult_Occupancy_List); + this.selectAllAdult = [] + } else { + this.selectAllAdult = this.Adult_Occupancy_List && this.Adult_Occupancy_List.length > 0 ? ['Select All'] : []; + } + }else { + this.selectAllAdult = [] + } + } + CheckChildSelection() { + if (this.Offers_Form.controls['applicable_child_occupancy']) { + let value = this.Offers_Form.get('applicable_child_occupancy').value; + if (value && value.length > 0 && (value.includes('Select All') || value.length == this.Child_Occupancy_List.length)) { + this.Offers_Form.get('applicable_child_occupancy').setValue(this.Child_Occupancy_List); + this.selectAllChild = [] + } else { + this.selectAllChild = this.Child_Occupancy_List && this.Child_Occupancy_List.length > 0 ? ['Select All'] : []; + } + }else { + this.selectAllChild = [] + } + } + check_Unique_Values(){ + let val = this.Offers_Form.getRawValue(); + if(val.date_criteria.length > 0){ + val.date_criteria.forEach((obj, index) => { + if((obj.checkin_before_days || val.offer_type != 'CONTRACTREMARK') && obj.booking_date_range && obj.checkin_date_range){ + //finding the duplicate first remove the current array to check the current from the others + const isDuplicate = val.date_criteria.filter((e,i)=>i != index).some(item => JSON.stringify(item) === JSON.stringify(obj)); + + if (isDuplicate) { + this.Check_Same_Value_Arr[index] = true; + }else { + this.Check_Same_Value_Arr[index] = false; + } + } + else { + this.Check_Same_Value_Arr[index] = false; + + } + }); + // if(!duplicates){ + // this.commonMasterSer.showMessage(false,'two or more booking date range rows has same values'); + // } + // return duplicates; + } + } + Save(){ + let val = this.Offers_Form.getRawValue(); + if (this.Offers_Form.status == "VALID" && this.Check_Same_Value_Arr.every(value => !value)) { + let PostObj={ + extranet_offer_id:val.extranet_offer_id, + extranet_room_id:val.extranet_room_id ? val.extranet_room_id.join(',') : '', + offer_name:val.offer_name, + is_combinable_offer:val.is_combinable_offer && val.offer_type != 'CONTRACTREMARK', + combinable_offer_id:val.combinable_offer_id && val.offer_type != 'CONTRACTREMARK' ? val.combinable_offer_id.join(',') : '', + offer_type:val.offer_type ? val.offer_type : '', + discount_code:val.discount_code ? val.discount_code : '', + offer_nationality_type:val.offer_nationality_type ? val.offer_nationality_type : '', + nationality_applicable_type:val.nationality_applicable_type ? val.nationality_applicable_type : '', + nationality:val.nationality ? val.nationality.join(',') : '', + is_min_stay:val.is_min_stay && val.offer_type != 'CONTRACTREMARK', + min_stay_value:val.min_stay_value && val.offer_type != 'CONTRACTREMARK' ? parseInt(val.min_stay_value) : 0, + is_max_stay:val.is_max_stay && val.offer_type != 'CONTRACTREMARK' , + max_stay_value:val.max_stay_value && val.offer_type != 'CONTRACTREMARK' ? parseInt(val.max_stay_value) : 0, + date_criteria:'', + offer_days:val.offer_days && val.offer_type != 'CONTRACTREMARK' ? val.offer_days.join(',') : '', + applicable_adult_occupancy:val.applicable_adult_occupancy && val.offer_type != 'CONTRACTREMARK' ? val.applicable_adult_occupancy.join(',') : '', + applicable_child_occupancy:val.applicable_child_occupancy && val.offer_type != 'CONTRACTREMARK' ? val.applicable_child_occupancy.join(',') : '', + cancellation_policy_type: val.offer_type != 'CONTRACTREMARK' ? val.cancellation_policy_type : '', + offer_residence_type:val.residence_type, + residence_applicable_type:val.residence_applicable_type, + residence:val.residence_applicable_type == 'SPECIFIC' ? val.residence.join(',') : '', + custom_cancellation_policy:'[]', + applicable_on:val.applicable_on && val.offer_type != 'CONTRACTREMARK' ? val.applicable_on : '', + stay_pay_applicable_on:val.stay_pay_applicable_on ? val.stay_pay_applicable_on : '', + stay_night:val.stay_night ? parseInt(val.stay_night) : 0, + pay_night:val.pay_night ? parseInt(val.pay_night) : 0, + is_stay_pay_multiple:val.offer_type == 'STAYPAY' ? val.is_stay_pay_multiple :false, + max_reoccurence:val.offer_type == 'STAYPAY' && val.is_stay_pay_multiple ? parseInt(val.max_reoccurence) : 0, + long_stay_night:val.long_stay_night ? parseInt(val.long_stay_night) : 0, + discount_type:val.discount_type ? val.discount_type:'', + discount_value:val.discount_value ? parseFloat(val.discount_value) : 0, + offer_description:val.offer_description && val.offer_type != 'CONTRACTREMARK' ? val.offer_description:'', + contract_remark:val.contract_remark?val.contract_remark:'', + } + if(val.custom_cancellation_policy){ + val.custom_cancellation_policy.map(item=>{ + item['type']=val.type; + item['charge_value'] = item['charge_value'] ? item['charge_value'] : 0; + }); + PostObj.custom_cancellation_policy = JSON.stringify(val.custom_cancellation_policy); + } + if(val.date_criteria){ + val.date_criteria.map(e=>{ + e['booking_date_range'] = [moment(e['booking_date_range'][0]).format('YYYY-MM-DD'),moment(e['booking_date_range'][1]).format('YYYY-MM-DD')] + e['checkin_date_range'] = [moment(e['checkin_date_range'][0]).format('YYYY-MM-DD'),moment(e['checkin_date_range'][1]).format('YYYY-MM-DD')] + }); + PostObj.date_criteria = val.date_criteria ? JSON.stringify(val.date_criteria) : ''; + } + // console.log(PostObj); + this.apiserv.Post('/ExtranetOffer/SaveExtranetOffer',PostObj).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + }else { + this.validserv.showValidationsMsg(this.Offers_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + } + } + Check_Cancel_Type(){ + let rate_plan_id = this.Offers_Form.get('cancellation_policy_type')?.value; + if(rate_plan_id != 'CUSTOMPOLICY'){ + // this.Offers_Form.controls['RoomPricingDetail']['controls'].forEach(formgroup=>{ + this.Offers_Form.removeControl('custom_cancellation_policy'); + this.Offers_Form.removeControl('type'); + // }) + }else{ + // this.Offers_Form.controls['RoomPricingDetail']['controls'].forEach(formgroup=>{ + // formgroup.removeControl('cancel_policy'); + // formgroup.removeControl('type'); + if(!this.Offers_Form.contains('custom_cancellation_policy')){ + this.Offers_Form.addControl(`type`,new FormControl([],Validators.required)) + this.Offers_Form.addControl(`custom_cancellation_policy`,new FormArray([this.fb.group({ + from: [0,Validators.compose([Validators.required])], + to: ['',Validators.compose([Validators.required,this.AmountRangeValidation(0)])], + charge_type: this.validserv.required, + charge_value: this.validserv.required, + })])) + } + // }) + } + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'Offers'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + SetOfferFormValue(data){ + if(data){ + this.Offers_Form.get('extranet_offer_id').setValue(data.extranet_offer_id); + this.Offers_Form.get('extranet_room_id').setValue(data.extranet_room_id ? data.extranet_room_id.split(','):[]); + this.Offers_Form.get('extranet_room_id').disable(); + if(data.extranet_room_id){ + this.CheckcontractType(); + } + this.Offers_Form.get('offer_name').setValue(data.offer_name); + this.Offers_Form.get('offer_type').setValue(data.offer_type); + this.Check_Offer_Type(data.offer_type); + this.Offers_Form.get('is_combinable_offer').setValue(data.is_combinable_offer); + this.Offers_Form.get('is_stay_pay_multiple').setValue(data.is_stay_pay_multiple); + this.Offers_Form.get('max_reoccurence').setValue(data.max_reoccurence != 0 ? data.max_reoccurence : ''); + this.Offers_Form.get('offer_nationality_type').setValue(data.offer_nationality_type); + this.Offers_Form.get('cancellation_policy_type')?.setValue(data.cancellation_policy_type); + this.Offers_Form.get('nationality_applicable_type').setValue(data.nationality_applicable_type); + this.Offers_Form.get('offer_description').setValue(data.offer_description); + this.Offers_Form.get('applicable_on')?.setValue(data.applicable_on); + this.Offers_Form.get('combinable_offer_id').setValue(data.combinable_offer_id ? data.combinable_offer_id.split(','):[]); + this.Offers_Form.get('applicable_adult_occupancy').setValue(data.applicable_adult_occupancy ? data.applicable_adult_occupancy.split(','):[]); + this.Offers_Form.get('applicable_child_occupancy').setValue(data.applicable_child_occupancy ? data.applicable_child_occupancy.split(','):[]); + this.Offers_Form.get('offer_days')?.setValue(data.offer_days ? data.offer_days.split(','):[]); + this.Offers_Form.get('residence_type').setValue(data.offer_residence_type); + this.Offers_Form.get('residence_applicable_type').setValue(data.residence_applicable_type); + if(data.residence_applicable_type == 'SPECIFIC'){ + this.ResidenceShowhide(data.residence_applicable_type); + this.Offers_Form.get('residence').setValue((data.residence.split(','))); + this.CountryList = data.country ? JSON.parse(data.country) : []; + } + if(data.offer_days){ + this.Check_day_type(); + } + this.Offers_Form.get('is_min_stay').setValue(data.is_min_stay); + if(data.is_min_stay){ + this.MinStay(true); + this.Offers_Form.get('min_stay_value').setValue(data.min_stay_value); + } + this.Offers_Form.get('is_max_stay').setValue(data.is_max_stay); + if(data.is_max_stay){ + this.MaxStay(true); + this.Offers_Form.get('max_stay_value').setValue(data.max_stay_value); + } + if(data.nationality_applicable_type == 'SPECIFIC'){ + this.NationalityShowhide('SPECIFIC'); + this.Offers_Form.get('nationality').setValue(data.nationality.split(',')); + this.CountryList = data.country ? JSON.parse(data.country) : []; + } + if(data.offer_type == 'STAYPAY'){ + this.Offers_Form.get('stay_pay_applicable_on').setValue(data.stay_pay_applicable_on); + this.Offers_Form.get('stay_night').setValue(data.stay_night); + this.Offers_Form.get('pay_night').setValue(data.pay_night); + this.Offers_Form.get('discount_code').setValue(data.discount_code); + } + if(data.offer_type != 'STAYPAY' && data.offer_type != 'CONTRACTREMARK'){ + this.Offers_Form.get('discount_type').setValue(data.discount_type); + this.Offers_Form.get('discount_value').setValue(data.discount_value); + this.Offers_Form.get('discount_code').setValue(data.discount_code); + } + if(data.offer_type == 'CONTRACTREMARK'){ + this.Offers_Form.get('contract_remark').setValue(data.contract_remark); + } + if(data.offer_type == 'LONGSTAY'){ + this.Offers_Form.get('long_stay_night').setValue(data.long_stay_night); + this.Offers_Form.get('discount_code').setValue(data.discount_code); + } + if(data.offer_type == 'EARLYBIRD'){ + this.Offers_Form.get('discount_code').setValue(data.discount_code); + } + if(data.date_criteria){ + let Date_Arr = JSON.parse(data.date_criteria); + Date_Arr.forEach((date_data,ind)=>{ + if(ind > 0)this.addDate(); + this.Offers_Form.controls['date_criteria']['controls'][ind].get('booking_date_range').setValue([new Date(date_data.booking_date_range[0]),new Date(date_data.booking_date_range[1])]) + this.Offers_Form.controls['date_criteria']['controls'][ind].get('checkin_date_range').setValue([new Date(date_data.checkin_date_range[0]),new Date(date_data.checkin_date_range[1])]) + this.Offers_Form.controls['date_criteria']['controls'][ind].get('checkin_before_days')?.setValue(date_data.checkin_before_days) + }) + } + if( data.cancellation_policy_type == 'CUSTOMPOLICY'){ + let Cancel_Arr = JSON.parse(data.custom_cancellation_policy); + this.Offers_Form.get('type').setValue(Cancel_Arr[0].type) + Cancel_Arr.forEach((cancel_data,ind)=>{ + if(ind > 0)this.AddCancelArr(ind -1); + this.Offers_Form.controls['custom_cancellation_policy']['controls'][ind].get('from').setValue(cancel_data.from) + this.Offers_Form.controls['custom_cancellation_policy']['controls'][ind].get('to').setValue(cancel_data.to) + this.Offers_Form.controls['custom_cancellation_policy']['controls'][ind].get('charge_type').setValue(cancel_data.charge_type) + this.Offers_Form.controls['custom_cancellation_policy']['controls'][ind].get('charge_value').setValue(cancel_data.charge_value) + this.Checkcanceltype(cancel_data.charge_type,ind); + if(this.Offers_Form.controls['custom_cancellation_policy']['controls'][ind]['controls']['night_type']){ + this.Offers_Form.controls['custom_cancellation_policy']['controls'][ind].get('night_type').setValue(cancel_data.night_type) + } + }) + }else { + this.Check_Cancel_Type() + } + } + } + ResidenceTypeCheck(event){ + if(event == 'INCLUDE'){ + this.Residence_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + }else{ + this.Residence_type = [{Label:'Specific',Value:'SPECIFIC'}]; + if(this.Offers_Form.controls['residence_applicable_type'].value == 'ALL'){ + this.Offers_Form.get('residence_applicable_type').setValue(''); + } + } + } + ResidenceShowhide(event){ + if(event == 'SPECIFIC'){ + this.Offers_Form.addControl('residence',new FormControl('',Validators.required)) + }else{ + this.Offers_Form.removeControl('residence'); + } + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-view/offers-view.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-view/offers-view.component.html new file mode 100644 index 0000000..44a4458 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-view/offers-view.component.html @@ -0,0 +1,253 @@ +
    +
    +
    +

    Offers

    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + Select + {{data.room_name + (data.room_view_name ? ', ' : '') + + data.room_view_name}} +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Offer Type

    +
    + +
    +
    +
    + Select + Early Bird + Stay Pay + Long Stay + Discount + Contract Remark +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Combinable Offer

    +
    + +
    +
    +
    + Select + Yes + No +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Offer Name + + + + Offer Type + + + + Room Name + + + + Combinable Offer + + + + Discount Code + + + + Offer days + + + + Offer Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.offer_name}} + {{data.offer_type}} + {{data.room_name}} + {{data.is_combinable_offer}} + {{data.discount_code}} + {{data.offer_days}} + {{data.extranet_offer_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-view/offers-view.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-view/offers-view.component.ts new file mode 100644 index 0000000..4e59cef --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-offers/offers-view/offers-view.component.ts @@ -0,0 +1,143 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; +@Component({ + selector: 'offers-view', + templateUrl: './offers-view.component.html', +}) +export class OffersViewComponent implements OnInit { + + AllRoomsData; + Result; + cols; + OfferSearchForm:FormGroup + constructor( + public activateRoute:ActivatedRoute, + public apiserv:API, + public _commonService:CommonFunctionService, + public router:Router, + private fb:FormBuilder + ) { } + Extranet_Hotel_Id; + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.GetAllRooms(); + this.OfferSearchForm = this.fb.group({ + extranet_hotel_id:this.Extranet_Hotel_Id, + extranet_room_id:'', + contract_name:'', + offer_name:'', + offer_type:'', + discount_code:'', + is_combinable_offer:'' + }); + this.cols = [ + { field: 'offer_name', header: 'Offer Name' }, + { field: 'offer_type', header: 'Offer Type' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'is_combinable_offer', header: 'Combinable Offer' }, + { field: 'discount_code', header: 'Discount Code' }, + { field: 'offer_days', header: 'Offer days' }, + { field: 'status', header: 'Status' }, + { field: 'extranet_offer_id', header: 'Offer Id' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + } + + GetAllRooms(){ + let ReqObj = { + extranet_hotel_id : this.Extranet_Hotel_Id, + extranet_room_id : '', + room_name : '', + room_view_name : '', + } + this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetHotelRoomName',ReqObj).subscribe(res=>{ + if(res && res.data){ + this.AllRoomsData = res.data; + } + }) + } + Search(){ + let val = this.OfferSearchForm.getRawValue(); + let obj = { + extranet_hotel_id:val.extranet_hotel_id, + extranet_room_id:val.extranet_room_id, + contract_name:val.contract_name, + offer_name:val.offer_name, + offer_type:val.offer_type, + discount_code:val.discount_code, + is_combinable_offer:val.is_combinable_offer, + } + this.apiserv.Post('/ExtranetOffer/GetAllExtranetOffer',obj).subscribe(res=>{ + if (res) { + this.Result = res.data ? res.data : []; + if (res.data) { + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['offer_type'] = this.getOfferType(e['offer_type']); + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + updateStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetOffer/UpdateExtranetOfferStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + getOfferType(value){ + if(value == 'EARLYBIRD'){ + return 'Early Bird' + }else if(value == 'STAYPAY'){ + return 'Stay Pay' + }else if(value == 'LONGSTAY'){ + return 'Long Stay' + }else if(value == 'DISCOUNT'){ + return 'Discount' + }else if(value == 'CONTRACTREMARK'){ + return 'Contract Remark' + } + return '' + } + + + Edit(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/EditOffer/${this.Extranet_Hotel_Id}/${Id}`); + } + Reset(){ + this.OfferSearchForm.get('extranet_room_id').setValue(''); + this.OfferSearchForm.get('contract_name').setValue(''); + this.OfferSearchForm.get('offer_name').setValue(''); + this.OfferSearchForm.get('offer_type').setValue(''); + this.OfferSearchForm.get('discount_code').setValue(''); + this.OfferSearchForm.get('is_combinable_offer').setValue(''); + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room-add/hotel-room-add.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room-add/hotel-room-add.component.html new file mode 100644 index 0000000..62b6332 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room-add/hotel-room-add.component.html @@ -0,0 +1,976 @@ + + +
    +
    +
    +

    Add Room Form

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Default Language

    +
    + +
    +
    +
    + {{lang.LanguageName}} +
    + Please + select default language +
    +
    +
    +
    + + + Please + enter room name +
    +
    +
    +
    + + + +
    +
    +
    +

    Room View

    +
    + +
    +
    +
    + Select + {{data.room_view_name}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Adult Occupancy

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max adult occupancy +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Occupancy

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child occupancy +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Age

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child age +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Occupancy Type

    +
    + +
    +
    +
    + Max Total Occupancy + Max Occupancy Combinations +
    + Please + select max occupancy type +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Total Occupancy

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max total occupancy +
    +
    +
    +
    +
    +
    +
    + +
    +
    Option {{i + 1}}
    +
    +
    +
    + + + +
    +
    +
    +

    Max Adult

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max adult +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Age

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child age +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Age

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child age +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Age

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child age +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Age

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child age +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Age

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child age +
    +
    +
    +
    + + + +
    +
    +
    +

    Max Child Age

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max child age +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + Free + Child Allowed +
    + Please + select free child +
    +
    +
    + + + +
    +
    +
    +

    Max Free Child

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select max free child +
    +
    +
    +
    + + + +
    +
    +
    +

    Free Child Age From

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select free child age from +
    +
    +
    +
    + + + +
    +
    +
    +

    Free Child Age To

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select free child age to + Please + select age to greater than age from +
    +
    +
    +
    +
    +
    + Paid + Child +
    + Please + select paid child +
    + + +
    +
    + + + +
    +
    +
    +

    Paid Child Age From

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select paid child age from + Please + select age greater than previous age range +
    +
    +
    +
    + + + +
    +
    +
    +

    Paid Child Age To

    +
    + +
    +
    +
    + Select + {{item}} +
    + Please + select paid child age to + Please + select age to greater than age from +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + Child Extrabed Supported +
    +
    +
    +
    + + + Please + enter extrabed details +
    +
    +
    +
    + Child ExtraBed Detail +
    +
    + Child Age Range + ({{HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][0].get('from_age').value}} to + {{HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][0].get('to_age').value}}) +
    +
    +
    +
    + Child 1 +
    +
    +
    +
    + Child 2 +
    +
    +
    +
    + Child 3 +
    +
    +
    +
    + Child 4 +
    +
    +
    +
    + Child 5 +
    +
    +
    +
    + Child 6 +
    +
    +
    +
    + Child Age Range + ({{HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][1].get('from_age').value}} to + {{HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][1].get('to_age').value}}) +
    +
    +
    +
    + Child 1 +
    +
    +
    +
    + Child 2 +
    +
    +
    +
    + Child 3 +
    +
    +
    +
    + Child 4 +
    +
    +
    +
    + Child 5 +
    +
    +
    +
    + Child 6 +
    +
    +
    +
    +
    +
    + Adult Extrabed Supported +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + {{item}} Adult +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +

    Room Images

    +
    +
    +
    +
    +
    + Thumbnail Image + + +
    + Note: Upload jpeg/png with max file size upto + 500kb. Height + 200px and Width 800px. +
    +
    +
    +
    +
    +
    +
    +
    +
    date.PNG
    +
    490 B
    +
    + +
    +
    +
    +
    +
    +
    + Room Images + + +
    + Note: Upload jpeg/png with max file size upto + 500kb. Height + 200px and Width 800px. +
    +
    +
    +
    +
    +
    +
    +
    +
    date.PNG
    +
    490 B
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Room Amenities

    +
    +
    +
    +
    +
    +
    + {{!isCollapsed[i] ? + 'expand_less' : 'expand_more'}} + {{amenity.amenities}} +
    +
    +
    + {{sub_amanity}} +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room-add/hotel-room-add.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room-add/hotel-room-add.component.ts new file mode 100644 index 0000000..1ba0908 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room-add/hotel-room-add.component.ts @@ -0,0 +1,764 @@ +import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { API } from 'src/app/core/services/api.service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-hotel-room-add', + templateUrl: './hotel-room-add.component.html', +}) +export class HotelRoomAddComponent implements OnInit { + + Extranet_Hotel_Id; + AllLang; + AllRoomView; + max_Child_Occ = 7; + max_Adult_Occ = 10; + max_Total_Occ = 16; + max_child_age = 12; + Clone_Rule; + showPaidchild = true; + Edit_Id; + ShowChildEditDet = true; + ShoeHideChildFields = false; + fileInfo = []; + fileArr = []; + public isCollapsed: boolean[]; + Sub_Ameneties_checked_Obj={}; + Amenities; + Age_Limit_Child = [0,1,2,3,4,5,6,7,8,9,10,11]; + occupancy_Limit_Child = [0,1,2,3,4,5,6,7,8,9,10,11]; + Max_occupancy_Limit_Child = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; + HotelRoomForm:FormGroup; + constructor(public activateRoute:ActivatedRoute,private router:Router,private hotelmanageserv:ManageHotelService, + public apiserv:API,public fb:FormBuilder,public validserv:ValidationService,public commonMasterSer:CommonFunctionService) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Clone_Rule = this.activateRoute.snapshot['_routerState'].url.includes('CloneRoom') || !this.Edit_Id ? true :false; + this.initForm() + this.GetAllLAng(); + if(this.Edit_Id){ + this.GetById() + } + } + initForm(){ + this.HotelRoomForm = this.fb.group({ + extranet_room_id:'', + extranet_room_view_id:'', + default_lang_code:this.validserv.required, + room_name:this.validserv.required, + max_adult_occupancy:this.validserv.required, + max_child_occupancy:this.validserv.required, + max_occupancy_type:this.validserv.required, + is_extra_bed_supported:false, + is_free_child:false, + is_paid_child:false, + is_adult_extra_bed_supported:false, + room_size:'', + bed_details:'', + room_description:'', + extranet_room_details_id:'', + room_images:this.fb.control([]), + room_images_url:this.fb.control([]), + max_occupancy_options:this.fb.array([]), + room_thumbnail_url:[''], + room_thumbnail_url_display:[''], + age_range1_child1:false, + age_range1_child2:false, + age_range1_child3:false, + age_range1_child4:false, + age_range1_child5:false, + age_range1_child6:false, + age_range2_child1:false, + age_range2_child2:false, + age_range2_child3:false, + age_range2_child4:false, + age_range2_child5:false, + age_range2_child6:false, + }) + } + getAllData(Edit_Data?) { + this.Sub_Ameneties_checked_Obj = {}; + this.Amenities = undefined; + forkJoin( + this.GetAllRoomView(), + this.GetAllAmenities(), + ).subscribe(result => { + if (result && result.length > 0) { + this.AllRoomView = result[0] ? result[0].data : result[0]; + let amenity_json = result[1] ? result[1].data :''; + this.Amenities = amenity_json && amenity_json['extranet_hotel_room_amenity_json'] ? JSON.parse(amenity_json.extranet_hotel_room_amenity_json) : []; + this.Amenities.forEach(data=>{ + this.Sub_Ameneties_checked_Obj[data.parent_amenity_id] = []; + }); + if(this.Amenities && this.Amenities.length > 0){ + this.isCollapsed = new Array(this.Amenities.length).fill(true); + } + if(Edit_Data && Edit_Data.length > 0){ + Edit_Data.forEach(data=>{ + this.Sub_Ameneties_checked_Obj[data.parent_amenity_id] = data.sub_amenities && data.sub_amenities.length > 0 ? data.sub_amenities : []; + }) + } + } + }) + } + GetAllLAng(){ + this.apiserv.AdminGet('/LanguageMapping/GetLanguagesByOrgId').subscribe(data=>{ + if(data){ + this.AllLang = data; + } + }) + } + GetById(){ + this.apiserv.Get('/ExtranetHotelRoom/GetExtranetHotelRoomById/'+ this.Edit_Id).subscribe(res=>{ + if(res){ + this.SetRoomdata(res.data); + } + }) + } + GetAllRoomView(){ + return this.apiserv.Get('/ExtranetHotelRoom/GetAllExtranetHotelRoomView?lang_code='+this.HotelRoomForm.get('default_lang_code').value) + } + GetAllAmenities(){ + return this.apiserv.Get('/ExtranetHotelRoom/GetAllExtranetHotelRoomAmenities/'+this.HotelRoomForm.get('default_lang_code').value) + } + + BackButton(){ + this.hotelmanageserv.Active_tab = 'Room'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + CheckOccpancyType(val){ + if(val == 'MAXTOTALOCCUPANCY'){ + this.HotelRoomForm.addControl('max_total_occupancy',new FormControl('',Validators.required)); + let formarray = this.HotelRoomForm.controls['max_occupancy_options'] as FormArray; + formarray.clear(); + }else if(val == 'MAXOCCUPANCYCOMBINATIONS'){ + this.AddMaxOccupancyCombination(); + this.HotelRoomForm.removeControl('max_total_occupancy'); + } + } + GetAdultOcuupancy(val){ + if(val){ + this.max_Adult_Occ = val+1; + this.max_Total_Occ = val + this.max_Child_Occ; + let max_occ_val = this.HotelRoomForm.controls['max_total_occupancy'] ? this.HotelRoomForm.controls['max_total_occupancy'].value : 0; + if(max_occ_val > this.max_Total_Occ){ + this.HotelRoomForm.get('max_total_occupancy').setValue(''); + } + let formarray = this.HotelRoomForm.controls['max_occupancy_options'] as FormArray; + formarray.controls.forEach(control=>{ + if(control.get('max_adult').value > val){ + control.get('max_adult').setValue(''); + } + }) + }else { + this.max_Adult_Occ = 10; + } + this.AdultBedSupport(); + } + SetRoomdata(Resp){ + if(!this.Clone_Rule){ + this.HotelRoomForm.get('extranet_room_id').setValue(Resp.extranet_room_id); + this.HotelRoomForm.get('extranet_room_view_id').setValue(Resp.extranet_room_view_id); + this.HotelRoomForm.get('max_adult_occupancy').disable(); + this.HotelRoomForm.get('max_occupancy_type').disable(); + this.HotelRoomForm.get('max_child_occupancy').disable(); + } + this.HotelRoomForm.get('default_lang_code').setValue(Resp.default_lang_code); + this.HotelRoomForm.get('max_adult_occupancy').setValue(Resp.max_adult_occupancy); + this.HotelRoomForm.get('max_occupancy_type').setValue(Resp.max_occupancy_type); + this.HotelRoomForm.get('max_child_occupancy').setValue(Resp.max_child_occupancy); + this.HotelRoomForm.get('room_size').setValue(Resp.room_size); + this.HotelRoomForm.get('bed_details').setValue(Resp.bed_details); + this.HotelRoomForm.get('room_description').setValue(Resp.room_description); + this.HotelRoomForm.get('is_free_child').setValue(Resp.is_free_child); + this.HotelRoomForm.get('is_extra_bed_supported').setValue(Resp.is_extra_bed_supported); + this.HotelRoomForm.get('is_paid_child').setValue(Resp.is_paid_child); + this.HotelRoomForm.get('is_adult_extra_bed_supported').setValue(Resp.is_adult_extra_bed_supported); + this.CheckOccpancyType(Resp.max_occupancy_type) + if(Resp.max_occupancy_type == 'MAXTOTALOCCUPANCY'){ + this.HotelRoomForm.get('max_total_occupancy').setValue(Resp.max_total_occupancy); + if(!this.Clone_Rule)this.HotelRoomForm.get('max_total_occupancy').disable(); + }else if(Resp.max_occupancy_type == 'MAXOCCUPANCYCOMBINATIONS'){ + let val = Resp.max_occupancy_options ? JSON.parse(Resp.max_occupancy_options) : []; + val.forEach((data,i)=>{ + if(i > 0) this.AddMaxOccupancyCombination(); + this.HotelRoomForm.controls['max_occupancy_options']['controls'][i].get('max_adult').setValue(data.max_adult); + this.HotelRoomForm.controls['max_occupancy_options']['controls'][i].get('max_child')?.setValue(data.max_child); + data.child_age.forEach((child_age,child_ind)=>{ + this.HotelRoomForm.controls['max_occupancy_options']['controls'][i].addControl('child_age_'+(child_ind+1),new FormControl(child_age,Validators.required)) + }) + if(!this.Clone_Rule){ + this.HotelRoomForm.controls['max_occupancy_options']['controls'][i].get('max_adult').disable(); + this.HotelRoomForm.controls['max_occupancy_options']['controls'][i].get('max_child')?.disable(); + for(let ind=1 ; ind<=6 ; ind++){ + this.HotelRoomForm.controls['max_occupancy_options']['controls'][i].get('child_age_'+ ind)?.disable(); + } + } + }) + } + + if(Resp.max_child_occupancy){ + this.ShowHideChildAgeFields(Resp.max_child_occupancy) + this.ShowChildEditDet = this.Clone_Rule ? true : false; + // this.ShoeHideChildFields = this.Clone_Rule ? true : false; + this.HotelRoomForm.get('max_child_age').setValue(Resp.max_child_age); + if(!this.Clone_Rule){ + this.HotelRoomForm.get('max_child_age').disable(); + } + } + if(Resp.is_extra_bed_supported){ + this.ExtraBedControls(true); + this.HotelRoomForm.get('extra_bed_details').setValue(Resp.extra_bed_details); + } + if(Resp.is_free_child){ + this.FreeChildControls(true); + this.HotelRoomForm.get('max_free_child').setValue(Resp.max_free_child); + this.HotelRoomForm.get('free_child_age_from').setValue(Resp.free_child_age_from); + this.HotelRoomForm.get('free_child_age_to').setValue(Resp.free_child_age_to); + } + if(Resp.ExtranetChildAgeRange && Resp.ExtranetChildAgeRange.length > 0){ + Resp.ExtranetChildAgeRange.forEach((Paid_child_Obj,ind)=>{ + ind == 0 ? this.PaidChildArr(true) : this.AddChildArr(); + this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][ind].get('from_age').setValue(Paid_child_Obj.from_age); + this.ChangeFeeMinValue('to_age',Paid_child_Obj.from_age,ind); + this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][ind].get('to_age').setValue(Paid_child_Obj.to_age); + if(!this.Clone_Rule)this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][ind].get('extranet_child_age_range_id').setValue(Paid_child_Obj.extranet_child_age_range_id); + }) + } + if(Resp.ExtranetHotelRoomDetails){ + if(!this.Clone_Rule)this.HotelRoomForm.get('room_name').setValue(Resp.ExtranetHotelRoomDetails.room_name); + this.HotelRoomForm.get('room_description').setValue(Resp.ExtranetHotelRoomDetails.room_description); + if(!this.Clone_Rule)this.HotelRoomForm.get('extranet_room_details_id').setValue(Resp.ExtranetHotelRoomDetails.extranet_room_details_id); + } + if(Resp.room_amenities){ + let amenity_data = JSON.parse(Resp.room_amenities); + this.getAllData(amenity_data) + } + if(Resp.paid_child_extrabed_details){ + let extrabed_details = JSON.parse(Resp.paid_child_extrabed_details); + extrabed_details.forEach((range_data,range_ind)=>{ + range_data.Child_Extra_bed_detail.forEach((is_extraned,child_ind)=>{ + this.HotelRoomForm.get(`age_range${range_ind+1}_child${child_ind+1}`).setValue(is_extraned); + }) + }) + } + if(Resp.room_images){ + let Images_Arr = Resp.room_images.split(','); + Images_Arr.forEach(data=>{ + this.HotelRoomForm.get('room_images').value.push(data); + this.HotelRoomForm.get('room_images_url').value.push(data); + }) + } + if(Resp.room_thumbnail_url){ + this.HotelRoomForm.get('room_thumbnail_url').setValue(Resp.room_thumbnail_url); + this.HotelRoomForm.get('room_thumbnail_url_display').setValue(Resp.room_thumbnail_url); + } + if(Resp.is_adult_extra_bed_supported){ + let adult_bed_obj = Resp.adult_extrabed_details_json ? JSON.parse(Resp.adult_extrabed_details_json) : ''; + this.AdultBedSupport(adult_bed_obj); + this.HotelRoomForm.get('adult_extrabed_details').setValue(Resp.adult_extrabed_details); + } + } + ExtraBedControls(event){ + if(event){ + this.HotelRoomForm.addControl('extra_bed_details',new FormControl('',Validators.required)); + }else { + this.HotelRoomForm.removeControl('extra_bed_details'); + } + } + FreeChildControls(event){ + if(event){ + this.HotelRoomForm.addControl('max_free_child',new FormControl('',Validators.required)); + this.HotelRoomForm.addControl('free_child_age_from',new FormControl('',Validators.required)); + this.HotelRoomForm.addControl('free_child_age_to',new FormControl('',Validators.required)); + }else { + this.HotelRoomForm.removeControl('max_free_child'); + this.HotelRoomForm.removeControl('free_child_age_from'); + this.HotelRoomForm.removeControl('free_child_age_to'); + this.addRemoveValidation('is_paid_child',true); + this.ChangeFeeMinValue('from_age','',0) + } + } + PaidChildArr(event){ + if(event){ + this.addRemoveValidation('is_free_child',false); + this.HotelRoomForm.addControl('ExtranetChildAgeRange',new FormArray([this.fb.group({ + from_age:['', Validators.compose([Validators.required,this.AmountRangeValidation(this.HotelRoomForm.get('free_child_age_to') ? this.HotelRoomForm.get('free_child_age_to').value : '')])], + to_age:this.validserv.required, + extranet_child_age_range_id:'' + })])); + }else { + this.addRemoveValidation('is_free_child',true); + if(this.HotelRoomForm.get('is_free_child').value == false){ + this.addRemoveValidation('is_paid_child',true); + } + this.HotelRoomForm.removeControl('ExtranetChildAgeRange'); + } + this.CheckMaxChildCriteria(); + } + CheckMaxChildCriteria(){ + let max_child_occupancy = this.HotelRoomForm.get('max_child_occupancy').value; + let max_free_child_occ = this.HotelRoomForm.get('max_free_child') ? this.HotelRoomForm.get('max_free_child').value : 0; + if(max_child_occupancy == max_free_child_occ && max_child_occupancy !== 0){ + this.addRemoveValidation('is_paid_child',false); + let min_amt = this.HotelRoomForm.get('free_child_age_to').value ? this.HotelRoomForm.get('free_child_age_to').value : ''; + this.AddValidationPaidAgeFields(0,min_amt,'from_age') + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][0].get('from_age').enable(); + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][0].get('to_age').enable(); + }else if(max_free_child_occ && this.HotelRoomForm.get('is_free_child').value && max_child_occupancy !== 0){ + this.addRemoveValidation('is_paid_child',true); + this.addRemoveValidation('is_free_child',false); + if(max_free_child_occ){ + this.AddValidationPaidAgeFields(0,'','from_age'); + this.AddValidationPaidAgeFields(0,'','to_age'); + let from_age = this.HotelRoomForm.get('free_child_age_from').value; + let to_age = this.HotelRoomForm.get('free_child_age_to').value; + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][0].get('from_age').setValue( from_age || from_age === 0 ? this.HotelRoomForm.get('free_child_age_from').value : ''); + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][0].get('from_age').disable(); + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][0].get('to_age').setValue(to_age || to_age === 0 ? this.HotelRoomForm.get('free_child_age_to').value : ''); + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][0].get('to_age').disable(); + let min_amt = this.HotelRoomForm.get('free_child_age_to').value ? this.HotelRoomForm.get('free_child_age_to').value : ''; + this.AddValidationPaidAgeFields(1,min_amt,'from_age'); + } + }else { + this.addRemoveValidation('is_paid_child',false); + this.addRemoveValidation('is_free_child',false); + } + } + AddValidationPaidAgeFields(i,min_amt,control){ + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][i]?.get(control).clearValidators(); + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][i]?.get(control).addValidators([Validators.required, this.AmountRangeValidation(min_amt ? min_amt : '')]); + this.HotelRoomForm.controls['ExtranetChildAgeRange']?.['controls'][i]?.get(control).updateValueAndValidity(); + } + AddChildArr(){ + let formArray = this.HotelRoomForm.controls['ExtranetChildAgeRange'] as FormArray; + formArray.push( + this.fb.group({ + from_age:['', Validators.compose([Validators.required,this.AmountRangeValidation(formArray.controls[0].get('to_age') ? formArray.controls[0].get('to_age').value : '')])], + to_age:this.validserv.required, + extranet_child_age_range_id:'', + }) + ) + } + RemoveChildArr(i){ + let formArray = this.HotelRoomForm.controls['ExtranetChildAgeRange'] as FormArray; + formArray.removeAt(i); + this.ChangeFeeMinValue('from_age',(this.HotelRoomForm.get('free_child_age_to') ? this.HotelRoomForm.get('free_child_age_to').value : ''),0) + } + AddMaxOccupancyCombination(){ + let formArray = this.HotelRoomForm.controls['max_occupancy_options'] as FormArray; + let group_obj = { + max_adult:this.validserv.required + } + if(this.HotelRoomForm.get('max_child_occupancy').value > 0){ + group_obj['max_child'] = this.validserv.required; + } + formArray.push( + this.fb.group(group_obj) + ) + } + RemoveMaxOccupancyCombination(i){ + let formArray = this.HotelRoomForm.controls['max_occupancy_options'] as FormArray; + formArray.removeAt(i); + } + SelectParent(event,parent_Id){ + if(event.checked){ + let filter_selectced_parent = this.Amenities.find(e=> e.parent_amenity_id == parent_Id); + this.Sub_Ameneties_checked_Obj[parent_Id] = filter_selectced_parent.sub_amenities; + }else { + this.Sub_Ameneties_checked_Obj[parent_Id] = []; + } + } + Select_Sub_Amenity(event,parent_Id,sub_amenity){ + if(event.checked){ + this.Sub_Ameneties_checked_Obj[parent_Id].push(sub_amenity); + }else { + this.Sub_Ameneties_checked_Obj[parent_Id] = this.Sub_Ameneties_checked_Obj[parent_Id].filter(e=>e !== sub_amenity) + } + } + + SelectImage(e, filedata,contol) { + if (e.currentFiles.length != 0) { + for (let i = 0; i < e.files.length; i++) { + let file = e.files[i]; + if (file.size < 1048576 && (file.type == 'image/png' || file.type == 'image/jpeg')) { + const reader = new FileReader(); + console.log(file) + reader.readAsText(file); // Read as binary data + reader.onload = (res) => { + const binaryString = res.target.result as string; + const hasScriptTag = this.commonMasterSer.hasScriptTagInBinary(binaryString); + if (hasScriptTag) { + filedata.clear(); + this.commonMasterSer.showMessage(false, 'Invalid file (contains script tag)'); + } else { + //base 64 + if(contol == 'room_thumbnail_url'){ + this.HotelRoomForm.get(contol).setValue(file); + }else { + this.HotelRoomForm.get(contol).value.push(file); + } + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => { + if(contol == 'room_thumbnail_url'){ + this.HotelRoomForm.get('room_thumbnail_url_display').setValue(reader.result.toString()); + }else { + this.HotelRoomForm.get('room_images_url').value.push(reader.result.toString()); + } + } + }; + } + } + } + } + + } + RemoveImage(ind,contol) { + if(contol == 'room_thumbnail_url'){ + this.HotelRoomForm.get(contol).setValue(''); + this.HotelRoomForm.get('room_thumbnail_url_display').setValue(''); + }else { + let image_url_list = this.HotelRoomForm.get(contol).value; + image_url_list.splice(ind, 1); + let image_display_url_list = this.HotelRoomForm.get('room_images_url').value; + image_display_url_list.splice(ind, 1); + } + } + + saveImg(fileInfo, fileArr,edit_id) { + if (fileInfo && fileInfo.length > 0 && fileArr && fileArr.length > 0) { + var formdata = new FormData(); + fileArr.forEach((x) => { + formdata.append("files", x); + }); + let file_info_list = JSON.stringify(fileInfo).replaceAll('ExtranetRoomId', edit_id); + formdata.append("fileInfo", file_info_list); + return this.apiserv.PostFile("/FileUpload/SaveFile", formdata); + } else { + return of({ + resp: true, + respMsg: "No images to save" + }); + } + } + ChangeFeeMinValue(controlname,min,i?) { + let min_amt = min; + if ((i == 0 || i) && (this.HotelRoomForm.controls['ExtranetChildAgeRange'] && this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][i])) { + this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).clearValidators(); + this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).addValidators([Validators.required, this.AmountRangeValidation(min_amt)]); + this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).markAsUntouched(); + this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).setErrors(null); + this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'][i].get(controlname).updateValueAndValidity(); + }else if(i == null || i == undefined){ + this.HotelRoomForm.controls[controlname].clearValidators(); + this.HotelRoomForm.controls[controlname].addValidators([Validators.required, this.AmountRangeValidation(min_amt)]); + this.HotelRoomForm.controls[controlname].markAsUntouched(); + this.HotelRoomForm.controls[controlname].setErrors(null); + this.HotelRoomForm.controls[controlname].updateValueAndValidity(); + } + this.CheckMaxChildCriteria() + }; + private AmountRangeValidation(initialValue): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value || control.value === 0) { + if ((initialValue || initialValue === 0)&& parseInt(control.value) <= parseInt(initialValue)) { + return { 'range': true }; + } + } + return null; + }; + } + Save(){ + if (this.HotelRoomForm.status == "VALID") { + let val = this.HotelRoomForm.getRawValue(); + let Amenities_Obj = []; + if(this.Amenities && this.Amenities.length > 0){ + this.Amenities.forEach(data=>{ + if(this.Sub_Ameneties_checked_Obj[data.parent_amenity_id] && this.Sub_Ameneties_checked_Obj[data.parent_amenity_id].length > 0){ + data['sub_amenities'] = this.Sub_Ameneties_checked_Obj[data.parent_amenity_id]; + Amenities_Obj.push(data); + } + }) + } + let PostData = { + extranet_room_id:val.extranet_room_id ? val.extranet_room_id : '', + extranet_hotel_id: this.Extranet_Hotel_Id, + extranet_room_view_id:val.extranet_room_view_id ? val.extranet_room_view_id : '', + default_lang_code : val.default_lang_code, + max_adult_occupancy : val.max_adult_occupancy, + max_child_occupancy : val.max_child_occupancy, + max_child_age : val.max_child_age, + max_total_occupancy : val.max_total_occupancy ? val.max_total_occupancy : 0, + max_occupancy_type : val.max_occupancy_type ? val.max_occupancy_type : '', + max_occupancy_options : '', + adult_extrabed_details_json : '', + adult_extrabed_details:val.adult_extrabed_details ? val.adult_extrabed_details : '', + is_extra_bed_supported : val.is_extra_bed_supported, + extra_bed_details : val.is_extra_bed_supported ? val.extra_bed_details : '', + is_adult_extra_bed_supported : val.is_adult_extra_bed_supported, + is_free_child : val.is_free_child, + max_free_child : val.max_free_child ? val.max_free_child : 0, + free_child_age_from : val.free_child_age_from ? val.free_child_age_from : 0, + free_child_age_to : val.free_child_age_to ? val.free_child_age_to : 0, + is_paid_child : val.is_paid_child, + room_size : val.room_size ? val.room_size : '', + bed_details : val.bed_details ? val.bed_details : '', + paid_child_extrabed_details:'', + room_amenities:JSON.stringify(Amenities_Obj), + ExtranetHotelRoomDetails:{ + extranet_hotel_id:this.Extranet_Hotel_Id, + extranet_room_details_id:val.extranet_room_details_id ? val.extranet_room_details_id : '', + lang_code:val.default_lang_code ? val.default_lang_code : '', + room_name : val.room_name, + room_description : val.room_description ? val.room_description :'', + }, + ExtranetChildAgeRange:[] + } + let paid_child_extrabed_obj = []; + if(val.ExtranetChildAgeRange && val.ExtranetChildAgeRange.length > 0){ + val.ExtranetChildAgeRange.forEach((child_age_arr,i)=>{ + PostData.ExtranetChildAgeRange.push({ + from_age:child_age_arr.from_age, + to_age:child_age_arr.to_age, + extranet_child_age_range_id:child_age_arr.extranet_child_age_range_id, + range_sequence:i, + }); + if(val.is_extra_bed_supported){ + let age_range_obj = {paid_child_extrabed_obj:`${child_age_arr.from_age} to ${child_age_arr.to_age}`,Child_Extra_bed_detail:[]} + for(let ind=1;ind<=val.max_child_occupancy;ind++){ + age_range_obj.Child_Extra_bed_detail.push(val[`age_range${i+1}_child${ind}`]) + } + paid_child_extrabed_obj.push(age_range_obj); + } + }) + } + PostData['paid_child_extrabed_details'] = JSON.stringify(paid_child_extrabed_obj); + if(val.is_adult_extra_bed_supported){ + let adult_bed_obj = {} + for(let i=1;i<=9;i++){ + adult_bed_obj['adult_'+i] = val['adult_'+i] ? val['adult_'+i] : false; + } + PostData.adult_extrabed_details_json = JSON.stringify(adult_bed_obj); + } + let room_images_arr = [] + val.room_images.forEach((img_data,img_Ind)=>{ + if (typeof(img_data) == 'object' && img_data) { + let image_type = img_data.name.split('.'); + this.fileArr.push(img_data); + this.fileInfo.push({ 'fileName': "Extranet/Hotel/Rooms/ExtranetRoomId/Room_Images_"+ img_Ind + '.' + image_type[image_type.length - 1], 'pathToSave': 'OrganizationData/ORGID' }); + let image_url = `${environment.cdnFileUrl}OrganizationData/ORGID/Extranet/Hotel/Rooms/ExtranetRoomId/Room_Images_${img_Ind}.${image_type[image_type.length - 1]}?t=${moment(new Date()).format("yyMMddHHmmssfffffff")}`; + room_images_arr.push(image_url) + }else { + room_images_arr.push(img_data); + } + }) + let thumbnail_image_url = ''; + if (typeof(val.room_thumbnail_url) == 'object' && val.room_thumbnail_url) { + let image_type = val.room_thumbnail_url.name.split('.'); + this.fileArr.push(val.room_thumbnail_url); + this.fileInfo.push({ 'fileName': "Extranet/Hotel/Rooms/ExtranetRoomId/Thumbnail_Img" + '.' + image_type[image_type.length - 1], 'pathToSave': 'OrganizationData/ORGID' }); + thumbnail_image_url = `${environment.cdnFileUrl}OrganizationData/ORGID/Extranet/Hotel/Rooms/ExtranetRoomId/Thumbnail_Img.${image_type[image_type.length - 1]}?t=${moment(new Date()).format("yyMMddHHmmssfffffff")}`; + }else { + thumbnail_image_url = val.room_thumbnail_url; + } + PostData['room_images'] = room_images_arr.length > 0 ? room_images_arr.join(',') : ''; + PostData['room_thumbnail_url'] = thumbnail_image_url; + if(val.max_occupancy_options) { + let max_occupancy_arr = []; + val.max_occupancy_options.forEach(occupancy_arr=>{ + let child_age_arr = []; + for(let i=1 ; i <= 6 ; i++){ + if(occupancy_arr[`child_age_${i}`]){ + child_age_arr.push(occupancy_arr[`child_age_${i}`]) + } + } + max_occupancy_arr.push({ + max_adult:occupancy_arr.max_adult, + max_child:occupancy_arr.max_child, + child_age:child_age_arr, + }) + }); + PostData['max_occupancy_options'] = JSON.stringify(max_occupancy_arr) + } + this.apiserv.Post('/ExtranetHotelRoom/SaveExtranetHotelRoom',PostData).subscribe(resp=>{ + if(resp){ + if(this.fileInfo.length > 0 && resp.status){ + this.saveImg(this.fileInfo, this.fileArr,resp.data.extranet_room_id).subscribe(res=>{ + if(res && res.resp){ + this.BackButton(); + } + this.commonMasterSer.showMessage(resp.status,resp.message) + }) + }else if(resp.status){ + this.BackButton(); + } + this.commonMasterSer.showMessage(resp.status,resp.message); + + } + }) + }else{ + this.validserv.showValidationsMsg(this.HotelRoomForm); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + } + } + ShowHideChildAgeFields(event){ + if(event){ + this.HotelRoomForm.addControl('max_child_age',new FormControl('',Validators.required)); + this.ShoeHideChildFields = true; + if(this.HotelRoomForm.controls['max_free_child']?.value > event){ + this.HotelRoomForm.get('max_free_child').setValue(''); + }; + this.CheckMaxChildCriteria(); + if(!this.HotelRoomForm.get('is_paid_child').value){ + this.addRemoveValidation('is_free_child',true); + } + this.addRemoveValidation('is_paid_child',true); + }else { + this.ShoeHideChildFields = false; + this.HotelRoomForm.removeControl('max_child_age'); + this.HotelRoomForm.get('is_extra_bed_supported').setValue(false); + this.HotelRoomForm.get('is_free_child').setValue(false); + this.HotelRoomForm.get('is_paid_child').setValue(false); + this.addRemoveValidation('is_free_child',false); + this.addRemoveValidation('is_paid_child',false); + this.PaidChildArr(false); + this.FreeChildControls(false); + this.ExtraBedControls(false); + } + this.max_Child_Occ = event+1; + this.max_Total_Occ = event + this.max_Adult_Occ; + let max_occ_val = this.HotelRoomForm.controls['max_total_occupancy'] ? this.HotelRoomForm.controls['max_total_occupancy'].value : 0; + if(max_occ_val > this.max_Total_Occ){ + this.HotelRoomForm.get('max_total_occupancy').setValue(''); + } + this.Paid_Child_Show_Hide(); + this.maxOccupancyCombination(event); + } + GetMaxChildAge(event){ + if(event || event===0){ + this.max_child_age = event + 1; + this.SetFieldsValueEmpty(this.HotelRoomForm,'free_child_age_from',event); + this.SetFieldsValueEmpty(this.HotelRoomForm,'free_child_age_to',event); + if(this.HotelRoomForm.controls['ExtranetChildAgeRange']){ + this.HotelRoomForm.controls['ExtranetChildAgeRange']['controls'].forEach(formgroup=>{ + this.SetFieldsValueEmpty(formgroup,'from_age',event); + this.SetFieldsValueEmpty(formgroup,'to_age',event); + }) + } + }else { + this.max_child_age = 12; + } + this.Paid_Child_Show_Hide(); + this.maxAgeCombination(event); + } + SetFieldsValueEmpty(group,control,val?){ + if(group.controls[control]?.value > val){ + group.get(control).setValue(''); + } + } + // common function + addRemoveValidation(name, check) { + if (check) { + this.HotelRoomForm.get(name).addValidators([Validators.requiredTrue]); + } else { + this.HotelRoomForm.get(name).clearValidators(); + } + this.HotelRoomForm.get(name).updateValueAndValidity(); + }; + Paid_Child_Show_Hide(){ + let child_occ = this.HotelRoomForm.controls['max_child_occupancy'].value ? this.HotelRoomForm.controls['max_child_occupancy'].value : undefined; + let free_child_occ = this.HotelRoomForm.controls['free_child_age_from']?.value ? this.HotelRoomForm.controls['max_child_occupancy'].value : ''; + if((free_child_occ == child_occ) && this.HotelRoomForm.controls['free_child_age_to'].value == this.max_child_age -1){ + this.showPaidchild = false; + this.addRemoveValidation('is_paid_child',false); + this.PaidChildArr(false); + }else { + this.showPaidchild = true; + this.CheckMaxChildCriteria(); + } + } + + maxChildAge(child_occ,ind){ + for(let i=1;i<=6;i++){ + let group = this.HotelRoomForm.controls['max_occupancy_options']['controls'][ind] as FormGroup; + if(!group?.get('child_age_'+i) && i <= child_occ){ + this.HotelRoomForm.controls['max_occupancy_options']['controls'][ind].addControl('child_age_'+i,new FormControl('',Validators.required)) + }else if(group?.get('child_age_'+i) && i > child_occ){ + this.HotelRoomForm.controls['max_occupancy_options']['controls'][ind].removeControl('child_age_'+i); + } + } + } + + maxOccupancyCombination(child_Occ){ + if(child_Occ > 0){ + this.HotelRoomForm.controls['max_occupancy_options']?.['controls'].forEach(occ_Combination_grp=>{ + let child_occ_Cobination_val = occ_Combination_grp.get('max_child')?.value; + if(child_occ_Cobination_val > child_Occ){ + occ_Combination_grp.get('max_child').setValue(''); + }else if(!occ_Combination_grp.get('max_child')){ + occ_Combination_grp.addControl('max_child', new FormControl('',Validators.required)) + } + }) + }else { + this.HotelRoomForm.controls['max_occupancy_options']?.['controls'].forEach((occ_Combination_grp,ind)=>{ + occ_Combination_grp.removeControl('max_child'); + this.maxChildAge(0,ind); + }) + } + } + maxAgeCombination(child_Occ){ + if(child_Occ > 0){ + this.HotelRoomForm.controls['max_occupancy_options']?.['controls'].forEach(occ_Combination_grp=>{ + for(let i=1 ; i<=6 ; i++){ + let child_occ_Cobination_val = occ_Combination_grp.get('child_age_'+i)?.value; + if(child_occ_Cobination_val > child_Occ){ + occ_Combination_grp.get('child_age_'+i)?.setValue(''); + } + } + }) + }else if(child_Occ == 0){ + this.HotelRoomForm.controls['max_occupancy_options']?.['controls'].forEach((occ_Combination_grp,ind)=>{ + for(let i=1 ; i<=6 ; i++){ + occ_Combination_grp.get('child_age_'+i)?.setValue(0); + } + }) + } + } + + AdultBedSupport(value_Obj?){ + let value = this.HotelRoomForm.get('is_adult_extra_bed_supported').value; + let adult_occ = this.HotelRoomForm.get('max_adult_occupancy').value; + if(value && adult_occ){ + this.HotelRoomForm.addControl('adult_extrabed_details',new FormControl('',this.validserv.required)); + for(let i = 1; i <= adult_occ; i++){ + if(!this.HotelRoomForm.get('adult_'+i)){ + this.HotelRoomForm.addControl('adult_' + i,new FormControl(value_Obj ? value_Obj['adult_'+ i] : false)); + } + } + for(let i = 9; i > adult_occ; i--){ + if(this.HotelRoomForm.get('adult_'+i)){ + this.HotelRoomForm.removeControl('adult_'+i); + } + } + }else { + this.HotelRoomForm.removeControl('adult_extrabed_details'); + for(let i = 9; i > 0; i--){ + if(this.HotelRoomForm.get('adult_'+i)){ + this.HotelRoomForm.removeControl('adult_'+i); + } + } + } + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.component.html new file mode 100644 index 0000000..d7a97b7 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.component.html @@ -0,0 +1,257 @@ +
    +
    +
    +

    Room

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Room View

    +
    + +
    +
    +
    + Select + {{data.room_view_name}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Extrabed Supported

    +
    + +
    +
    +
    + Select + Yes + No +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Free Child Allowed

    +
    + +
    +
    +
    + Select + Yes + No +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Room Name + + + + Room View + + + + Max Occupancy Type + + + + Max Adult Occupancy + + + + Max Child Occupancy + + + + Max Child Age + + + + Max Total Occupancy + + + + Extrabed Supported + + + + Free Child Allowed + + + + Room Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.room_name}} + {{data.room_view}} + {{data.max_occupancy_type}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.component.ts new file mode 100644 index 0000000..c1d3864 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.component.ts @@ -0,0 +1,120 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'hotel-room', + templateUrl: './hotel-room.component.html', +}) +export class HotelRoomComponent implements OnInit { + displayPosition; + Extranet_Hotel_Id; + Result; + cols; + Room_Name; + AllRoomView; + Clone_Room_data; + Clone_Room_view; + Room_View; + Extra_bed; + Free_Child; + constructor(public activateRoute:ActivatedRoute,private router:Router, public apiserv:API,public _commonService:CommonFunctionService, + public validserv:ValidationService, public fb:FormBuilder) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.cols = [ + { field: 'room_name', header: 'Room Name' }, + { field: 'room_view', header: 'Room View' }, + { field: 'max_occupancy_type', header: 'max Occupancy Type' }, + { field: "max_adult_occupancy", header: 'Max Adult Occupancy' }, + { field: 'max_child_occupancy', header: 'Max Child Occupancy' }, + { field: 'max_child_age', header: 'Max Child Age' }, + { field: 'max_total_occupancy', header: 'Max Total Occupancy' }, + { field: 'is_extra_bed_supported', header: 'Extrabed Supported' }, + { field: 'is_free_child', header: 'Free Child Allowed' }, + { field: 'extranet_room_id', header: 'Room Id' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + this.GetAllRoomView() + } + + Edit(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/HotelEditRoom/${this.Extranet_Hotel_Id}/${Id}`); + } + + Search(){ + let ReObj = { + is_free_child:this.Free_Child ? this.Free_Child : '' , + is_extra_bed_supported:this.Extra_bed ? this.Extra_bed : '', + extranet_room_view_id:this.Room_View ? this.Room_View : '', + room_name:this.Room_Name ? this.Room_Name : '', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetHotelRoom/GetAllExtranetHotelRoom',ReObj).subscribe(res=>{ + if (res) { + this.Result = res.data ? res.data : []; + if (res.data) { + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['is_extra_bed_supported'] = e.is_extra_bed_supported ? 'Yes' : 'No'; + e['is_free_child'] = e.is_free_child ? 'Yes' : 'No'; + if(e.max_occupancy_type){ + e['max_occupancy_type'] = e.max_occupancy_type == 'MAXOCCUPANCYCOMBINATIONS' ? 'Max Occupancy Combinations' : 'Max Total Occupancy'; + } + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + Clone(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/CloneRoom/${this.Extranet_Hotel_Id}/${Id}`); + } + updateStatus(id, val) { + let obj = { + Id: id, + Status: val ? false : true, + }; + this.apiserv.Post('/ExtranetHotelRoom/UpdateExtranetHotelRoomStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + GetAllRoomView(){ + this.apiserv.Get('/ExtranetHotelRoom/GetAllExtranetHotelRoomView').subscribe(res=>{ + if(res && res.data){ + this.AllRoomView = res.data ? res.data : undefined; + } + }) + } + Reset(){ + this.Room_Name = undefined; + this.Room_View = undefined; + this.Extra_bed = undefined; + this.Free_Child = undefined; + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.module.ts new file mode 100644 index 0000000..47aa046 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-room/hotel-room.module.ts @@ -0,0 +1,67 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { HotelManageComponent } from '../hotel-manage.component'; +import { HotelRoomAddComponent } from './hotel-room-add/hotel-room-add.component'; +import { HotelRoomComponent } from './hotel-room.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { FileUploadModule } from 'primeng/fileupload'; + + + +const routes: Routes = [ + + { + path: 'HotelAddRoom/:Hotel_Eaxtranet_Id', + component:HotelRoomAddComponent, + }, + { + path: 'HotelEditRoom/:Hotel_Eaxtranet_Id/:RuleId', + component:HotelRoomAddComponent, + }, + { + path: 'CloneRoom/:Hotel_Eaxtranet_Id/:RuleId', + component:HotelRoomAddComponent, + }, +] + + +@NgModule({ + declarations: [ + HotelRoomComponent, + HotelRoomAddComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + RouterModule.forChild(routes), + ], + exports:[ + HotelRoomComponent + ] +}) +export class HotelRoomModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season-add/hotel-season-add.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season-add/hotel-season-add.component.html new file mode 100644 index 0000000..5751a0a --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season-add/hotel-season-add.component.html @@ -0,0 +1,72 @@ + +
    +
    +
    +

    Add Season Form

    +
    +
    +
    +
    +
    +
    + + + Please + enter season name +
    +
    +
    +
    + +
    +
    +
    + + + Please select date greater than from today's date or previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season-add/hotel-season-add.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season-add/hotel-season-add.component.ts new file mode 100644 index 0000000..ace16ac --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season-add/hotel-season-add.component.ts @@ -0,0 +1,173 @@ +import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { MessageService } from 'primeng/api'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-hotel-season-add', + templateUrl: './hotel-season-add.component.html', +}) +export class HotelSeasonAddComponent implements OnInit { + + constructor(public activateRoute:ActivatedRoute,public fb:FormBuilder,public validserv:ValidationService,public apiserv:API,public MsgService:MessageService,private router: Router , + private hotelmanageserv:ManageHotelService) { } + Hotel_Season_Form:FormGroup; + MinDate = new Date(); + Extranet_Hotel_Id; + Edit_Id; + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Hotel_Season_Form = this.fb.group({ + extranet_season_id:'', + extranet_hotel_id:this.Extranet_Hotel_Id, + season_name:this.validserv.required, + ExtranetSeasonDetail:this.fb.array([ + this.fb.group({ + extranet_season_detail_id:'', + date:['', Validators.compose([ + Validators.required, + this.dateValidation(new Date(new Date().setDate(new Date().getDate() - 1))) + ])] + }) + ]) + }) + if(this.Edit_Id){ + this.apiserv.Get('/ExtranetSeason/GetExtranetSeasonById/'+this.Edit_Id).subscribe(res=>{ + if(res && res.status){ + this.setvalue(res.data) + } + }) + } + } + CloseCalender(element, index) { + let formArray = this.Hotel_Season_Form.controls['ExtranetSeasonDetail']['controls']; + if (element.value[0] && element.value[1]) { + element.overlayVisible = false; + element.datepickerClick = true; + if (formArray.length >= (index + 2)) { + formArray[index + 1].get("date").clearValidators(); + formArray[index + 1].get("date").setErrors(null); + formArray[index + 1].get("date").addValidators([this.dateValidation(element.value[1])]); + formArray[index + 1].get("date").markAsTouched(); + formArray[index + 1].get("date").updateValueAndValidity(); + formArray[index + 1].get("date").markAsTouched(); + } + } + } + addDate() { + let formArray = this.Hotel_Season_Form.controls['ExtranetSeasonDetail'] as FormArray; + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if(formArray.length > 0){ + if (formArray.length > 0) { + let formdate = formArray.controls[formArray.length - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + formArray.push(this.fb.group({ + extranet_season_detail_id:'', + date: ['', Validators.compose([ + Validators.required, + this.dateValidation(currentDate) + ])] + })); + } + } + public dateValidation(toDate): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + if (toDate && control.value.length <= 1 || control.value[0] <= toDate) { + return { 'range': true }; + } + } + return null; + }; + } + removeDate(index) { + let formArray = this.Hotel_Season_Form.controls['ExtranetSeasonDetail'] as FormArray; + formArray.removeAt(index); + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if (formArray.length > 0) { + if(index > 0){ + let formdate = formArray.controls[index - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + if (formArray.controls.length >= (index + 1)) { + formArray.controls[index].get("date").clearValidators(); + formArray.controls[index].get("date").setErrors(null); + formArray.controls[index].get("date").addValidators([this.dateValidation(currentDate)]); + formArray.controls[index].get("date").markAsTouched(); + formArray.controls[index].get("date").updateValueAndValidity(); + } + } + } + Save(){ + if (this.Hotel_Season_Form.status == "INVALID") { + this.validserv.showValidationsMsg(this.Hotel_Season_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Hotel_Season_Form.getRawValue(); + let ExtranetSeasonDetailArr = []; + val.ExtranetSeasonDetail.forEach(data=>{ + let from_date = new Date(Date.UTC(data.date[0].getFullYear(), data.date[0].getMonth(), data.date[0].getDate())) + let to_date = new Date(Date.UTC(data.date[1].getFullYear(), data.date[1].getMonth(), data.date[1].getDate())) + let dateObj={ + extranet_season_detail_id:data.extranet_season_detail_id ? data.extranet_season_detail_id : '', + from_date: moment(from_date).toISOString(), + to_date: moment(to_date).toISOString() + } + ExtranetSeasonDetailArr.push(dateObj) + }) + + let reqObj = { + extranet_season_id:val.extranet_season_id, + extranet_hotel_id:this.Extranet_Hotel_Id, + season_name:val.season_name, + ExtranetSeasonDetail:ExtranetSeasonDetailArr + } + this.apiserv.Post('/ExtranetSeason/SaveExtranetSeason',reqObj).subscribe(data=>{ + if(data){ + this.MsgService.add({ + severity: data.status ? "success" : "error", + detail: data.message, + }); + data.status ? this.backbutton() : ''; + } + }) + } + backbutton(){ + this.hotelmanageserv.Active_tab = 'Season'; + this.router.navigateByUrl("Services/Hotel/HotelManage/"+ this.Extranet_Hotel_Id); + } + setvalue(Resp){ + this.Hotel_Season_Form.get('season_name').setValue(Resp?.ExtranetSeason.season_name); + this.Hotel_Season_Form.get('extranet_season_id').setValue(Resp?.ExtranetSeason.extranet_season_id); + if(Resp.ExtranetSeasonDetail && Resp.ExtranetSeasonDetail.length > 0){ + Resp.ExtranetSeasonDetail.forEach((Season_detail,dateIndex)=>{ + dateIndex > 0 ? this.addDate() : ""; + let firstdate = new Date(Season_detail.from_date); + let lastdate = new Date(Season_detail.to_date ); + this.Hotel_Season_Form.controls['ExtranetSeasonDetail']['controls'][dateIndex].get("date").setValue([firstdate, lastdate]); + this.Hotel_Season_Form.controls['ExtranetSeasonDetail']['controls'][dateIndex].get("extranet_season_detail_id").setValue(Season_detail.extranet_season_detail_id); + }) + } + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.component.html new file mode 100644 index 0000000..4aa41dd --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.component.html @@ -0,0 +1,138 @@ +
    +
    +
    +

    Season

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Season Name + + + + Date Range + + + + Season Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.season_name}} + {{item}} + {{data.extranet_season_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.component.ts new file mode 100644 index 0000000..34dd731 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.component.ts @@ -0,0 +1,89 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'hotel-season', + templateUrl: './hotel-season.component.html', +}) +export class HotelSeasonComponent implements OnInit { + + Extranet_Hotel_Id; + Season_Name; + Result; + cols; + constructor(public activateRoute:ActivatedRoute,private apiserv:API,public _commonService:CommonFunctionService,private router:Router) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.cols = [ + { field: 'season_name', header: 'Season Name' }, + { field: 'date_range', header: 'Date Range' }, + { field: 'extranet_season_id', header: 'Season Id' }, + { field: 'updated_by', header: 'Created By' }, + { field: 'Custom_updated_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + { field: 'status', header: 'Status' }, + ]; + } + + Search(){ + let ReqObj = { + season_name:this.Season_Name ? this.Season_Name : '', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj).subscribe(res=>{ + if(res){ + this.Result = res.data ? res.data : []; + if(res.data){ + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['date_range'] ? e['date_range'].split(', ') : e['date_range']; + if(typeof(e['date_range_arr']) != 'string'){ + e.date_range_arr.forEach((data,ind)=>{ + e.date_range_arr[ind] = moment(data.split(' - ')[0]).format('DD MMM YYYY') + ' - ' + moment(data.split(' - ')[1]).format('DD MMM YYYY'); + }) + } + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + updateStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetSeason/UpdateExtranetSeasonStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + + Edit(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/EditSeason/${this.Extranet_Hotel_Id}/${Id}`); + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.module.ts new file mode 100644 index 0000000..ddc8285 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-season/hotel-season.module.ts @@ -0,0 +1,62 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { HotelSeasonAddComponent } from './hotel-season-add/hotel-season-add.component'; +import { HotelSeasonComponent } from './hotel-season.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { CalendarModule } from 'primeng/calendar'; + + +const routes: Routes = [ + + { + path: 'AddSeason/:Hotel_Eaxtranet_Id', + component:HotelSeasonAddComponent, + }, + { + path: 'EditSeason/:Hotel_Eaxtranet_Id/:RuleId', + component:HotelSeasonAddComponent, + }, +] + + +@NgModule({ + declarations: [ + HotelSeasonComponent, + HotelSeasonAddComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ], + exports:[ + HotelSeasonComponent + ] +}) +export class HotelSeasonModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.component.html new file mode 100644 index 0000000..62e77c8 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.component.html @@ -0,0 +1 @@ + diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.component.ts new file mode 100644 index 0000000..8d56189 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'hotel-supplements', + templateUrl: './hotel-supplements.component.html', +}) +export class HotelSupplementsComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.module.ts new file mode 100644 index 0000000..4c2b2ec --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/hotel-supplements.module.ts @@ -0,0 +1,67 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SupplementsAddComponent } from './supplements-add/supplements-add.component'; +import { SupplementsViewComponent } from './supplements-view/supplements-view.component'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { ButtonModule } from 'primeng/button'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { MatMenuModule } from '@angular/material/menu'; +import { CalendarModule } from 'primeng/calendar'; +import { InputTextModule } from 'primeng/inputtext'; +import { TabViewModule } from 'primeng/tabview'; +import { Tab1Component } from './supplements-add/tab1/tab1.component'; +import { Tab2Component } from './supplements-add/tab2/tab2.component'; +import { HotelSupplementsComponent } from './hotel-supplements.component'; +import { ReactiveFormsModule,FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: 'AddSuppliment/:Hotel_Eaxtranet_Id', + component: SupplementsAddComponent, + }, + { + path: 'EditSuppliment/:Hotel_Eaxtranet_Id/:RuleId', + component: SupplementsAddComponent, + }, + { + path: 'View', + component: SupplementsViewComponent, + }, +] + +@NgModule({ + declarations: [ + HotelSupplementsComponent, + SupplementsAddComponent, + SupplementsViewComponent, + Tab1Component, + Tab2Component + ], + imports: [ + CommonModule, + RouterModule, + NgSelectModule, + MatCheckboxModule, + ButtonModule, + TableModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + ReactiveFormsModule, + FormsModule, + TooltipModule, + InputTextModule, + TabViewModule, + MatButtonModule, + RouterModule.forChild(routes), + ], + exports:[ + HotelSupplementsComponent + ] +}) +export class HotelSupplementsModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/supplements-add.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/supplements-add.component.html new file mode 100644 index 0000000..918d5df --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/supplements-add.component.html @@ -0,0 +1,1139 @@ + +
    +
    +
    +
    +

    Add Supplements

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Contracts

    +
    + +
    +
    + +
    + {{item}} + {{item}} + {{data.room_name}} +
    + Please + select rooms +
    +
    +
    +
    + + +
    +
    +
    +
    + + + Please + enter supplement name +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality Type

    +
    + +
    +
    +
    + select + Include + Exclude +
    + Please + select nationality type +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality Applicability

    +
    + +
    +
    +
    + Select + {{data.Label}} +
    + Please + select nationality applicability +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select nationality +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence Type

    +
    + +
    +
    +
    + Select + Include + Exclude +
    + Please + select residence type +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence Applicability

    +
    + +
    +
    +
    + Select + {{data.Label}} +
    + Please + select residence applicalbility +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select residence +
    +
    +
    +
    + + + +
    +
    +
    +

    Supplement Days

    +
    + +
    +
    + +
    + {{item}} + {{item.Key}} +
    + Please + select supplement days +
    +
    +
    +
    + Dinner Supplement +
    +
    +
    +
    + + + +
    +
    +
    +

    Supplement Rate Type

    +
    + +
    +
    +
    + Select + Per Room Per Night + Per Pax Per Night + Per Pax Per Stay +
    + Please + select supplement rate type +
    +
    +
    +
    + + + +
    +
    +
    +

    Supplement Type

    +
    + +
    +
    +
    + Select + Add-On Rate + New Rate +
    + Please + select supplement type +
    +
    +
    +
    + + + Please + enter supplement rate +
    +
    +
    +
    + +
    +
    +
    + + + + Please select date greater than from previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Supplement Pricing

    +
    +
    + +
    + + + +
    + {{Room_data.get('extranet_room_name').value}} +
    +
    +
    +
    Add-On Rate Details
    +
    +
    +
    + + + + Please enter adult rate + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + Please enter child age range 1 rate + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + Please enter child age range 2 rate + +
    +
    +
    +
    + Adult New Rate
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    + 1 Adult + +
    +
    +
    + 2 Adult + +
    +
    +
    + 3 Adult + +
    +
    +
    + 4 Adult + +
    +
    +
    + 5 Adult + +
    +
    +
    + 6 Adult + +
    +
    +
    + 7 Adult + +
    +
    +
    + 8 Adult + +
    +
    +
    + 9 Adult + +
    +
    + {{date_wise_control.get('date').value ? + date_wise_control.get('date').value : '' }} + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    + Child New Rate
    +
    + + + +
    + {{Room_data.controls['Child_range1'].value}} +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    + 1 Child + +
    +
    +
    + 2 Child + +
    +
    +
    + 3 Child + +
    +
    +
    + 4 Child + +
    +
    +
    + 5 Child + +
    +
    +
    + 6 Child + +
    +
    + {{date_wise_control.get('date').value ? + date_wise_control.get('date').value : '' }} + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    + + +
    + {{Room_data.controls['Child_range2'].value}} +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    + 1 Child + +
    +
    +
    + 2 Child + +
    +
    +
    + 3 Child + +
    +
    +
    + 4 Child + +
    +
    +
    + 5 Child + +
    +
    +
    + 6 Child + +
    +
    + {{date_wise_control.get('date').value ? + date_wise_control.get('date').value : '' }} + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/supplements-add.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/supplements-add.component.ts new file mode 100644 index 0000000..c17d514 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/supplements-add.component.ts @@ -0,0 +1,701 @@ +import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { isSameDay, addDays, parseISO } from 'date-fns'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'supplements-add', + templateUrl: './supplements-add.component.html', +}) +export class SupplementsAddComponent implements OnInit { + + Edit_Id; + CountryList; + timer; + Nationality_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + Residence_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + MinDate = new Date(); + ActiveTab = 0; + MainActiveTab = 0; + selectAll = ['Select All']; + SelectAllRoom = []; + ClearAllRoom = []; + AllDaysArr = [ + { Key: 'Mon', Value: 'Monday' }, + { Key: 'Tue', Value: 'Tuesday' }, + { Key: 'Wed', Value: 'Wednesday' }, + { Key: 'Thu', Value: 'Thursday' }, + { Key: 'Fri', Value: 'Friday' }, + { Key: 'Sat', Value: 'Saturday' }, + { Key: 'Sun', Value: 'Sunday' } + ]; + ddLoader = { + Country:false, + Residence:false, + }; Extranet_Hotel_Id; + AllContrtact; + enabledDates: Date[] = []; + Supplement_Form: FormGroup; + constructor(private router: Router, + public activateRoute: ActivatedRoute, + private hotelmanageserv: ManageHotelService, + public apiserv: API, public fb: FormBuilder, public validserv: ValidationService, public commonMasterSer: CommonFunctionService) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.InitForm(); + this.GetAllData(); + } + + BackButton() { + this.hotelmanageserv.Active_tab = 'Supplements'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + GetAllData() { + forkJoin( + this.GetAllContract(), + this.GetHotelDetail(), + this.GetSupplementById(this.Edit_Id) + ).subscribe(res => { + if (res && res.length > 0) { + this.AllContrtact = res[0].data; + if(res[0].data){ + this.SelectAllRoom = ['Select All']; + } + if (res[1] && res[1].data) this.Supplement_Form.get('currency').setValue(res[1].data.currency); + this.SetSupplementFormValue(res[2] ? res[2].data :'') + } + }) + } + GetAllContract() { + let obj = { + extranet_hotel_id: this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetOffer/GetAllExtranetOfferAndSupplementContracts', obj) + } + GetHotelDetail() { + return this.apiserv.Get('/ExtranetHotel/GetExtranetHotelById/' + this.Extranet_Hotel_Id) + } + GetSupplementById(Editid) { + if (Editid) + return this.apiserv.Get('/ExtranetSupplement/GetExtranetSupplementById/' + Editid) + else + return of(null) + }; + InitForm() { + this.Supplement_Form = this.fb.group({ + extranet_room_id: this.validserv.required, + currency: '', + extranet_supplement_id: '', + supplement_name: this.validserv.required, + supplement_nationality_type: '', + nationality_applicable_type: '', + supplement_days: this.validserv.required, + supplement_rate_type: this.validserv.required, + residence_type:'', + dinner_supplement:false, + residence_applicable_type:'', + supplement_type: this.validserv.required, + supplement_dates: this.fb.array([]), + ExtranetSupplementNewRate:this.fb.array([]), + // AdultNewRates: this.fb.group({ + // Adult_Contract_Arr: this.fb.array([]), + // Copy_Group: this.fb.group({}) + // }), + // ChildNewRates1: this.fb.group({ + // Child_Contract_Arr: this.fb.array([]), + // Copy_Group: this.fb.group({}) + // }), + // ChildNewRates2: this.fb.group({ + // Child_Contract_Arr: this.fb.array([]), + // Copy_Group: this.fb.group({}) + // }), + }); + this.addDate() + } + getCountryList(event,name) { + if (event.value.length >= 2) { + this.ddLoader[name] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGet(`/MasterSearch/GetAllCountry/en/${event.value}`).subscribe(res => { + if (res) { + this.CountryList = res; + this.ddLoader[name] = false; + } + }); + }, 500); + } + } + NationalityShowhide(event) { + if (event == 'SPECIFIC') { + this.Supplement_Form.addControl('nationality', new FormControl('', Validators.required)) + } else { + this.Supplement_Form.removeControl('nationality'); + } + } + NationalityTypeCheck(event){ + if(event == 'INCLUDE'){ + this.Nationality_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + }else{ + this.Nationality_type = [{Label:'Specific',Value:'SPECIFIC'}]; + if(this.Supplement_Form.controls['nationality_applicable_type'].value == 'ALL'){ + this.Supplement_Form.get('nationality_applicable_type').setValue(''); + } + } + } + Check_day_type() { + let daysArr = [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday' + ]; + let value = this.Supplement_Form.get('supplement_days').value; + if (value && value.length > 0 && (value.includes('Select All') || value.length == 7)) { + this.Supplement_Form.get('supplement_days').setValue(daysArr); + this.selectAll = []; + } else { + this.selectAll = ['Select All']; + } + this.CheckRateCriteria(); + } + + Check_Supplement_Rate_Type(value) { + if (value == 'PERROOMPERNIGHT') { + this.Supplement_Form.addControl('per_room_per_night_supplement_rate', new FormControl('', Validators.required)); + this.Supplement_Form.removeControl('supplement_type'); + } else { + this.Supplement_Form.removeControl('per_room_per_night_supplement_rate'); + this.Supplement_Form.addControl('supplement_type', new FormControl('', Validators.required)); + + } + this.CheckRateCriteria(); + } + addDate() { + let formArray = this.Supplement_Form.controls['supplement_dates'] as FormArray; + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + // if(formArray.length > 0){ + if (formArray.length > 0) { + let formdate = formArray.controls[formArray.length - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + formArray.push(this.fb.group({ + date: ['', Validators.compose([ + Validators.required, + this.dateValidation(currentDate) + ])] + })); + // } + } + public dateValidation(toDate): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + if (toDate && control.value.length <= 1 || control.value[0] <= toDate) { + return { 'range': true }; + } + } + return null; + }; + } + removeDate(index) { + let formArray = this.Supplement_Form.controls['supplement_dates'] as FormArray; + formArray.removeAt(index); + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if (formArray.length > 0) { + if (index > 0) { + let formdate = formArray.controls[index - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + if (formArray.controls.length >= (index + 1)) { + formArray.controls[index].get("date").clearValidators(); + formArray.controls[index].get("date").setErrors(null); + formArray.controls[index].get("date").addValidators([Validators.required, this.dateValidation(currentDate)]); + // formArray.controls[index].get("date").markAsTouched(); + formArray.controls[index].get("date").updateValueAndValidity(); + // formArray.controls[index].get("date").markAsTouched(); + } + } + this.CheckRateCriteria(); + } + CloseCalender(element, index) { + let formArray = this.Supplement_Form.controls['supplement_dates']['controls']; + if (element.value[0] && element.value[1]) { + element.overlayVisible = false; + element.datepickerClick = true; + if (formArray.length >= (index + 2)) { + formArray[index + 1].get("date").clearValidators(); + formArray[index + 1].get("date").setErrors(null); + formArray[index + 1].get("date").addValidators([Validators.required, this.dateValidation(element.value[1])]); + formArray[index + 1].get("date").markAsTouched(); + formArray[index + 1].get("date").updateValueAndValidity(); + formArray[index + 1].get("date").markAsTouched(); + } + this.CheckRateCriteria(); + } + } + CheckRateCriteria(adultarr?,child1arr?,child2arr?) { + let rate_type = this.Supplement_Form.controls['supplement_rate_type'] ? this.Supplement_Form.get('supplement_rate_type').value : ''; + let supplement_type = this.Supplement_Form.controls['supplement_type'] ? this.Supplement_Form.get('supplement_type').value : ''; + let contract_id = this.Supplement_Form.get('extranet_room_id').value; + if (contract_id && contract_id.length > 0 && (contract_id.includes('Select All') || contract_id.length == this.AllContrtact.length) && !contract_id.includes('Clear All')) { + let room_id_List = [] + this.AllContrtact.forEach(d=>{ + room_id_List.push(d.extranet_room_id) + }); + this.Supplement_Form.get('extranet_room_id').setValue(room_id_List); + this.SelectAllRoom = []; + this.ClearAllRoom = ['Clear All']; + } else if (contract_id && contract_id.length > 0 && (contract_id.includes('Clear All'))){ + this.Supplement_Form.get('extranet_room_id').setValue([]); + this.SelectAllRoom = ['Select All']; + this.ClearAllRoom = []; + } else { + this.SelectAllRoom = ['Select All']; + if(contract_id?.length > 0){ + this.ClearAllRoom = ['Clear All']; + } + } + if(rate_type == 'PERPAXPERSTAY' && supplement_type == 'NEWRATE'){ + this.Supplement_Form.get('supplement_type').setValue(''); + } + contract_id = this.Supplement_Form.get('extranet_room_id').value; + let contract_filter_data = this.AllContrtact.filter(e => contract_id.includes(e.extranet_room_id)); + if(contract_id?.length != this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'].length){ + for(let i = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'].length -1; i >= 0 ;i--){ + let new_rate_contract_id = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][i].get('extranet_room_id').value + if(!contract_id.includes(new_rate_contract_id)){ + let formArray = this.Supplement_Form.get('ExtranetSupplementNewRate') as FormArray; + formArray.removeAt(i); + } + } + } + contract_filter_data.forEach((contract_data,contract_ind)=>{ + let selected_rooms_arr = []; + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'].forEach(control=>{ + selected_rooms_arr.push(control.get('extranet_room_id').value) + }) + if(!selected_rooms_arr.includes(contract_data.extranet_room_id)){ + let formArray = this.Supplement_Form.get('ExtranetSupplementNewRate') as FormArray; + formArray.push(this.fb.group({ + extranet_room_name:contract_data.room_name, + extranet_room_id:contract_data.extranet_room_id, + Child_range1: '', + Child_range2: '', + AdultNewRates: this.fb.group({ + Adult_Contract_Arr: this.fb.array([]), + Copy_Group: this.fb.group({}) + }), + ChildNewRates1: this.fb.group({ + Child_Contract_Arr: this.fb.array([]), + Copy_Group: this.fb.group({}) + }), + ChildNewRates2: this.fb.group({ + Child_Contract_Arr: this.fb.array([]), + Copy_Group: this.fb.group({}) + }), + })); + } + contract_data = contract_filter_data.find(e=> e.extranet_room_id == this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].get('extranet_room_id').value) + // this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].get('extranet_room_name').setValue(contract_data.room_name); + let range = contract_data ? JSON.parse(contract_data.age_range) : []; + range.forEach((data, ind) => { + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].get('Child_range' + (ind + 1)).setValue(data.from + ' to ' + data.to); + }) + if ((rate_type == 'PERPAXPERSTAY' || rate_type == 'PERPAXPERNIGHT') && supplement_type == 'ADDONRATE') { + if (!this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].contains('addon_adult_rate')) { + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].addControl(`addon_adult_rate`, this.validserv.required); + } + if (contract_data) { + range.forEach((data, ind) => { + if (!this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind]?.contains(`addon_child_age_range${ind + 1}_rate`)) { + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].addControl(`addon_child_age_range${ind + 1}_rate`, this.validserv.required); + } + }); + if (range.length <= 1) { + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].removeControl(`addon_child_age_range2_rate`); + if (range.length == 0) { + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].removeControl(`addon_child_age_range1_rate`); + } + } + } + this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['AdultNewRates'],'Adult_Contract_Arr'); + this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['ChildNewRates1'],'Child_Contract_Arr'); + this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['ChildNewRates2'],'Child_Contract_Arr'); + } + else if (rate_type == 'PERPAXPERNIGHT' && supplement_type == 'NEWRATE' && this.Supplement_Form.get('supplement_days').value && contract_data) { + // let dates = []; + if(!this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind]?.get('ChildNewRates1')){ + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].addControl('ChildNewRates1',new FormGroup({})) + } + if(!this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind]?.get('ChildNewRates2')){ + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].addControl('ChildNewRates2',new FormGroup({})) + } + if(!this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind]?.get('AdultNewRates')){ + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].addControl('AdultNewRates',new FormGroup({})) + } + this.enabledDates = []; + let date_range_arr = this.Supplement_Form.get('supplement_dates').value; + let weekDays = this.Supplement_Form.get('supplement_days').value; + let ChildArr1 = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].get('ChildNewRates1') as FormGroup; + let ChildArr2 = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].get('ChildNewRates2') as FormGroup; + let AdultArr = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].get('AdultNewRates') as FormGroup; + let ChildArrValue1 = ChildArr1.contains('Child_Contract_Arr') ? ChildArr1.get('Child_Contract_Arr').value : []; + let ChildArrValue2 = ChildArr2.contains('Child_Contract_Arr') ? ChildArr2.get('Child_Contract_Arr').value : []; + let AdultArrValue = AdultArr.contains('Adult_Contract_Arr') ? AdultArr.get('Adult_Contract_Arr').value : []; + let CopyAdultArrValue = AdultArr.contains('Copy_Group') ? AdultArr.get('Copy_Group').value : []; + let CopyChild1ArrValue = ChildArr1.contains('Copy_Group') ? ChildArr1.get('Copy_Group').value : []; + let CopyChild2ArrValue = ChildArr2.contains('Copy_Group') ? ChildArr2.get('Copy_Group').value : []; + + if(adultarr)AdultArrValue = adultarr; + if(child1arr)ChildArrValue1 = child1arr; + if(child2arr)ChildArrValue2 = child2arr; + + date_range_arr.forEach(date_range => { + if (date_range && date_range.date[0] && date_range.date[1]) { + const startDate = new Date(date_range.date[0]); + const endDate = date_range.date[1]; + startDate.setHours(0, 0, 0, 0); + endDate.setHours(0, 0, 0, 0); + for (let d = startDate; d <= endDate; d = addDays(d, 1)) { + const dayName = moment(d).format('dddd'); // Get the day name (e.g., 'Monday') + if (weekDays.includes(dayName)) { + this.enabledDates.push(d); + } + } + } + }) + //Adult Occupancy data + // this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind]['controls']['AdultNewRates'],'Adult_Contract_Arr') + let adult_copy_group = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind]['controls']['AdultNewRates']['controls']['Copy_Group'] as FormGroup; + for (let i = 1; i <= contract_data['max_adult_occupancy']; i++) { + if(!adult_copy_group.get(`adult_${i}`)){ + adult_copy_group.addControl(`adult_${i}`, new FormControl(CopyAdultArrValue ? CopyAdultArrValue[`adult_${i}`] : '')); + } + } + + //Child range 1 occupancy data + // this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind]['controls']['ChildNewRates1'],'Child_Contract_Arr') + let child_copy_group1 = ChildArr1['controls']['Copy_Group'] as FormGroup; + for (let i = 1; i <= contract_data['max_child_occupancy']; i++) { + if(!child_copy_group1.get(`child_${i}`)){ + child_copy_group1.addControl(`child_${i}`, new FormControl(CopyChild1ArrValue ? CopyChild1ArrValue[`child_${i}`] : '')) + } + } + + //child range 2 occupancy data + // this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['ChildNewRates2'],'Child_Contract_Arr') + let child_copy_group2 = ChildArr2['controls']['Copy_Group'] as FormGroup; + for (let i = 1; i <= contract_data['max_child_occupancy']; i++) { + if(!child_copy_group2.get(`child_${i}`)){ + child_copy_group2.addControl(`child_${i}`, new FormControl(CopyChild2ArrValue ? CopyChild2ArrValue[`child_${i}`] : '')) + } + } + if (this.enabledDates.length > 0) { + this.enabledDates.sort((a, b) => new Date(a).getTime() - new Date(b).getTime()); + let selected_date_arr = []; + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['AdultNewRates']['controls']['Adult_Contract_Arr']['controls'].forEach(adult_group=>{ + selected_date_arr.push(adult_group.get('date').value) + }) + this.enabledDates.forEach(dates_data => { + // Adult Table data + if(!selected_date_arr.includes(moment(dates_data).format('DD MMM YYYY'))){ + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['AdultNewRates']['controls']['Adult_Contract_Arr'].push(this.fb.group({ + date: moment(dates_data).format('DD MMM YYYY') + })) + let adultformgroup = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['AdultNewRates']['controls']['Adult_Contract_Arr']['controls'][this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['AdultNewRates']['controls']['Adult_Contract_Arr']['controls'].length - 1] as FormGroup; + let setvalue_data; + if (AdultArrValue && AdultArrValue.length > 0) { + setvalue_data = AdultArrValue.find(e => moment(dates_data).format('DD MMM YYYY') == e.date); + } + // adultformgroup.addControl('date',new FormControl(moment(dates_data).format('DD MMM YYYY'))); + for (let i = 1; i <= contract_data['max_adult_occupancy']; i++) { + if(!adultformgroup.get(`adult_${i}`)){ + adultformgroup.addControl(`adult_${i}`, new FormControl((setvalue_data && setvalue_data[`adult_${i}`] ? setvalue_data[`adult_${i}`] : 0), Validators.required)); + } + } + + //child Table data + for (let i = 1; i <= range.length; i++) { + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls[`ChildNewRates${i}`]['controls']['Child_Contract_Arr'].push(this.fb.group({ + date: moment(dates_data).format('DD MMM YYYY') + })) + let childformgroup = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls[`ChildNewRates${i}`]['controls']['Child_Contract_Arr']['controls'][this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls[`ChildNewRates${i}`]['controls']['Child_Contract_Arr']['controls'].length - 1] as FormGroup; + let setvalue_data; + if (ChildArrValue1 && ChildArrValue1.length > 0 && i == 1) { + setvalue_data = ChildArrValue1.find(e => moment(dates_data).format('DD MMM YYYY') == e.date); + } + if (ChildArrValue2 && ChildArrValue2.length > 0 && i == 2) { + setvalue_data = ChildArrValue2.find(e => moment(dates_data).format('DD MMM YYYY') == e.date); + } + for (let i = 1; i <= contract_data['max_child_occupancy']; i++) { + if(!childformgroup.get(`child_${i}`)){ + childformgroup.addControl(`child_${i}`, new FormControl((setvalue_data && setvalue_data[`child_${i}`] ? setvalue_data[`child_${i}`] : 0), Validators.required)); + } + } + } + } + }) + } + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].removeControl(`addon_child_age_range2_rate`); + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].removeControl(`addon_child_age_range1_rate`); + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].removeControl(`addon_adult_rate`); + } else { + this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['AdultNewRates'],'Adult_Contract_Arr'); + this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['ChildNewRates1'],'Child_Contract_Arr'); + this.RemovePaxControls(this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].controls['ChildNewRates2'],'Child_Contract_Arr'); + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].removeControl(`addon_child_age_range2_rate`); + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].removeControl(`addon_child_age_range1_rate`); + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].removeControl(`addon_adult_rate`); + } + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][contract_ind].updateValueAndValidity(); + }) + } + RemovePaxControls(formarray,formGroup){ + if(formarray){ + let Pax_Value_Group = formarray['controls'][formGroup] as FormArray; + for (let i = Pax_Value_Group.controls.length - 1; i >= 0; i--) { + Pax_Value_Group.removeAt(i); + } + let copy_group = formarray['controls']['Copy_Group'] as FormGroup; + Object.keys(copy_group.controls).forEach(key => { + copy_group.removeControl(key); + }); + } + } + Adultcopycolumn(colname, ind, controlval?) { + let value = controlval ? controlval : this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][ind].controls['AdultNewRates']['controls']['Adult_Contract_Arr']['controls'][0].get(colname).value; + if (this.enabledDates && this.enabledDates.length > 0) { + for (let i = 0; i < this.enabledDates.length; i++) { + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][ind].controls['AdultNewRates']['controls']['Adult_Contract_Arr']['controls'][i].get(colname).setValue(value); + } + } + } + AdultCopyOnUi(ind) { + let val = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][ind].controls['AdultNewRates']['controls']['Copy_Group'].getRawValue(); + let contract_id = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][ind].get('extranet_room_id').value + let contract_data = this.AllContrtact.find(e => contract_id.includes(e.extranet_room_id)); + for (let i = 1; i <= contract_data['max_adult_occupancy']; i++) { + if (val[`adult_${i}`]) { + this.Adultcopycolumn(`adult_${i}`,ind, val[`adult_${i}`]); + } + } + } + CheckTabInd(event){ + this.ActiveTab = event.index; + } + Childcopycolumn(colname, formgroup, ind, controlval?) { + let value = controlval ? controlval : this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][ind].controls[formgroup]['controls']['Child_Contract_Arr']['controls'][0].get(colname).value; + if (this.enabledDates && this.enabledDates.length > 0) { + for (let i = 0; i < this.enabledDates.length; i++) { + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][ind].controls[formgroup]['controls']['Child_Contract_Arr']['controls'][i].get(colname).setValue(value); + } + } + } + ChildCopyOnUi(formgroup,ind) { + let val = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][ind].controls[formgroup]['controls']['Copy_Group'].getRawValue(); + let contract_id = this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][ind].get('extranet_room_id').value; + let contract_data = this.AllContrtact.find(e => contract_id.includes(e.extranet_room_id)); + for (let i = 1; i <= contract_data['max_child_occupancy']; i++) { + if (val[`child_${i}`]) { + this.Childcopycolumn(`child_${i}`, formgroup, ind, val[`child_${i}`]); + } + } + } + Save(){ + this.Supplement_Form.updateValueAndValidity(); + if (this.Supplement_Form.status == "VALID") { + let val = this.Supplement_Form.getRawValue(); + let mainObj = []; + val.ExtranetSupplementNewRate.forEach((new_rate_det,room_ind)=>{ + let PostObj={ + extranet_supplement_id:val.extranet_supplement_id, + extranet_room_id:val.extranet_room_id[room_ind], + supplement_name:val.supplement_name, + dinner_supplement:val.supplement_rate_type == 'PERPAXPERNIGHT'? val.dinner_supplement : false, + supplement_nationality_type:val.supplement_nationality_type ? val.supplement_nationality_type : '', + nationality_applicable_type:val.nationality_applicable_type ? val.nationality_applicable_type : '', + nationality:val.nationality ? val.nationality.join(',') : '', + residence_type:val.residence_type, + residence_applicable_type:val.residence_applicable_type, + residence:val.residence_applicable_type == 'SPECIFIC' ? val.residence.join(',') : '', + supplement_dates:'', + supplement_days:val.supplement_days ? val.supplement_days.join(',') : '', + supplement_rate_type:val.supplement_rate_type, + supplement_type:val.supplement_type, + per_room_per_night_supplement_rate:val.per_room_per_night_supplement_rate ? parseFloat(val.per_room_per_night_supplement_rate) : 0, + addon_adult_rate:new_rate_det.addon_adult_rate ? parseFloat(new_rate_det.addon_adult_rate) : 0, + addon_child_age_range1_rate:new_rate_det.addon_child_age_range1_rate ? parseFloat(new_rate_det.addon_child_age_range1_rate) : 0, + addon_child_age_range2_rate:new_rate_det.addon_child_age_range2_rate ? parseFloat(new_rate_det.addon_child_age_range2_rate) : 0, + ExtranetSupplementNewRate:[] + } + let date_Arr = []; + val.supplement_dates.forEach(season_date=>{ + date_Arr.push({ + from: moment(season_date.date[0]).format('YYYY-MM-DD'), + to: moment(season_date.date[1]).format('YYYY-MM-DD'), + }) + }); + PostObj.supplement_dates = JSON.stringify(date_Arr); + if((val.supplement_rate_type == 'PERPAXPERNIGHT' || val.supplement_rate_type == 'PERPAXPERSTAY') && val.supplement_type == 'NEWRATE'){ + this.enabledDates.forEach((date,ind)=>{ + let array_obj = { + date : moment(date).format('YYYY-MM-DD') + } + let contract_data = this.AllContrtact.find(e => val.extranet_room_id.includes(e.extranet_room_id)); + let range = contract_data ? JSON.parse(contract_data.age_range) : []; + if(new_rate_det.AdultNewRates.Adult_Contract_Arr && new_rate_det.AdultNewRates.Adult_Contract_Arr.length > 0){ + for (let i = 1; i <= contract_data['max_adult_occupancy']; i++) { + array_obj[`adult_${i}`] = parseFloat(new_rate_det.AdultNewRates.Adult_Contract_Arr[ind][`adult_${i}`]) + } + } + range.forEach((data, index) => { + if(new_rate_det[`ChildNewRates${index+1}`].Child_Contract_Arr && new_rate_det[`ChildNewRates${index+1}`].Child_Contract_Arr.length > 0){ + for (let i = 1; i <= contract_data['max_child_occupancy']; i++) { + array_obj[`age_range${index+1}_child_${i}`] = parseFloat(new_rate_det[`ChildNewRates${index+1}`].Child_Contract_Arr[ind][`child_${i}`]) + } + } + }) + PostObj.ExtranetSupplementNewRate.push(array_obj); + }) + } + mainObj.push(PostObj); + }) + + + // console.log(PostObj); + this.apiserv.Post('/ExtranetSupplement/SaveExtranetSupplement',mainObj).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + }else { + this.validserv.showValidationsMsg(this.Supplement_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + } + } + SetSupplementFormValue(data){ + if(data){ + this.Supplement_Form.get('extranet_room_id').setValue(data.extranet_room_id ? data.extranet_room_id.split(',') : []); + this.Supplement_Form.get('extranet_room_id').disable(); + this.Supplement_Form.get('extranet_supplement_id').setValue(data.extranet_supplement_id); + this.Supplement_Form.get('supplement_name').setValue(data.supplement_name); + this.Supplement_Form.get('supplement_nationality_type').setValue(data.supplement_nationality_type); + this.Supplement_Form.get('nationality_applicable_type').setValue(data.nationality_applicable_type); + this.Supplement_Form.get('supplement_days').setValue(data.supplement_days ? data.supplement_days.split(','):''); + this.Supplement_Form.get('supplement_rate_type').setValue(data.supplement_rate_type); + this.Supplement_Form.get('supplement_type').setValue(data.supplement_type); + this.Supplement_Form.get('dinner_supplement').setValue(data.dinner_supplement); + this.Supplement_Form.get('supplement_rate_type').disable() + this.Supplement_Form.get('supplement_type').disable(); + this.Check_Supplement_Rate_Type(data.supplement_rate_type); + this.Supplement_Form.get('residence_type').setValue(data.residence_type); + this.Supplement_Form.get('residence_applicable_type').setValue(data.residence_applicable_type); + if(data.residence_applicable_type == 'SPECIFIC'){ + this.ResidenceShowhide(data.residence_applicable_type); + this.Supplement_Form.get('residence').setValue((data.residence.split(','))); + this.CountryList = data.country ? JSON.parse(data.country) : []; + } + if(data.supplement_rate_type == 'PERROOMPERNIGHT'){ + this.Supplement_Form.get('per_room_per_night_supplement_rate').setValue(data.per_room_per_night_supplement_rate); + } + if(data.nationality_applicable_type == 'SPECIFIC'){ + this.NationalityShowhide('SPECIFIC'); + this.Supplement_Form.get('nationality').setValue(data.nationality.split(',')); + this.CountryList = data.country ? JSON.parse(data.country) : []; + } + if(data.supplement_dates){ + let dates_arr = JSON.parse(data.supplement_dates); + dates_arr.forEach((dates,ind)=>{ + if(ind > 0)this.addDate(); + this.Supplement_Form.controls['supplement_dates']['controls'][ind]['controls']['date'].setValue([new Date(dates.from),new Date(dates.to)]) + }) + } + if((data.supplement_rate_type == 'PERPAXPERSTAY' ||data.supplement_rate_type == 'PERPAXPERNIGHT') && data.supplement_type == 'ADDONRATE'){ + this.CheckRateCriteria(); + this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][0].get('addon_adult_rate').setValue(data.addon_adult_rate); + if(data.addon_child_age_range1_rate)this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][0].get('addon_child_age_range1_rate').setValue(data.addon_child_age_range1_rate); + if(data.addon_child_age_range2_rate)this.Supplement_Form.controls['ExtranetSupplementNewRate']['controls'][0].get('addon_child_age_range2_rate').setValue(data.addon_child_age_range2_rate); + } + if((data.supplement_rate_type == 'PERPAXPERSTAY' ||data.supplement_rate_type == 'PERPAXPERNIGHT') && data.supplement_type == 'NEWRATE'){ + let Child1arr = []; + let Child2arr = []; + let adultarr = []; + data.ExtranetSupplementNewRate.forEach(data_on_date=>{ + Child1arr.push({ + date:moment(data_on_date.date).format('DD MMM YYYY'), + child_1:data_on_date.age_range1_child_1, + child_2:data_on_date.age_range1_child_2, + child_3:data_on_date.age_range1_child_3, + child_4:data_on_date.age_range1_child_4, + child_5:data_on_date.age_range1_child_5, + child_6:data_on_date.age_range1_child_6, + }) + Child2arr.push({ + date:moment(data_on_date.date).format('DD MMM YYYY'), + child_1:data_on_date.age_range2_child_1, + child_2:data_on_date.age_range2_child_2, + child_3:data_on_date.age_range2_child_3, + child_4:data_on_date.age_range2_child_4, + child_5:data_on_date.age_range2_child_5, + child_6:data_on_date.age_range2_child_6, + }) + adultarr.push({ + date:moment(data_on_date.date).format('DD MMM YYYY'), + adult_1:data_on_date.adult_1, + adult_2:data_on_date.adult_2, + adult_3:data_on_date.adult_3, + adult_4:data_on_date.adult_4, + adult_5:data_on_date.adult_5, + adult_6:data_on_date.adult_6 + }) + }) + this.CheckRateCriteria(adultarr,Child1arr,Child2arr); + } + } + } + ResidenceTypeCheck(event){ + if(event == 'INCLUDE'){ + this.Residence_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + }else{ + this.Residence_type = [{Label:'Specific',Value:'SPECIFIC'}]; + if(this.Supplement_Form.controls['residence_applicable_type'].value == 'ALL'){ + this.Supplement_Form.get('residence_applicable_type').setValue(''); + } + } + } + ResidenceShowhide(event){ + if(event == 'SPECIFIC'){ + this.Supplement_Form.addControl('residence',new FormControl('',Validators.required)) + }else{ + this.Supplement_Form.removeControl('residence'); + } + } + CheckTabMainInd(event){ + this.MainActiveTab = event.index; +} +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab1/tab1.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab1/tab1.component.html new file mode 100644 index 0000000..72679f9 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab1/tab1.component.html @@ -0,0 +1,121 @@ +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    + 1 Child + +
    +
    +
    + 2 Child + +
    +
    +
    + 3 Child + +
    +
    +
    + 4 Child + +
    +
    + 12 Mar 2021 + + 120 + + 120 + + 120 + + 120 +
    + 13 Mar 2021 + + 120 + + 120 + + 120 + + 120 +
    + 14 Mar 2021 + + 120 + + 120 + + 120 + + 120 +
    +
    +
    +
    diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab1/tab1.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab1/tab1.component.ts new file mode 100644 index 0000000..b4c97dd --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab1/tab1.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-tab1', + templateUrl: './tab1.component.html', +}) +export class Tab1Component implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab2/tab2.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab2/tab2.component.html new file mode 100644 index 0000000..8303a31 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab2/tab2.component.html @@ -0,0 +1,121 @@ +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    + 1 Child + +
    +
    +
    + 2 Child + +
    +
    +
    + 3 Child + +
    +
    +
    + 4 Child + +
    +
    + 12 Mar 2021 + + 125 + + 125 + + 125 + + 130 +
    + 13 Mar 2021 + + 120 + + 120 + + 120 + + 120 +
    + 14 Mar 2021 + + 120 + + 120 + + 120 + + 120 +
    +
    +
    +
    diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab2/tab2.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab2/tab2.component.ts new file mode 100644 index 0000000..1d733da --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-add/tab2/tab2.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-tab2', + templateUrl: './tab2.component.html', +}) +export class Tab2Component implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-view/supplements-view.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-view/supplements-view.component.html new file mode 100644 index 0000000..dc81f31 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-view/supplements-view.component.html @@ -0,0 +1,234 @@ +
    +
    +
    +

    Supplements

    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + Select + {{data.room_name + (data.room_view_name ? ', ' : '') + + data.room_view_name}} +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Supplement Rate Type

    +
    + +
    +
    +
    + Select + Per Room Per Night + Per Pax Per Night + Per Pax Per Stay +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Supplement Type

    +
    + +
    +
    +
    + Select + Add-On Rate + New Rate +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Supplement Name + + + + Supplement Rate Type + + + + Room Name + + + + Supplement Type + + + + Supplement Dates + + + + Supplement Days + + + + Supplement Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.supplement_name}} + {{data.supplement_rate_type}} + {{data.room_name}} + {{data.supplement_type}} + {{item}} + {{data.supplement_days}} + {{data.extranet_supplement_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-view/supplements-view.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-view/supplements-view.component.ts new file mode 100644 index 0000000..69c993c --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-supplements/supplements-view/supplements-view.component.ts @@ -0,0 +1,153 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'supplements-view', + templateUrl: './supplements-view.component.html', +}) +export class SupplementsViewComponent implements OnInit { + + AllRoomsData; + Result; + cols; + SupplementSearchForm:FormGroup + constructor( + public activateRoute:ActivatedRoute, + public apiserv:API, + public _commonService:CommonFunctionService, + public router:Router, + private fb:FormBuilder + ) { } + Extranet_Hotel_Id; + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.GetAllRooms(); + this.SupplementSearchForm = this.fb.group({ + extranet_hotel_id:this.Extranet_Hotel_Id, + extranet_room_id:'', + contract_name:'', + supplement_name:'', + supplement_rate_type:'', + supplement_type:'' + }); + this.cols = [ + { field: 'supplement_name', header: 'Supplement Name' }, + { field: 'supplement_rate_type', header: 'Supplement Rate Type' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'supplement_type', header: 'Supplement Type' }, + { field: 'date_range_arr', header: 'supplement_dates' }, + { field: 'custom_days', header: 'Supplement days' }, + { field: 'extranet_supplement_id', header: 'Supplement Id' }, + { field: 'status', header: 'Status' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' } + ]; + } + + GetAllRooms(){ + let ReqObj = { + extranet_hotel_id : this.Extranet_Hotel_Id, + extranet_room_id : '', + room_name : '', + room_view_name : '', + } + this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetHotelRoomName',ReqObj).subscribe(res=>{ + if(res && res.data){ + this.AllRoomsData = res.data; + } + }) + } + Search(){ + let val = this.SupplementSearchForm.getRawValue(); + let obj = { + extranet_hotel_id:val.extranet_hotel_id, + extranet_room_id:val.extranet_room_id, + contract_name:val.contract_name, + supplement_name:val.supplement_name, + supplement_rate_type:val.supplement_rate_type, + supplement_type:val.supplement_type, + } + this.apiserv.Post('/ExtranetSupplement/GetAllExtranetSupplement',obj).subscribe(res=>{ + if (res) { + this.Result = res.data ? res.data : []; + if (res.data) { + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['supplement_rate_type'] = this.getSupplementRateType(e.supplement_rate_type); + e['supplement_type'] = this.getSupplementType(e.supplement_type); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['supplement_dates'] ? JSON.parse(e['supplement_dates']) : e['supplement_dates']; + if(typeof(e['date_range_arr']) != 'string'){ + e.date_range_arr.forEach((data,ind)=>{ + e.date_range_arr[ind] = moment(data.from).format('DD MMM YYYY') + ' - ' + moment(data.to).format('DD MMM YYYY'); + }) + } + e['custom_days'] = e['supplement_days'] ? e['supplement_days'].split(',') : '' + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + updateStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetSupplement/UpdateExtranetSupplementStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + getSupplementType(value){ + if(value == 'ADDONRATE'){ + return 'Add-On Rate' + }else if(value == 'NEWRATE'){ + return 'New Rate' + } + return '' + } + getSupplementRateType(value){ + if(value == 'PERROOMPERNIGHT'){ + return 'Per Room Per Night' + }else if(value == 'PERPAXPERNIGHT'){ + return 'Per Pax Per Night' + }else if(value == 'PERPAXPERSTAY'){ + return 'Per Pax Per Stay' + } + return '' + } + + Edit(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/EditSuppliment/${this.Extranet_Hotel_Id}/${Id}`); + } + Reset(){ + this.SupplementSearchForm.get('extranet_room_id').setValue(''); + this.SupplementSearchForm.get('contract_name').setValue(''); + this.SupplementSearchForm.get('supplement_name').setValue(''); + this.SupplementSearchForm.get('supplement_rate_type').setValue(''); + this.SupplementSearchForm.get('supplement_type').setValue(''); + } +} \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.component.html new file mode 100644 index 0000000..cfb56bf --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.component.html @@ -0,0 +1,370 @@ + +
    +
    +
    +

    Update Adult Rate

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Select + Specific Dates + Season +
    + Please + select Date type +
    +
    +
    +
    + +
    + + + Please select date greater than from today's date or previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Season

    +
    + +
    +
    +
    + {{data.season_name}} +
    + Please + select Season +
    +
    +
    +
    + + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    + +
    + {{item}} + {{item.Key}} +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +

    Adult Pricing

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    Day
    +
    +
    + 1 Adult + +
    +
    +
    + 2 Adult + +
    + ExtraBed Included +
    +
    +
    +
    + 3 Adult + +
    + ExtraBed Included +
    +
    +
    +
    + 4 Adult + +
    + ExtraBed Included +
    +
    +
    +
    + 5 Adult + +
    + ExtraBed Included +
    +
    +
    +
    + 6 Adult + +
    + ExtraBed Included +
    +
    +
    +
    + 7 Adult + +
    + ExtraBed Included +
    +
    +
    +
    + 8 Adult + +
    + ExtraBed Included +
    +
    +
    +
    + 9 Adult + +
    + ExtraBed Included +
    +
    +
    + {{date_wise_control.get('contract_date').value ? (date_wise_control.get('contract_date').value | date: "dd MMM YYYY") : '' }} + + {{date_wise_control.get('contract_day').value}} + + + + + + + + + + + + + + + + + + +
    No data found
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.component.ts new file mode 100644 index 0000000..876f394 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.component.ts @@ -0,0 +1,307 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { API } from 'src/app/core/services/api.service'; +import { isSameDay, startOfYear, endOfYear, addDays, parseISO } from 'date-fns'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; + +@Component({ + selector: 'hotel-update-adult', + templateUrl: './hotel-update-adult.component.html', +}) +export class HotelUpdateAdultComponent implements OnInit { + Extranet_Hotel_Id; + Edit_Id; + GetAllContractResp; + GetAllData; + AllSeason; + Defaultdate = new Date(); + selectedDate: Date | null = null; + DisableDate; + selectAll = ['Select All']; + hasResult = false; + enabledDates: Date[] = []; + AllDaysArr = [ + {Key:'Mon',Value:'Monday'}, + {Key:'Tue',Value:'Tuesday'}, + {Key:'Wed',Value:'Wednesday'}, + {Key:'Thu',Value:'Thursday'}, + {Key:'Fri',Value:'Friday'}, + {Key:'Sat',Value:'Saturday'}, + {Key:'Sun',Value:'Sunday'} + ]; + Adult_contract_Search_Form:FormGroup; + Adult_contract_Save_Form:FormGroup; + + constructor(private activateRoute:ActivatedRoute,private apiserv:API,public validserv:ValidationService,public fb:FormBuilder,public commonMasterSer:CommonFunctionService, + private hotelmanageserv:ManageHotelService,private router:Router) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Adult_contract_Search_Form = this.fb.group({ + room_Name:'', + rate_Plan:'', + meal_Plan:'', + currency:'', + contract_days:'', + date_type:this.validserv.required, + }) + this.GetAllSeason(); + this.GetById(); + // this.disabledDates(); + } + + GetById(){ + this.apiserv.Get('/ExtranetRoomContract/GetExtranetRoomContractById/'+ this.Edit_Id).subscribe(res=>{ + if(res && res.data){ + // this.SetRoomdata(res.data); + let dates_range_arr = res.data['contract_dates'] ? JSON.parse(res.data.contract_dates) : []; + this.Adult_contract_Search_Form.get('room_Name').setValue(res.data.room_name); + this.Adult_contract_Search_Form.get('rate_Plan').setValue(res.data.rate_plan_name); + this.Adult_contract_Search_Form.get('meal_Plan').setValue(res.data.meal_plan_name); + this.Adult_contract_Search_Form.get('currency').setValue(res.data.currency_code); + this.GetAllData = res.data; + // this.GetAllData['max_adult_occupancy'] = 3; + dates_range_arr.forEach(date_range=>{ + const startDate = parseISO(date_range.date_from); + const endDate = parseISO(date_range.date_to); + + for (let d = startDate; d <= endDate; d = addDays(d, 1)) { + this.enabledDates.push(d); + } + }); + this.enabledDates.sort((a, b) => new Date(a).getTime() - new Date(b).getTime()); + for(let i=0;i= new Date().getTime()){ + this.Defaultdate = new Date(this.enabledDates[i]); + break; + } + if(this.enabledDates.length -1 == i){ + this.Defaultdate = new Date(this.enabledDates[i]); + } + } + let to_date = new Date(this.enabledDates[0]); + to_date.setMonth(to_date.getMonth()-12) + let from_date = new Date(this.enabledDates[0]); + from_date.setMonth(from_date.getMonth() + 18) + this.DisableDate = this.disabledDates(to_date,from_date) + } + }) + } + disabledDates(to_date,From_date): Date[] { + const start = startOfYear(new Date(to_date)); + const end = endOfYear(new Date(From_date)); + const disabledDates: Date[] = []; + + for (let d = start; d <= end; d.setDate(d.getDate() + 1)) { + if (!this.isDateEnabled(new Date(d))) { + disabledDates.push(new Date(d)); + } + } + + return disabledDates; + } + + isDateEnabled(date: Date): boolean { + return this.enabledDates.some(enabledDate => + isSameDay(date, enabledDate) + ); + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'RoomContract'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + SearchAdultcontract(){ + if (this.Adult_contract_Search_Form.status == "INVALID") { + this.validserv.showValidationsMsg(this.Adult_contract_Search_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let date_arr = []; + let val = this.Adult_contract_Search_Form.getRawValue(); + if(val.date_type == 'SPECIFICDATES'){ + const selectedFromDate = new Date(val.date[0]); + const fromuserTimezoneOffset = selectedFromDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const fromDate = new Date(selectedFromDate.getTime() - fromuserTimezoneOffset); + const selectedToDate = new Date(val.date[1]); + const toUserTimezoneOffset = selectedToDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const toDate = new Date(selectedToDate.getTime() - toUserTimezoneOffset); + date_arr.push({ + date_from:fromDate, + date_to:toDate, + }); + }else if(val.date_type == 'SEASON'){ + let season_id = val.Season_Id + season_id.forEach(data => { + let matched_season_by_id = this.AllSeason.find(e => e.extranet_season_id == data); + if (matched_season_by_id) { + if (typeof (matched_season_by_id['date_range']) == 'string') { + let splited_date = matched_season_by_id.date_range.split(', '); + splited_date.forEach((z) => { + date_arr.push({ + date_from: new Date(`${z.split(' - ')[0]}T00:00:00.000Z`), + date_to:new Date(`${z.split(' - ')[1]}T00:00:00.000Z`), + }); + }) + } + } + }) + } + let ReqObj = { + extranet_contract_id:this.Edit_Id, + date_range:date_arr, + contract_days:val.contract_days ? val.contract_days.join(','):'', + } + + this.apiserv.Post('/ExtranetRoomContract/GetAllAdultRateContract',ReqObj).subscribe(resp=>{ + this.hasResult = true; + if(resp){ + this.GetAllContractResp = resp.data; + this.Adult_contract_Save_Form = this.fb.group({ + Copy_Group:this.fb.group({}), + Adult_Contract_Arr:this.fb.array([]) + }); + let contract_group = this.Adult_contract_Save_Form.controls['Copy_Group'] as FormGroup; + let adult_extrabed_details = this.GetAllData['adult_extrabed_details_json'] ? JSON.parse(this.GetAllData['adult_extrabed_details_json']) : ''; + for(let i=1;i<=this.GetAllData['max_adult_occupancy'];i++){ + contract_group.addControl(`adult_${i}`,new FormControl('')); + contract_group.addControl(`supplement_${i}`,new FormControl({value : adult_extrabed_details ? adult_extrabed_details[`adult_${i}`] : false, disabled : true})); + } + if(resp.data){ + resp.data.sort((a,b)=>{ + let from_date = new Date(a.contract_date); + let to_date = new Date(b.contract_date) + return from_date.getTime() - to_date.getTime() + }) + resp.data.forEach((contractc_data,ind)=>{ + let formArray = this.Adult_contract_Save_Form.controls['Adult_Contract_Arr'] as FormArray; + let day = this.AllDaysArr.find(e=>e.Value == contractc_data.contract_day) + formArray.push(this.fb.group({ + contract_date:contractc_data.contract_date, + contract_day:day ? day.Key : '', + extranet_contract_rate_id:contractc_data.extranet_contract_rate_id, + })); + for(let i=1;i<=this.GetAllData['max_adult_occupancy'];i++){ + let formgroup = formArray.controls[ind] as FormGroup; + formgroup.addControl(`adult_${i}`,new FormControl(contractc_data[`adult_${i}`])); + } + }) + }else { + this.commonMasterSer.showMessage(resp.status,resp.message); + } + } + }) + } + copycolumn(colname,controlval?){ + let value = controlval ? controlval : this.Adult_contract_Save_Form.controls['Adult_Contract_Arr']['controls'][0].get(colname).value; + if(this.GetAllContractResp && this.GetAllContractResp.length > 0){ + for(let i = 0;i { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Adult_contract_Save_Form.controls['Adult_Contract_Arr'].getRawValue(); + let reqObjArr = []; + val.forEach(adultcontract=>{ + reqObjArr.push({ + extranet_contract_rate_id : adultcontract.extranet_contract_rate_id, + extranet_contract_id : this.Edit_Id, + contract_date : adultcontract.contract_date, + contract_day : adultcontract.contract_day, + adult_1 : adultcontract.adult_1 ? parseFloat(adultcontract.adult_1) : 0, + adult_2 : adultcontract.adult_2 ? parseFloat(adultcontract.adult_2) : 0, + adult_3 : adultcontract.adult_3 ? parseFloat(adultcontract.adult_3) : 0, + adult_4 : adultcontract.adult_4 ? parseFloat(adultcontract.adult_4) : 0, + adult_5 : adultcontract.adult_5 ? parseFloat(adultcontract.adult_5) : 0, + adult_6 : adultcontract.adult_6 ? parseFloat(adultcontract.adult_6) : 0, + adult_7 : adultcontract.adult_7 ? parseFloat(adultcontract.adult_7) : 0, + adult_8 : adultcontract.adult_8 ? parseFloat(adultcontract.adult_8) : 0, + adult_9 : adultcontract.adult_9 ? parseFloat(adultcontract.adult_9) : 0, + }) + }); + this.apiserv.Post('/ExtranetRoomContract/UpdateExtranetAdultRate',reqObjArr).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + } + Reset(){ + this.Adult_contract_Search_Form.reset(); + } + Check_day_type(){ + let daysArr = [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday' + ]; + let value = this.Adult_contract_Search_Form.get('contract_days').value; + if(value && value.length > 0 && (value.includes('Select All') || value.length == 7)){ + this.Adult_contract_Search_Form.get('contract_days').setValue(daysArr); + this.selectAll = [] + }else { + this.selectAll = ['Select All'] + } + } + + ShowDateTypeFields(event){ + if(event == 'SPECIFICDATES'){ + this.Adult_contract_Search_Form.addControl('date', new FormControl('', Validators.compose([Validators.required, this.dateValidation()]))); + this.Adult_contract_Search_Form.removeControl('Season_Id'); + }else if(event == 'SEASON'){ + this.Adult_contract_Search_Form.addControl('Season_Id',new FormControl('',Validators.required)) + this.Adult_contract_Search_Form.removeControl('date'); + }else { + this.Adult_contract_Search_Form.removeControl('Season_Id'); + this.Adult_contract_Search_Form.removeControl('date'); + } + } + public dateValidation(): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + } + return null; + }; + } + + GetAllSeason(){ + let ReqObj = { + season_name:'', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj).subscribe(res=>{ + if(res){ + this.AllSeason = res.data; + } + }) + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.module.ts new file mode 100644 index 0000000..862d84b --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-adult/hotel-update-adult.module.ts @@ -0,0 +1,57 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelUpdateAdultComponent } from './hotel-update-adult.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { CalendarModule } from 'primeng/calendar'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: 'UpdateAdultRate/:Hotel_Eaxtranet_Id/:RuleId', + component:HotelUpdateAdultComponent, + }, +] + +@NgModule({ + declarations: [ + HotelUpdateAdultComponent, + + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + TooltipModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + ], + + exports:[ + HotelUpdateAdultComponent + ] +}) +export class HotelUpdateAdultModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.component.html new file mode 100644 index 0000000..2b879ee --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.component.html @@ -0,0 +1,338 @@ + +
    +
    +
    +

    Update Allocation

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Select + Specific Dates + Season +
    + Please + select Date type +
    +
    +
    +
    + +
    + + + Please select date greater than from today's date or previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Season

    +
    + +
    +
    +
    + {{data.season_name}} +
    + Please + select Season +
    +
    +
    +
    + + + +
    +
    +
    +

    Allocation Days

    +
    + +
    +
    + +
    + {{item}} + {{item.Key}} +
    + Please + select contract days +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    +

    Allocation

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    + +
    + Select + Count Sale + Free Sale + Stop Sale +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + + + +
    +
    Date
    +
    +
    Day
    +
    +
    + Allocation Type + +
    +
    +
    + Allocation + +
    +
    +
    + Release Days + +
    +
    +
    + Booked Count +
    +
    +
    + Remaining Count +
    +
    + {{date_wise_control.get('allocation_date').value ? + (date_wise_control.get('allocation_date').value | date: "dd MMM YYYY") : '' }} + + {{date_wise_control.get('allocation_day').value}} + +
    + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    + +
    + Select + Count Sale + Free Sale + Stop Sale +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    No data found
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    + \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.component.ts new file mode 100644 index 0000000..55b06de --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.component.ts @@ -0,0 +1,449 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { API } from 'src/app/core/services/api.service'; +import { isSameDay, startOfYear, endOfYear, addDays, parseISO } from 'date-fns'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { MessageService } from 'primeng/api'; + +@Component({ + selector: 'hotel-update-allocation', + templateUrl: './hotel-update-allocation.component.html', +}) +export class HotelUpdateAllocationComponent implements OnInit { + Extranet_Hotel_Id; + Edit_Id; + Defaultdate = new Date(); + GetAllContractResp; + GetAllData; + AllSeason; + DisableDate; + selectAll = ['Select All']; + hasResult = false; + enabledDates: Date[] = []; + AllDaysArr = [ + {Key:'Mon',Value:'Monday'}, + {Key:'Tue',Value:'Tuesday'}, + {Key:'Wed',Value:'Wednesday'}, + {Key:'Thu',Value:'Thursday'}, + {Key:'Fri',Value:'Friday'}, + {Key:'Sat',Value:'Saturday'}, + {Key:'Sun',Value:'Sunday'} + ]; + Allocation_Search_Form:FormGroup; + Allocation_Save_Form:FormGroup; + IsMobile; + + constructor(private activateRoute:ActivatedRoute,private apiserv:API,public validserv:ValidationService,public fb:FormBuilder,public commonMasterSer:CommonFunctionService, + private hotelmanageserv:ManageHotelService,private router:Router,public messageService:MessageService) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Allocation_Search_Form = this.fb.group({ + room_Name:'', + room_Id:'', + date_type:this.validserv.required, + allocation_days:[] + }) + this.GetAllSeason(); + this.GetById(); + // this.disabledDates(); + } + + GetById(){ + this.apiserv.Get('/ExtranetAllocation/GetExtranetAllocationById/'+ this.Edit_Id).subscribe(res=>{ + if(res && res.data){ + // this.SetRoomdata(res.data); + let dates_range_arr = res.data['date_ranges'] ? JSON.parse(res.data.date_ranges) : []; + this.Allocation_Search_Form.get('room_Name').setValue(res.data.room_name); + this.Allocation_Search_Form.get('room_Id').setValue(res.data.extranet_room_id); + this.GetAllData = res.data; + this.GetAllData['max_adult_occupancy'] = 3; + dates_range_arr.forEach(date_range=>{ + const startDate = parseISO(date_range.date_from); + const endDate = parseISO(date_range.date_to); + + for (let d = startDate; d <= endDate; d = addDays(d, 1)) { + this.enabledDates.push(d); + } + }); + this.enabledDates.sort((a, b) => new Date(a).getTime() - new Date(b).getTime()); + for(let i=0;i= new Date().getTime()){ + this.Defaultdate = new Date(this.enabledDates[i]); + break; + } + if(this.enabledDates.length -1 == i){ + this.Defaultdate = new Date(this.enabledDates[i]); + } + } + let to_date = new Date(this.enabledDates[0]); + to_date.setMonth(to_date.getMonth()-12) + let from_date = new Date(this.enabledDates[0]); + from_date.setMonth(from_date.getMonth() + 18) + this.DisableDate = this.disabledDates(to_date,from_date) + } + }) + } + disabledDates(to_date,From_date): Date[] { + const start = startOfYear(new Date(to_date)); + const end = endOfYear(new Date(From_date)); + const disabledDates: Date[] = []; + + for (let d = start; d <= end; d.setDate(d.getDate() + 1)) { + if (!this.isDateEnabled(new Date(d))) { + disabledDates.push(new Date(d)); + } + } + + return disabledDates; + } + + isDateEnabled(date: Date): boolean { + return this.enabledDates.some(enabledDate => + isSameDay(date, enabledDate) + ); + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'Allocation'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + SearchAllocation(){ + if (this.Allocation_Search_Form.status == "INVALID") { + this.validserv.showValidationsMsg(this.Allocation_Search_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Allocation_Search_Form.getRawValue(); + let ReqObj = { + extranet_room_id:val.room_Id ? val.room_Id:'', + extranet_hotel_id:this.Extranet_Hotel_Id, + date_range:[], + allocation_days:val.allocation_days ? val.allocation_days.join(','):'', + } + if(val.date_type == 'SPECIFICDATES'){ + const selectedFromDate = new Date(val.date[0]); + const fromuserTimezoneOffset = selectedFromDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const fromDate = new Date(selectedFromDate.getTime() - fromuserTimezoneOffset); + const selectedToDate = new Date(val.date[1]); + const toUserTimezoneOffset = selectedToDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const toDate = new Date(selectedToDate.getTime() - toUserTimezoneOffset); + ReqObj.date_range.push({ + date_from:fromDate, + date_to:toDate, + }); + }else if(val.date_type == 'SEASON'){ + val.Season_Id.forEach(data => { + let matched_season_by_id = this.AllSeason.find(e => e.extranet_season_id == data); + if (matched_season_by_id) { + if (typeof (matched_season_by_id['date_range']) == 'string') { + let splited_date = matched_season_by_id.date_range.split(', '); + splited_date.forEach((z) => { + ReqObj.date_range.push({ + date_from: new Date(`${z.split(' - ')[0]}T00:00:00.000Z`), + date_to:new Date(`${z.split(' - ')[1]}T00:00:00.000Z`), + }); + }) + } + } + }) + } + this.apiserv.Post('/ExtranetAllocation/GetUpdateallocation',ReqObj).subscribe(resp=>{ + this.hasResult = true; + if(resp){ + this.GetAllContractResp = resp.data && resp.data.length > 0 ? resp.data : undefined; + this.Allocation_Save_Form = this.fb.group({ + Copy_Group:this.fb.group({ + allocation_type:'', + allocation_limit:'', + release_days:'', + }), + Allocation_Arr:this.fb.array([]) + }); + if(resp.data){ + resp.data.sort((a,b)=>{ + let from_date = new Date(a.allocation_date); + let to_date = new Date(b.allocation_date) + return from_date.getTime() - to_date.getTime() + }) + resp.data.forEach((contract_data,ind)=>{ + let formArray = this.Allocation_Save_Form.controls['Allocation_Arr'] as FormArray; + let day = this.AllDaysArr.find(e=>e.Value == contract_data.contract_day) + formArray.push(this.fb.group({ + allocation_type:contract_data.allocation_type, + allocation_limit:contract_data.allocation_limit, + release_days:contract_data.release_days, + allocation_date:contract_data.allocation_date, + allocation_day:contract_data.allocation_day, + booking_count:contract_data.booking_count, + remaining_count:contract_data.remaining_count, + contract_day:day ? day.Key : '', + extranet_allocation_id:contract_data.extranet_allocation_id, + extranet_room_id:contract_data.extranet_room_id, + Is_Required:false + })); + + let formgroup = formArray.controls[ind] as FormGroup; + if(contract_data.booking_count || contract_data.allocation_limit || contract_data.release_days || contract_data.remaining_count){ + if(contract_data.allocation_type=='FREESALE' || contract_data.allocation_type=='STOPSALE'){ + formgroup.get('allocation_limit').disable(); + formgroup.get('release_days').disable(); + }else { + formgroup.get('allocation_limit').addValidators([Validators.required,this.AmountRangeValidation(contract_data.booking_count )]); + formgroup.get('release_days').addValidators([Validators.required]); + } + formgroup.get('allocation_type').addValidators([Validators.required]); + formgroup.get('Is_Required').setValue(true); + } + }) + }else { + this.commonMasterSer.showMessage(resp.status,resp.message); + } + } + }) + }; + get copyForm(){ + return this.Allocation_Save_Form.get('Copy_Group') as FormGroup + } + copycolumn(colname,controlval?){ + let value = controlval ? controlval : this.Allocation_Save_Form.controls['Allocation_Arr']['controls'][0].get(colname).value; + if(this.GetAllContractResp && this.GetAllContractResp.length > 0){ + for(let i = 0;i { + this.validserv.scrollToError(); + }, 50); + for(let i = 0;i{ + reqObjArr.push({ + extranet_allocation_id : Allocationdata.extranet_allocation_id, + extranet_room_id : Allocationdata.extranet_room_id, + extranet_hotel_id : this.Extranet_Hotel_Id, + allocation_date : Allocationdata.allocation_date, + allocation_day : Allocationdata.allocation_day, + allocation_type : Allocationdata.allocation_type, + booking_count : Allocationdata.booking_count ? parseInt(Allocationdata.booking_count) :0, + remaining_count : Allocationdata.remaining_count ? parseInt(Allocationdata.remaining_count) : 0, + release_days : Allocationdata.release_days ? Allocationdata.release_days : '', + allocation_limit : Allocationdata.allocation_limit ? Allocationdata.allocation_limit : '' + }) + }); + this.apiserv.Post('/ExtranetAllocation/UpdateExtranetAllocation',reqObjArr).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + } + Reset(){ + this.Allocation_Search_Form.reset(); + } + Check_day_type(){ + let daysArr = [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday' + ]; + let value = this.Allocation_Search_Form.get('allocation_days').value; + if(value && value.length > 0 && (value.includes('Select All') || value.length == 7)){ + this.Allocation_Search_Form.get('allocation_days').setValue(daysArr); + this.selectAll = [] + }else { + this.selectAll = ['Select All'] + } + } + private AmountRangeValidation(initialValue): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value || control.value == 0) { + if (initialValue && parseInt(control.value) < parseInt(initialValue)) { + return { 'range': true }; + } + } + return null; + }; + } + AllocationType_Check(i){ + let formgroup = this.Allocation_Save_Form.controls['Allocation_Arr']['controls'][i] as FormGroup; + let val = formgroup.get('allocation_type').value; + if(val == 'FREESALE'){ + formgroup.get('allocation_limit').disable(); + formgroup.get('release_days').disable(); + formgroup.get('allocation_limit').clearValidators(); + formgroup.get('release_days').clearValidators(); + formgroup.get('allocation_limit').setValue('FREESALE'); + } + else if( val=='STOPSALE'){ + formgroup.get('allocation_limit').disable(); + formgroup.get('release_days').disable(); + formgroup.get('allocation_limit').clearValidators(); + formgroup.get('release_days').clearValidators(); + }else if(val == 'COUNTSALE') { + formgroup.get('release_days').enable(); + formgroup.get('allocation_limit').enable(); + formgroup.get('allocation_limit').setValue(formgroup.get('allocation_limit').value == 'FREESALE' ? formgroup.get('booking_count').value : formgroup.get('allocation_limit').value); + formgroup.get('allocation_limit').addValidators([Validators.required,this.AmountRangeValidation(formgroup.get('booking_count').value)]); + formgroup.get('release_days').addValidators([Validators.required]); + }else if((!formgroup.get('Is_Required').value && (formgroup.get('allocation_limit').value || formgroup.get('release_days').value)) || formgroup.get('Is_Required').value){ + formgroup.get('release_days').enable(); + formgroup.get('allocation_limit').enable(); + formgroup.get('allocation_limit').setValue(formgroup.get('booking_count').value); + formgroup.get('allocation_limit').addValidators([Validators.required,this.AmountRangeValidation(formgroup.get('booking_count').value)]); + formgroup.get('release_days').addValidators([Validators.required]); + formgroup.get('allocation_type').addValidators([Validators.required]); + }else { + formgroup.get('release_days').enable(); + formgroup.get('allocation_limit').enable(); + formgroup.get('allocation_limit').setValue(''); + formgroup.get('release_days').setValue(''); + formgroup.get('allocation_limit').clearValidators(); + formgroup.get('release_days').clearValidators(); + formgroup.get('allocation_type').clearValidators(); + } + // formgroup.get('allocation_type').addValidators([Validators.required]); + // formgroup.get('Is_Required').setValue(true); + formgroup.get('allocation_limit').updateValueAndValidity(); + formgroup.get('release_days').updateValueAndValidity(); + formgroup.get('allocation_type').updateValueAndValidity(); + this.checkvalidation(i); + } + checkvalidation(i){ + let formgroup = this.Allocation_Save_Form.controls['Allocation_Arr']['controls'][i] as FormGroup; + // if(formgroup.get('Is_Required').value || (!formgroup.get('Is_Required').value || formgroup.get('Is_Required').value)){ + if(formgroup.get('allocation_type').hasError('required')){ + this.messageService.add({ + severity: 'error', + detail: 'Please select allocation type', + sticky: true // Toast will remain visible until manually closed + }); + } + if(formgroup.get('allocation_limit').hasError('required')){ + this.messageService.add({ + severity: 'error', + detail: 'Please enter allocation', + sticky: true // Toast will remain visible until manually closed + }); + } + if(formgroup.get('allocation_limit').hasError('range')){ + this.messageService.add({ + severity: 'info', + detail: 'Allocation can not be lesser than booking count', + sticky: true // Toast will remain visible until manually closed + }); + } + if(formgroup.get('release_days').hasError('required')){ + this.messageService.add({ + severity: 'error', + detail: 'Please enter release days', + sticky: true // Toast will remain visible until manually closed + }); + } + // } + } + check_Allocation_and_Realase_Validation(i){ + let formgroup = this.Allocation_Save_Form.controls['Allocation_Arr']['controls'][i] as FormGroup; + if(!formgroup.get('Is_Required').value && (formgroup.get('allocation_type').value || formgroup.get('allocation_limit').value || formgroup.get('release_days').value)){ + formgroup.get('release_days').enable(); + formgroup.get('allocation_limit').enable(); + // formgroup.get('allocation_limit').setValue(formgroup.get('booking_count').value); + formgroup.get('allocation_limit').addValidators([Validators.required,this.AmountRangeValidation(formgroup.get('booking_count').value)]); + formgroup.get('release_days').addValidators([Validators.required]); + formgroup.get('allocation_type').addValidators([Validators.required]); + }else if(!formgroup.get('Is_Required').value ){ + formgroup.get('allocation_limit').clearValidators(); + formgroup.get('release_days').clearValidators(); + formgroup.get('allocation_type').clearValidators(); + } + formgroup.get('allocation_limit').updateValueAndValidity(); + formgroup.get('release_days').updateValueAndValidity(); + formgroup.get('allocation_type').updateValueAndValidity(); + this.checkvalidation(i); + } + Copy_Group_Type_check(event){ + if(event == 'FREESALE'){ + this.Allocation_Save_Form.controls['Copy_Group'].get('allocation_limit').setValue('FREESALE'); + this.Allocation_Save_Form.controls['Copy_Group'].get('allocation_limit').disable() + }else { + if(this.Allocation_Save_Form.controls['Copy_Group'].get('allocation_limit').value == 'FREESALE'){ + this.Allocation_Save_Form.controls['Copy_Group'].get('allocation_limit').setValue(''); + } + this.Allocation_Save_Form.controls['Copy_Group'].get('allocation_limit').enable(); + } + + } + + + ShowDateTypeFields(event){ + if(event == 'SPECIFICDATES'){ + this.Allocation_Search_Form.addControl('date', new FormControl('', Validators.compose([Validators.required, this.dateValidation()]))); + this.Allocation_Search_Form.removeControl('Season_Id'); + }else if(event == 'SEASON'){ + this.Allocation_Search_Form.addControl('Season_Id',new FormControl('',Validators.required)) + this.Allocation_Search_Form.removeControl('date'); + }else { + this.Allocation_Search_Form.removeControl('Season_Id'); + this.Allocation_Search_Form.removeControl('date'); + } + } + public dateValidation(): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + } + return null; + }; + } + + GetAllSeason(){ + let ReqObj = { + season_name:'', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj).subscribe(res=>{ + if(res){ + this.AllSeason = res.data; + } + }) + } +} \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.module.ts new file mode 100644 index 0000000..d291943 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-allocation/hotel-update-allocation.module.ts @@ -0,0 +1,56 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelUpdateAllocationComponent } from './hotel-update-allocation.component'; +import { CalendarModule } from 'primeng/calendar'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: 'UpdateAllocation/:Hotel_Eaxtranet_Id/:RuleId', + component: HotelUpdateAllocationComponent, + }, +] + +@NgModule({ + declarations: [ + HotelUpdateAllocationComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + TooltipModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + + ], + exports:[ + HotelUpdateAllocationComponent + ] +}) +export class HotelUpdateAllocationModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.component.html new file mode 100644 index 0000000..86abd87 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.component.html @@ -0,0 +1,334 @@ + +
    +
    +
    +

    Update Cancellation Policy

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Select + Specific Dates + Season +
    + Please + select Date type +
    +
    +
    +
    + +
    + + + Please select date greater than from today's date or previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Season

    +
    + +
    +
    +
    + {{data.season_name}} +
    + Please + select Season +
    +
    +
    +
    + + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    + +
    + {{item}} + {{item.Key}} +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +

    Cancellation Policy

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Date + + Day + + Cancellation Type + + From + + To + + Night Type + + Value +
    +
    + {{cancel_date_Group.get('contract_date').value ? (cancel_date_Group.get('contract_date').value | date: "dd MMM YYYY") : '' }} +
    +
    +
    + {{cancel_date_Group.get('contract_day').value}} +
    +
    +
    + + +
    +
    +
    +

    Cancellation Type

    +
    + +
    +
    + +
    + Select + Full Charges + Night Count + Amount + Percentage +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    +

    Night Type

    +
    + +
    +
    + +
    + Select + First + Last + Cheapest + Highest +
    +
    +
    + Disabled +
    +
    +
    + +
    +
    + Disabled +
    +
    +
    + + +
    +
    + Please select cancellation type + Please enter cancellation from + Please enter cancellation from range greater than previous range + Please enter cancellation to + Please enter cancellation to range greater than cancellation from + Please select night type + Please enter value +
    + + + + + + + + + + + + + +
    + Date + + Day + + Cancellation Type + + From + + To + + Night Type + + Value +
    No data found
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.component.ts new file mode 100644 index 0000000..aac00c6 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.component.ts @@ -0,0 +1,458 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { API } from 'src/app/core/services/api.service'; +import { isSameDay, startOfYear, endOfYear, addDays, parseISO } from 'date-fns'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; + +@Component({ + selector: 'hotel-update-cancellation', + templateUrl: './hotel-update-cancellation.component.html', +}) +export class HotelUpdateCancellationComponent implements OnInit { + Extranet_Hotel_Id; + Edit_Id; + Range_Data; + AllSeason; + Defaultdate = new Date(); + GetAllContractResp; + GetAllData; + Validation_Message_Obj = []; + cancellation_array_length; + selectedDate: Date | null = null; + DisableDate; + selectAll = ['Select All']; + hasResult = false; + enabledDates: Date[] = []; + AllDaysArr = [ + {Key:'Mon',Value:'Monday'}, + {Key:'Tue',Value:'Tuesday'}, + {Key:'Wed',Value:'Wednesday'}, + {Key:'Thu',Value:'Thursday'}, + {Key:'Fri',Value:'Friday'}, + {Key:'Sat',Value:'Saturday'}, + {Key:'Sun',Value:'Sunday'} + ]; + Cancellation_contract_Search_Form:FormGroup; + Cancellation_contract_Save_Form:FormGroup; + + constructor(private activateRoute:ActivatedRoute,private apiserv:API,public validserv:ValidationService,public fb:FormBuilder,public commonMasterSer:CommonFunctionService, + private hotelmanageserv:ManageHotelService,private router:Router) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Cancellation_contract_Search_Form = this.fb.group({ + room_Name:'', + rate_Plan:'', + meal_Plan:'', + currency:'', + date_type:this.validserv.required, + contract_days:'' + }) + this.GetAllSeason(); + this.GetById(); + // this.disabledDates(); + } + + GetById(){ + this.apiserv.Get('/ExtranetRoomContract/GetExtranetRoomContractById/'+ this.Edit_Id).subscribe(res=>{ + if(res && res.data){ + // this.SetRoomdata(res.data); + let dates_range_arr = res.data['contract_dates'] ? JSON.parse(res.data.contract_dates) : []; + this.Cancellation_contract_Search_Form.get('room_Name').setValue(res.data.room_name); + this.Cancellation_contract_Search_Form.get('rate_Plan').setValue(res.data.rate_plan_name); + this.Cancellation_contract_Search_Form.get('meal_Plan').setValue(res.data.meal_plan_name); + this.Cancellation_contract_Search_Form.get('currency').setValue(res.data.currency_code); + this.GetAllData = res.data; + this.Range_Data = res.data.age_range ? JSON.parse(res.data.age_range) : []; + // this.GetAllData['max_adult_occupancy'] = 3; + dates_range_arr.forEach(date_range=>{ + const startDate = parseISO(date_range.date_from); + const endDate = parseISO(date_range.date_to); + + for (let d = startDate; d <= endDate; d = addDays(d, 1)) { + this.enabledDates.push(d); + } + }); + this.enabledDates.sort((a, b) => new Date(a).getTime() - new Date(b).getTime()); + for(let i=0;i= new Date().getTime()){ + this.Defaultdate = new Date(this.enabledDates[i]); + break; + } + if(this.enabledDates.length -1 == i){ + this.Defaultdate = new Date(this.enabledDates[i]); + } + } + let to_date = new Date(this.enabledDates[0]); + to_date.setMonth(to_date.getMonth()-12) + let from_date = new Date(this.enabledDates[0]); + from_date.setMonth(from_date.getMonth() + 18) + this.DisableDate = this.disabledDates(to_date,from_date) + } + }) + } + disabledDates(to_date,From_date): Date[] { + const start = startOfYear(new Date(to_date)); + const end = endOfYear(new Date(From_date)); + const disabledDates: Date[] = []; + + for (let d = start; d <= end; d.setDate(d.getDate() + 1)) { + if (!this.isDateEnabled(new Date(d))) { + disabledDates.push(new Date(d)); + } + } + + return disabledDates; + } + + isDateEnabled(date: Date): boolean { + return this.enabledDates.some(enabledDate => + isSameDay(date, enabledDate) + ); + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'RoomContract'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + Check_day_type(){ + let daysArr = [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday' + ]; + let value = this.Cancellation_contract_Search_Form.get('contract_days').value; + if(value && value.length > 0 && (value.includes('Select All') || value.length == 7)){ + this.Cancellation_contract_Search_Form.get('contract_days').setValue(daysArr); + this.selectAll = [] + }else { + this.selectAll = ['Select All'] + } + } + Reset(){ + this.Cancellation_contract_Search_Form.reset() + } + + SearchCancellationcontract(){ + if (this.Cancellation_contract_Search_Form.status == "INVALID") { + this.validserv.showValidationsMsg(this.Cancellation_contract_Search_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Cancellation_contract_Search_Form.getRawValue(); + let ReqObj = { + extranet_contract_id:this.Edit_Id, + date_range:[], + contract_days:val.contract_days ? val.contract_days.join(','):'', + } + if(val.date_type == 'SPECIFICDATES'){ + const selectedFromDate = new Date(val.date[0]); + const fromuserTimezoneOffset = selectedFromDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const fromDate = new Date(selectedFromDate.getTime() - fromuserTimezoneOffset); + const selectedToDate = new Date(val.date[1]); + const toUserTimezoneOffset = selectedToDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const toDate = new Date(selectedToDate.getTime() - toUserTimezoneOffset); + ReqObj.date_range.push({ + date_from:fromDate, + date_to:toDate, + }); + }else if(val.date_type == 'SEASON'){ + val.Season_Id.forEach(data => { + let matched_season_by_id = this.AllSeason.find(e => e.extranet_season_id == data); + if (matched_season_by_id) { + if (typeof (matched_season_by_id['date_range']) == 'string') { + let splited_date = matched_season_by_id.date_range.split(', '); + splited_date.forEach((z) => { + ReqObj.date_range.push({ + date_from: new Date(`${z.split(' - ')[0]}T00:00:00.000Z`), + date_to:new Date(`${z.split(' - ')[1]}T00:00:00.000Z`), + }); + }) + } + } + }) + } + this.apiserv.Post('/ExtranetRoomContract/GetAllCancellationPolicy',ReqObj).subscribe(resp=>{ + this.hasResult = true; + if(resp){ + this.Cancellation_contract_Save_Form = this.fb.group({ + Cancellation_Contract_Arr:this.fb.array([]) + }); + if(resp.data){ + this.GetAllContractResp = resp.data; + resp.data.sort((a,b)=>{ + let from_date = new Date(a.contract_date); + let to_date = new Date(b.contract_date) + return from_date.getTime() - to_date.getTime() + }); + let contract_Arr = this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr'] as FormArray; + resp.data.forEach((contract_data,contract_ind)=>{ + let day = this.AllDaysArr.find(e=>e.Value == contract_data.contract_day); + if(contract_ind == 0 || contract_data.contract_date != resp.data[contract_ind -1 ]['contract_date']){ + contract_Arr.push( + this.fb.group({ + Cancel_Array: this.fb.array([]) + }) + ); + this.Validation_Message_Obj.push({ + cancel_type_select:false, + cancel_from_enter:false, + cancel_from_range:false, + cancel_to_enter:false, + cancel_to_range:false, + night_type_select:false, + charge_value_enter:false, + }) + } + let formGroup = contract_Arr.controls[contract_Arr.controls.length - 1]['controls']['Cancel_Array'] as FormArray + formGroup.push(this.fb.group({ + cancel_from: [contract_data.cancel_from,Validators.compose([Validators.required])], + cancel_to: [contract_data.cancel_to,Validators.compose([Validators.required])], + cancellation_type: [contract_data.cancellation_type,Validators.compose([Validators.required])], + contract_date:contract_data.contract_date, + contract_day:day ? day.Key : '', + extranet_cancellation_policy_id:contract_data.extranet_cancellation_policy_id, + contract_type:contract_data.contract_type, + // charge_value:contract_data.charge_value + })); + let formgroup = formGroup.controls[formGroup.length -1] as FormGroup; + if(contract_data.cancellation_type != 'FULLCHARGES'){ + formgroup.addControl(`charge_value`,this.fb.control(contract_data.charge_value, [Validators.required])); + } + if(contract_data.cancellation_type == 'NIGHTCOUNT'){ + formgroup.addControl(`night_type`,this.fb.control(contract_data.night_type, [Validators.required])); + } + if(contract_ind != 0 && contract_data.contract_date == resp.data[contract_ind -1 ]['contract_date']){ + formgroup.get('cancel_from').addValidators([Validators.required,this.AmountRangeValidation(formGroup.controls[formGroup.length -2]?parseInt(formGroup.controls[formGroup.length -2].get('cancel_to').value):'')]) + formgroup.get('cancel_to').addValidators([Validators.required,this.AmountRangeValidation(formGroup.controls[formGroup.length -1]?parseInt(formGroup.controls[formGroup.length -1].get('cancel_from').value):'')]) + } + }); + }else { + this.GetAllContractResp = undefined; + this.commonMasterSer.showMessage(resp.status,resp.message); + } + } + }) + } + private AmountRangeValidation(initialValue): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value || control.value == 0) { + if (initialValue && parseInt(control.value) <= parseInt(initialValue)) { + return { 'range': true }; + } + } + return null; + }; + } + Checkcanceltype(event,i,j){ + let formcontrol = this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][i]['controls']['Cancel_Array']['controls'][j] as FormGroup; + if(event == 'NIGHTCOUNT'){ + formcontrol.addControl('night_type',new FormControl('',Validators.required)); + formcontrol.addControl('charge_value',new FormControl(0,Validators.required)); + } else if(event == 'FULLCHARGES'){ + formcontrol.removeControl('charge_value'); + formcontrol.removeControl('night_type'); + } else { + if(!formcontrol.controls['charge_value']){ + formcontrol.addControl('charge_value',new FormControl(0,Validators.required)); + } + formcontrol.removeControl('night_type'); + } + this.Find_Validation(i) + } + Find_Validation(i){ + let formcontrol = this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][i]['controls']['Cancel_Array']['controls']; + this.Validation_Message_Obj[i] = { + cancel_type_select:false, + cancel_from_enter:false, + cancel_from_range:false, + cancel_to_enter:false, + cancel_to_range:false, + night_type_select:false, + charge_value_enter:false, + } + formcontrol.forEach(formgroup=>{ + if(formgroup.controls['cancellation_type'].hasError('required')){ + this.Validation_Message_Obj[i]['cancel_type_select'] = true; + } + if(formgroup.controls['cancel_from'].hasError('required')){ + this.Validation_Message_Obj[i]['cancel_from_enter'] = true; + } + if(formgroup.controls['cancel_from'].hasError('range')){ + this.Validation_Message_Obj[i]['cancel_from_range'] = true; + } + if(formgroup.controls['cancel_to'].hasError('required')){ + this.Validation_Message_Obj[i]['cancel_to_enter'] = true; + } + if(formgroup.controls['cancel_to'].hasError('range')){ + this.Validation_Message_Obj[i]['cancel_to_range'] = true; + } + if(formgroup.controls['night_type'] && formgroup.controls['night_type'].hasError('required')){ + this.Validation_Message_Obj[i]['night_type_select'] = true; + } + if(formgroup.controls['charge_value'] && formgroup.controls['charge_value'].hasError('required')){ + this.Validation_Message_Obj[i]['charge_value_enter'] = true; + } + }) + } + ChangeFeeMinValue(controlname,min,i,j) { + let min_amt = min; + if(this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][i]['controls']['Cancel_Array']['controls'][j]){ + this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][i]['controls']['Cancel_Array']['controls'][j].get(controlname).clearValidators(); + this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][i]['controls']['Cancel_Array']['controls'][j].get(controlname).addValidators([Validators.required, this.AmountRangeValidation(min_amt)]); + this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][i]['controls']['Cancel_Array']['controls'][j].get(controlname).markAsUntouched(); + this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][i]['controls']['Cancel_Array']['controls'][j].get(controlname).setErrors(null); + this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][i]['controls']['Cancel_Array']['controls'][j].get(controlname).updateValueAndValidity(); + this.Find_Validation(i) + } + } + Copy_first_Block_Ui(){ + let formarray = this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls']; + let copy_Arr = this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr']['controls'][0]['controls']['Cancel_Array']['controls']; + formarray.forEach((fomrgroup,ind)=>{ + if(ind>0){ + fomrgroup.controls['Cancel_Array']['controls'].forEach((arr_data,arr_Ind)=>{ + let copy_group = copy_Arr[arr_Ind].getRawValue(); + arr_data.get('cancellation_type').setValue(copy_group.cancellation_type); + arr_data.get('cancel_from').setValue(copy_group.cancel_from); + arr_data.get('cancel_to').setValue(copy_group.cancel_to); + if(copy_group.cancellation_type != 'FULLCHARGES'){ + if(arr_data.controls['charge_value']){ + arr_data.get('charge_value').setValue(copy_group.charge_value); + }else{ + arr_data.addControl(`charge_value`,this.fb.control(copy_group.charge_value, [Validators.required])); + } + }else if(copy_group.cancellation_type == 'FULLCHARGES'){ + arr_data.removeControl('charge_value'); + } + if(copy_group.cancellation_type == 'NIGHTCOUNT'){ + if(arr_data.controls['night_type']){ + arr_data.get('night_type').setValue(copy_group.night_type); + }else{ + arr_data.addControl(`night_type`,this.fb.control(copy_group.night_type, [Validators.required])); + } + }else { + arr_data.removeControl('night_type'); + } + arr_data.get('cancel_from').addValidators([Validators.required,this.AmountRangeValidation(fomrgroup.controls[arr_Ind -1 ]?parseInt(fomrgroup.controls[arr_Ind -1].get('cancel_to').value):'')]) + arr_data.get('cancel_to').addValidators([Validators.required,this.AmountRangeValidation(arr_data?parseInt(arr_data.get('cancel_from').value):'')]) + }) + } + }) + } + Save(){ + if (this.Cancellation_contract_Save_Form.status == "INVALID") { + this.validserv.showValidationsMsg(this.Cancellation_contract_Save_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr'].getRawValue(); + let reqObjArr = []; + val.forEach(cancellationcontract=>{ + cancellationcontract.Cancel_Array.forEach(cancellation_data=>{ + reqObjArr.push({ + extranet_cancellation_policy_id : cancellation_data.extranet_cancellation_policy_id, + extranet_contract_id : this.Edit_Id, + contract_date : cancellation_data.contract_date, + contract_day : cancellation_data.contract_day, + contract_type : cancellation_data.contract_type, + cancel_from : cancellation_data.cancel_from, + cancel_to : cancellation_data.cancel_to, + cancellation_type : cancellation_data.cancellation_type, + }); + if(cancellation_data.night_type)reqObjArr[reqObjArr.length - 1]['night_type'] = cancellation_data.night_type; + if(cancellation_data.charge_value)reqObjArr[reqObjArr.length - 1]['charge_value'] = parseInt(cancellation_data.charge_value); + }) + }); + this.apiserv.Post('/ExtranetRoomContract/UpdateExtranetCancellationPolicy',reqObjArr).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + } + AddCancellationArr(i,j){ + let contract_Arr = this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr'] as FormArray; + let formGroup = contract_Arr.controls[i]['controls']['Cancel_Array'] as FormArray + formGroup.push(this.fb.group({ + cancel_from: ['',Validators.compose([Validators.required])], + cancel_to: ['',Validators.compose([Validators.required])], + cancellation_type: ['',Validators.compose([Validators.required])], + contract_date:formGroup.controls[0].get('contract_date').value, + contract_day:formGroup.controls[0].get('contract_day').value, + extranet_cancellation_policy_id:'', + contract_type:'', + // charge_value:contract_data.charge_value + })); + let formgroup = formGroup.controls[formGroup.length -1] as FormGroup; + // if(contract_data.cancellation_type != 'FULLCHARGES'){ + // formgroup.addControl(`charge_value`,this.fb.control(contract_data.charge_value, [Validators.required])); + // } + // if(contract_data.cancellation_type == 'NIGHTCOUNT'){ + // formgroup.addControl(`night_type`,this.fb.control(contract_data.night_type, [Validators.required])); + // } + if(formGroup.controls[j].get('cancel_from').value && formGroup.controls[j].get('cancel_to').value){ + formgroup.get('cancel_from').addValidators([Validators.required,this.AmountRangeValidation(formGroup.controls[formGroup.length -2]?parseInt(formGroup.controls[formGroup.length -2].get('cancel_to').value):'')]) + formgroup.get('cancel_to').addValidators([Validators.required,this.AmountRangeValidation(formGroup.controls[formGroup.length -1]?parseInt(formGroup.controls[formGroup.length -1].get('cancel_from').value):'')]) + } + } + RemoveCancellationArr(i,j){ + let contract_Arr = this.Cancellation_contract_Save_Form.controls['Cancellation_Contract_Arr'] as FormArray; + let formGroup = contract_Arr.controls[i]['controls']['Cancel_Array'] as FormArray; + formGroup.removeAt(j); + this.Find_Validation(i); + let formgroup = formGroup.controls[j] as FormGroup; + if(formGroup.controls[j-1]?.get('cancel_from').value && formGroup.controls[j-1]?.get('cancel_to').value || j==0){ + formgroup.get('cancel_from').addValidators([Validators.required,this.AmountRangeValidation(formGroup.controls[formGroup.length -2]?parseInt(formGroup.controls[formGroup.length -2].get('cancel_to').value):'')]) + formgroup.get('cancel_to').addValidators([Validators.required,this.AmountRangeValidation(formGroup.controls[formGroup.length -1]?parseInt(formGroup.controls[formGroup.length -1].get('cancel_from').value):'')]) + formgroup.updateValueAndValidity(); + } + } + + ShowDateTypeFields(event){ + if(event == 'SPECIFICDATES'){ + this.Cancellation_contract_Search_Form.addControl('date', new FormControl('', Validators.compose([Validators.required, this.dateValidation()]))); + this.Cancellation_contract_Search_Form.removeControl('Season_Id'); + }else if(event == 'SEASON'){ + this.Cancellation_contract_Search_Form.addControl('Season_Id',new FormControl('',Validators.required)) + this.Cancellation_contract_Search_Form.removeControl('date'); + }else { + this.Cancellation_contract_Search_Form.removeControl('Season_Id'); + this.Cancellation_contract_Search_Form.removeControl('date'); + } + } + public dateValidation(): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + } + return null; + }; + } + + GetAllSeason(){ + let ReqObj = { + season_name:'', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj).subscribe(res=>{ + if(res){ + this.AllSeason = res.data; + } + }) + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.module.ts new file mode 100644 index 0000000..bda50ef --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-cancellation/hotel-update-cancellation.module.ts @@ -0,0 +1,54 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelUpdateCancellationComponent } from './hotel-update-cancellation.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { CalendarModule } from 'primeng/calendar'; + +const routes: Routes = [ + { + path: 'UpdateCancellationPolicy/:Hotel_Eaxtranet_Id/:RuleId', + component:HotelUpdateCancellationComponent, + }, +] + +@NgModule({ + declarations: [ + HotelUpdateCancellationComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + + ], + exports:[ + HotelUpdateCancellationComponent + ] +}) +export class HotelUpdateCancellationModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.component.html new file mode 100644 index 0000000..ca46bbb --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.component.html @@ -0,0 +1,330 @@ + +
    +
    +
    +

    Update Child Rate

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Select + Specific Dates + Season +
    + Please + select Date type +
    +
    +
    +
    + +
    + + + Please select date greater than from today's date or previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Season

    +
    + +
    +
    +
    + {{data.season_name}} +
    + Please + select Season +
    +
    +
    +
    + + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    + +
    + {{item}} + {{item.Key}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Child Age Range

    +
    + +
    +
    + +
    + {{item.from + ' to ' + item.to}} +
    + Please + select child age range +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +

    Child Pricing

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    Date
    +
    +
    Day
    +
    +
    + 1 Child + +
    +
    +
    + 2 Child + +
    +
    +
    + 3 Child + +
    +
    +
    + 4 Child + +
    +
    +
    + 5 Child + +
    +
    +
    + 6 Child + +
    +
    + {{date_wise_control.get('contract_date').value ? (date_wise_control.get('contract_date').value | date: "dd MMM YYYY") : '' }} + + {{date_wise_control.get('contract_day').value}} + + + + + + + + + + + + +
    No data found
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.component.ts new file mode 100644 index 0000000..911342e --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.component.ts @@ -0,0 +1,308 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { API } from 'src/app/core/services/api.service'; +import { isSameDay, startOfYear, endOfYear, addDays, parseISO } from 'date-fns'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; + +@Component({ + selector: 'hotel-update-child', + templateUrl: './hotel-update-child.component.html', +}) +export class HotelUpdateChildComponent implements OnInit { + Extranet_Hotel_Id; + Edit_Id; + Range_Data; + GetAllContractResp; + GetAllData; + AllSeason; + Defaultdate = new Date(); + selectedDate: Date | null = null; + DisableDate; + selectAll = ['Select All']; + hasResult = false; + enabledDates: Date[] = []; + AllDaysArr = [ + {Key:'Mon',Value:'Monday'}, + {Key:'Tue',Value:'Tuesday'}, + {Key:'Wed',Value:'Wednesday'}, + {Key:'Thu',Value:'Thursday'}, + {Key:'Fri',Value:'Friday'}, + {Key:'Sat',Value:'Saturday'}, + {Key:'Sun',Value:'Sunday'} + ]; + Child_contract_Search_Form:FormGroup; + Child_contract_Save_Form:FormGroup; + + constructor(private activateRoute:ActivatedRoute,private apiserv:API,public validserv:ValidationService,public fb:FormBuilder,public commonMasterSer:CommonFunctionService, + private hotelmanageserv:ManageHotelService,private router:Router) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Child_contract_Search_Form = this.fb.group({ + room_Name:'', + rate_Plan:'', + meal_Plan:'', + currency:'', + contract_days:'', + sequence:this.validserv.required, + date_type:this.validserv.required, + }) + this.GetAllSeason(); + this.GetById(); + // this.disabledDates(); + } + + GetById(){ + this.apiserv.Get('/ExtranetRoomContract/GetExtranetRoomContractById/'+ this.Edit_Id).subscribe(res=>{ + if(res && res.data){ + // this.SetRoomdata(res.data); + let dates_range_arr = res.data['contract_dates'] ? JSON.parse(res.data.contract_dates) : []; + this.Child_contract_Search_Form.get('room_Name').setValue(res.data.room_name); + this.Child_contract_Search_Form.get('rate_Plan').setValue(res.data.rate_plan_name); + this.Child_contract_Search_Form.get('meal_Plan').setValue(res.data.meal_plan_name); + this.Child_contract_Search_Form.get('currency').setValue(res.data.currency_code); + this.GetAllData = res.data; + this.Range_Data = res.data.age_range ? JSON.parse(res.data.age_range) : []; + // this.GetAllData['max_adult_occupancy'] = 3; + dates_range_arr.forEach(date_range=>{ + const startDate = parseISO(date_range.date_from); + const endDate = parseISO(date_range.date_to); + + for (let d = startDate; d <= endDate; d = addDays(d, 1)) { + this.enabledDates.push(d); + } + }); + this.enabledDates.sort((a, b) => new Date(a).getTime() - new Date(b).getTime()); + for(let i=0;i= new Date().getTime()){ + this.Defaultdate = new Date(this.enabledDates[i]); + break; + } + if(this.enabledDates.length -1 == i){ + this.Defaultdate = new Date(this.enabledDates[i]); + } + } + let to_date = new Date(this.enabledDates[0]); + to_date.setMonth(to_date.getMonth()-12) + let from_date = new Date(this.enabledDates[0]); + from_date.setMonth(from_date.getMonth() + 18) + this.DisableDate = this.disabledDates(to_date,from_date) + } + }) + } + disabledDates(to_date,From_date): Date[] { + const start = startOfYear(new Date(to_date)); + const end = endOfYear(new Date(From_date)); + const disabledDates: Date[] = []; + + for (let d = start; d <= end; d.setDate(d.getDate() + 1)) { + if (!this.isDateEnabled(new Date(d))) { + disabledDates.push(new Date(d)); + } + } + + return disabledDates; + } + + isDateEnabled(date: Date): boolean { + return this.enabledDates.some(enabledDate => + isSameDay(date, enabledDate) + ); + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'RoomContract'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + SearchChildcontract(){ + if (this.Child_contract_Search_Form.status == "INVALID") { + this.validserv.showValidationsMsg(this.Child_contract_Search_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Child_contract_Search_Form.getRawValue(); + let ReqObj = { + extranet_contract_id:this.Edit_Id, + date_range:[], + contract_days:val.contract_days ? val.contract_days.join(','):'', + sequence:val.sequence ? parseInt(val.sequence):0, + } + if(val.date_type == 'SPECIFICDATES'){ + const selectedFromDate = new Date(val.date[0]); + const fromuserTimezoneOffset = selectedFromDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const fromDate = new Date(selectedFromDate.getTime() - fromuserTimezoneOffset); + const selectedToDate = new Date(val.date[1]); + const toUserTimezoneOffset = selectedToDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const toDate = new Date(selectedToDate.getTime() - toUserTimezoneOffset); + ReqObj.date_range.push({ + date_from:fromDate, + date_to:toDate, + }); + }else if(val.date_type == 'SEASON'){ + val.Season_Id.forEach(data => { + let matched_season_by_id = this.AllSeason.find(e => e.extranet_season_id == data); + if (matched_season_by_id) { + if (typeof (matched_season_by_id['date_range']) == 'string') { + let splited_date = matched_season_by_id.date_range.split(', '); + splited_date.forEach((z) => { + ReqObj.date_range.push({ + date_from: new Date(`${z.split(' - ')[0]}T00:00:00.000Z`), + date_to:new Date(`${z.split(' - ')[1]}T00:00:00.000Z`), + }); + }) + } + } + }) + } + this.apiserv.Post('/ExtranetRoomContract/GetAllChildRateContract',ReqObj).subscribe(resp=>{ + this.hasResult = true; + if(resp){ + this.GetAllContractResp = resp.data; + this.Child_contract_Save_Form = this.fb.group({ + Copy_Group:this.fb.group({}), + Child_Contract_Arr:this.fb.array([]) + }); + let contract_group = this.Child_contract_Save_Form.controls['Copy_Group'] as FormGroup; + for(let i=1;i<=this.GetAllData['max_child_occupancy'];i++){ + contract_group.addControl(`child_${i}`,new FormControl('')); + } + if(resp.data){ + resp.data.sort((a,b)=>{ + let from_date = new Date(a.contract_date); + let to_date = new Date(b.contract_date) + return from_date.getTime() - to_date.getTime() + }) + resp.data.forEach((contractc_data,ind)=>{ + let formArray = this.Child_contract_Save_Form.controls['Child_Contract_Arr'] as FormArray; + let day = this.AllDaysArr.find(e=>e.Value == contractc_data.contract_day) + formArray.push(this.fb.group({ + contract_date:contractc_data.contract_date, + contract_day:day ? day.Key : '', + extranet_contract_rate_id:contractc_data.extranet_contract_rate_id, + sequence:val.sequence, + })); + for(let i=1;i<=this.GetAllData['max_child_occupancy'];i++){ + let formgroup = formArray.controls[ind] as FormGroup; + formgroup.addControl(`child_${i}`,new FormControl(contractc_data[`child_${i}`])); + } + }) + }else { + this.commonMasterSer.showMessage(resp.status,resp.message); + } + } + }) + } + copycolumn(colname,controlval?){ + let value = controlval ? controlval : this.Child_contract_Save_Form.controls['Child_Contract_Arr']['controls'][0].get(colname).value; + if(controlval === false){ + value = false + } + if(this.GetAllContractResp && this.GetAllContractResp.length > 0){ + for(let i = 0;i { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Child_contract_Save_Form.controls['Child_Contract_Arr'].getRawValue(); + let reqObjArr = []; + val.forEach(childcontract=>{ + reqObjArr.push({ + extranet_contract_rate_id : childcontract.extranet_contract_rate_id, + extranet_contract_id : this.Edit_Id, + contract_date : childcontract.contract_date, + contract_day : childcontract.contract_day, + child_1 : childcontract.child_1 ? parseFloat(childcontract.child_1) : 0, + child_2 : childcontract.child_2 ? parseFloat(childcontract.child_2) : 0, + child_3 : childcontract.child_3 ? parseFloat(childcontract.child_3) : 0, + child_4 : childcontract.child_4 ? parseFloat(childcontract.child_4) : 0, + child_5 : childcontract.child_5 ? parseFloat(childcontract.child_5) : 0, + child_6 : childcontract.child_6 ? parseFloat(childcontract.child_6) : 0, + }) + }); + this.apiserv.Post('/ExtranetRoomContract/UpdateExtranetChildRate',reqObjArr).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + } + Reset(){ + this.Child_contract_Search_Form.reset(); + } + Check_day_type(){ + let daysArr = [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday' + ]; + let value = this.Child_contract_Search_Form.get('contract_days').value; + if(value && value.length > 0 && (value.includes('Select All') || value.length == 7)){ + this.Child_contract_Search_Form.get('contract_days').setValue(daysArr); + this.selectAll = [] + }else { + this.selectAll = ['Select All'] + } + } + + ShowDateTypeFields(event){ + if(event == 'SPECIFICDATES'){ + this.Child_contract_Search_Form.addControl('date', new FormControl('', Validators.compose([Validators.required, this.dateValidation()]))); + this.Child_contract_Search_Form.removeControl('Season_Id'); + }else if(event == 'SEASON'){ + this.Child_contract_Search_Form.addControl('Season_Id',new FormControl('',Validators.required)) + this.Child_contract_Search_Form.removeControl('date'); + }else { + this.Child_contract_Search_Form.removeControl('Season_Id'); + this.Child_contract_Search_Form.removeControl('date'); + } + } + public dateValidation(): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + } + return null; + }; + } + + GetAllSeason(){ + let ReqObj = { + season_name:'', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj).subscribe(res=>{ + if(res){ + this.AllSeason = res.data; + } + }) + } +} + diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.module.ts new file mode 100644 index 0000000..d978efd --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-child/hotel-update-child.module.ts @@ -0,0 +1,56 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelUpdateChildComponent } from './hotel-update-child.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { CalendarModule } from 'primeng/calendar'; +import { Routes, RouterModule } from '@angular/router'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: 'UpdateChildRate/:Hotel_Eaxtranet_Id/:RuleId', + component:HotelUpdateChildComponent, + }, +] + +@NgModule({ + declarations: [ + HotelUpdateChildComponent, + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + TooltipModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + + ], + exports:[ + HotelUpdateChildComponent + ] +}) +export class HotelUpdateChildModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.component.html new file mode 100644 index 0000000..af0047c --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.component.html @@ -0,0 +1,51 @@ + +
    +
    +
    +

    Update Meal Add-On

    +
    +
    +
    +
    +
    +
    + Meal Add On +
    +
    +
    +
    + + + +
    +
    +
    +

    Meals

    +
    + +
    +
    +
    + {{data.addon_name}} +
    + Please + select meals +
    +
    +
    +
    +
    + +
    +
    diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.component.ts new file mode 100644 index 0000000..96d893f --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.component.ts @@ -0,0 +1,83 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { API } from 'src/app/core/services/api.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; + +@Component({ + selector: 'hotel-update-meal-add-on', + templateUrl: './hotel-update-meal-add-on.component.html', +}) +export class HotelUpdateMealAddOnComponent implements OnInit { + + Extranet_Hotel_Id; + Edit_Id; + AllMeal; + MealUpdateForm:FormGroup; + constructor(private activateRoute:ActivatedRoute,private apiserv:API,public validserv:ValidationService,public fb:FormBuilder,public commonMasterSer:CommonFunctionService, + private hotelmanageserv:ManageHotelService,private router:Router) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.MealUpdateForm = this.fb.group({ + is_meal_addon_applicable:false + }) + this.GetAllMeal(); + this.GetById(); + } + GetAllMeal(){ + this.apiserv.Get('/ExtranetMealAddon/GetAllExtranetMealAddonByOrg/'+ this.Extranet_Hotel_Id).subscribe(resp=>{ + if(resp && resp.data){ + this.AllMeal = resp.data; + } + }) + } + MealHideShow(check){ + if(check){ + this.MealUpdateForm.addControl('extranet_meal_addon_id',new FormControl('',Validators.required)) + }else { + this.MealUpdateForm.removeControl('extranet_meal_addon_id'); + } + } + GetById(){ + this.apiserv.Get('/ExtranetRoomContract/GetExtranetRoomContractById/'+ this.Edit_Id).subscribe(res=>{ + if(res && res.data){ + this.MealUpdateForm.get('is_meal_addon_applicable').setValue(res.data.is_meal_addon_applicable); + if(res.data.is_meal_addon_applicable){ + this.MealHideShow(res.data.is_meal_addon_applicable); + this.MealUpdateForm.get('extranet_meal_addon_id').setValue((res.data.extranet_meal_addon_id.split(','))); + + } + } + }) + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'RoomContract'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + Save(){ + if (this.MealUpdateForm.status == "INVALID") { + this.validserv.showValidationsMsg(this.MealUpdateForm); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.MealUpdateForm.getRawValue(); + let reqObj = { + extranet_contract_id : this.Edit_Id, + is_meal_addon_applicable : val.is_meal_addon_applicable, + extranet_meal_addon_id : val.extranet_meal_addon_id ? val.extranet_meal_addon_id.join(',') : '', + } + this.apiserv.Post('/ExtranetRoomContract/UpdateExtranetMealAddOn',reqObj).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.module.ts new file mode 100644 index 0000000..b7818e1 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-meal-add-on/hotel-update-meal-add-on.module.ts @@ -0,0 +1,54 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelUpdateMealAddOnComponent } from './hotel-update-meal-add-on.component'; +import { CalendarModule } from 'primeng/calendar'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; + +const routes: Routes = [ + { + path: 'UpdateMealAddOn/:Hotel_Eaxtranet_Id/:RuleId', + component: HotelUpdateMealAddOnComponent, + }, +] + +@NgModule({ + declarations: [ + HotelUpdateMealAddOnComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + + ], + exports:[ + HotelUpdateMealAddOnComponent + ] +}) +export class HotelUpdateMealAddOnModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.component.html b/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.component.html new file mode 100644 index 0000000..9a88aee --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.component.html @@ -0,0 +1,186 @@ + +
    +
    +
    +

    Update Nationality

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality Type

    +
    + +
    +
    +
    + Select + Include + Exclude +
    + Please + select nationality type +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality Applicability

    +
    + +
    +
    +
    + Select + {{data.Label}} +
    + Please + select nationality applicalbility +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select nationality +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence Type

    +
    + +
    +
    +
    + Select + Include + Exclude +
    + Please + select residence type +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence Applicability

    +
    + +
    +
    +
    + Select + {{data.Label}} +
    + Please + select residence applicalbility +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select residence +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.component.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.component.ts new file mode 100644 index 0000000..d0ac568 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.component.ts @@ -0,0 +1,139 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { API } from 'src/app/core/services/api.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; + +@Component({ + selector: 'hotel-update-nationality', + templateUrl: './hotel-update-nationality.component.html', +}) +export class HotelUpdateNationalityComponent implements OnInit { + + Extranet_Hotel_Id; + Edit_Id; + NationalityForm:FormGroup; + ddLoader = { + Country:false, + Residence:false, + }; + CountryList; + timer; + Nationality_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + Residence_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + + constructor(private activateRoute:ActivatedRoute,private apiserv:API,public validserv:ValidationService,public fb:FormBuilder,public commonMasterSer:CommonFunctionService, + private hotelmanageserv:ManageHotelService,private router:Router) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.NationalityForm = this.fb.group({ + nationality_type:'', + nationality_applicable_type:'', + residence_type:'', + residence_applicable_type:'' + }); + this.GetById(); + } + GetById(){ + this.apiserv.Get('/ExtranetRoomContract/GetExtranetRoomContractById/'+ this.Edit_Id).subscribe(res=>{ + if(res && res.data){ + + this.NationalityForm.get('nationality_type').setValue(res.data.nationality_type); + this.NationalityForm.get('nationality_applicable_type').setValue(res.data.nationality_applicable_type); + if(res.data.nationality_applicable_type == 'SPECIFIC'){ + this.NationalityShowhide(res.data.nationality_applicable_type); + this.NationalityForm.get('nationality').setValue((res.data.nationality.split(','))); + this.CountryList = res.data.country ? JSON.parse(res.data.country) : []; + } + this.NationalityForm.get('residence_type').setValue(res.data.residence_type); + this.NationalityForm.get('residence_applicable_type').setValue(res.data.residence_applicable_type); + if(res.data.residence_applicable_type == 'SPECIFIC'){ + this.ResidenceShowhide(res.data.residence_applicable_type); + this.NationalityForm.get('residence').setValue((res.data.residence.split(','))); + this.CountryList = res.data.country ? JSON.parse(res.data.country) : []; + } + } + }) + } + NationalityShowhide(event){ + if(event == 'SPECIFIC'){ + this.NationalityForm.addControl('nationality',new FormControl('',Validators.required)) + }else{ + this.NationalityForm.removeControl('nationality'); + } + } + NationalityTypeCheck(event){ + if(event == 'INCLUDE'){ + this.Nationality_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + }else{ + this.Nationality_type = [{Label:'Specific',Value:'SPECIFIC'}]; + if(this.NationalityForm.controls['nationality_applicable_type'].value == 'ALL'){ + this.NationalityForm.get('nationality_applicable_type').setValue(''); + } + } + } + getCountryList(event,name) { + if (event.value.length >= 2) { + this.ddLoader[name] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGet(`/MasterSearch/GetAllCountry/en/${event.value}`).subscribe(res => { + if (res) { + this.CountryList = res; + this.ddLoader[name] = false; + } + }); + }, 500); + } + } + Save(){ + if (this.NationalityForm.status == "INVALID") { + this.validserv.showValidationsMsg(this.NationalityForm); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.NationalityForm.getRawValue(); + let reqObj = { + extranet_contract_id : this.Edit_Id, + nationality_type : val.nationality_type ? val.nationality_type : '', + nationality_applicable_type : val.nationality_applicable_type ? val.nationality_applicable_type : '', + nationality : val.nationality ? val.nationality.join(',') : '', + residence_type:val.residence_type, + residence_applicable_type:val.residence_applicable_type, + residence:val.residence_applicable_type == 'SPECIFIC' ? val.residence.join(',') : '', + } + this.apiserv.Post('/ExtranetRoomContract/UpdateExtranetNationality',reqObj).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'RoomContract'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + ResidenceTypeCheck(event){ + if(event == 'INCLUDE'){ + this.Residence_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + }else{ + this.Residence_type = [{Label:'Specific',Value:'SPECIFIC'}]; + if(this.NationalityForm.controls['residence_applicable_type'].value == 'ALL'){ + this.NationalityForm.get('residence_applicable_type').setValue(''); + } + } + } + ResidenceShowhide(event){ + if(event == 'SPECIFIC'){ + this.NationalityForm.addControl('residence',new FormControl('',Validators.required)) + }else{ + this.NationalityForm.removeControl('residence'); + } + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.module.ts b/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.module.ts new file mode 100644 index 0000000..74b5e92 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/hotel-update-nationality/hotel-update-nationality.module.ts @@ -0,0 +1,54 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HotelUpdateNationalityComponent } from './hotel-update-nationality.component'; +import { CalendarModule } from 'primeng/calendar'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { Routes, RouterModule } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; + +const routes: Routes = [ + { + path: 'UpdateNationality/:Hotel_Eaxtranet_Id/:RuleId', + component: HotelUpdateNationalityComponent, + }, +] + +@NgModule({ + declarations: [ + HotelUpdateNationalityComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + RouterModule.forChild(routes), + + ], + exports:[ + HotelUpdateNationalityComponent + ] +}) +export class HotelUpdateNationalityModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-add/minimum-stay-add.component.html b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-add/minimum-stay-add.component.html new file mode 100644 index 0000000..056f721 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-add/minimum-stay-add.component.html @@ -0,0 +1,218 @@ + +
    +
    +
    +
    +

    Add Minimum Stay

    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + {{item}} + {{item}} + {{data.room_name + + (data.room_view_name ? ', ' : '') + data.room_view_name}} +
    + Please + select room name +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Select + Specific Dates + Season +
    + Please + select Date type +
    + +
    +
    + +
    +
    +
    + + + Please select date greater than from previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Meals

    +
    + +
    +
    +
    + {{data.season_name}} +
    + + info + + Please + select Season +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Allocation Days

    +
    + +
    +
    +
    + {{item}} + {{item}} +
    + Please + select applicable days +
    +
    +
    +
    + + + Please enter minimum stay +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    {{item.season_name}}
    +
    +

    {{date}}

    +
    +
    +
    + + + +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-add/minimum-stay-add.component.ts b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-add/minimum-stay-add.component.ts new file mode 100644 index 0000000..bf04b91 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-add/minimum-stay-add.component.ts @@ -0,0 +1,328 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators, FormArray, FormControl, ValidatorFn, AbstractControl } from '@angular/forms'; +import { Router, ActivatedRoute } from '@angular/router'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import * as moment from 'moment'; +import { forkJoin } from 'rxjs'; +import { API } from 'src/app/core/services/api.service'; +import { BreakpointsService } from 'src/app/core/services/breakpoints.services'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; + + +@Component({ + selector: 'app-minimum-stay-add', + templateUrl: './minimum-stay-add.component.html', +}) +export class MinimumStayAddComponent implements OnInit{ + + Extranet_Hotel_Id; + Edit_Id; + IsMobile; + SelectAllRoom = []; + ClearAllRoom = []; + AllRoomsData; + displayPosition: boolean; + position: string; + Season_List = []; + AllSeason; + MinDate = new Date(); + MinStayForm: FormGroup; + AllDaysArr = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']; + SelectAllVal = ["Select All"]; + DaysArrValue = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']; + SelectAll=["Select All"]; + + constructor( + public activateRoute:ActivatedRoute, + private router:Router, + private hotelmanageserv:ManageHotelService, + private fb:FormBuilder, + public validserv:ValidationService, + private apiserv:API, + public brkpointsrv:BreakpointsService, + private commonMasterSer:CommonFunctionService + ) {} + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.InitForm(); + this.getAllData(); + this.IsMobile = this.brkpointsrv.IsMobile.getValue(); + + } + + showPositionDialog(position) { + this.position = position; + this.displayPosition = true; + }; + + InitForm(){ + this.MinStayForm = this.fb.group({ + extranet_room_min_stay_id: '', + extranet_room_id: this.validserv.required, + date_type:this.validserv.required, + ApplicableDays:this.fb.array([ + this.fb.group({ + applicable_days:this.validserv.required, + min_stay:this.validserv.required, + extranet_room_min_stay_id:'' + }) + ]) + }) + } + + getAllData(){ + forkJoin( + this.GetAllRooms(), + this.GetAllSeason() + ).subscribe(res=>{ + if(res && res.length > 0){ + this.AllRoomsData = res[0] ? res[0].data : []; + if(res[0].data){ + this.SelectAllRoom = ['Select All']; + } + this.AllSeason = res[1].data ? res[1].data : []; + } + }); + } + GetAllRooms(){ + let ReqObj = { + extranet_hotel_id : this.Extranet_Hotel_Id, + extranet_room_id : '', + room_name : '', + room_view_name : '', + } + return this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetHotelRoomName',ReqObj) + } + GetAllSeason(){ + let ReqObj = { + season_name:'', + hotel_id:this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj) + } + + SeasonDataAddRemove(){ + this.Season_List = []; + let selected_season = this.MinStayForm.controls['Season_Id'].value; + selected_season.forEach(data=>{ + let matched_season_by_id = this.AllSeason.find(e=>e.extranet_season_id == data); + if(matched_season_by_id){ + if(typeof(matched_season_by_id['date_range']) == 'string'){ + matched_season_by_id['date_range'] = matched_season_by_id.date_range.split(', '); + matched_season_by_id['date_range'].forEach((z,i)=>{ + matched_season_by_id['date_range'][i] = moment(z.split(' - ')[0]).format('DD MMM YYYY') + ' to ' + moment(z.split(' - ')[1]).format('DD MMM YYYY') + }) + } + this.Season_List.push(matched_season_by_id); + console.log(this.Season_List) + } + }) + } + + backClick(){ + this.hotelmanageserv.Active_tab = 'MinimumStay'; + this.router.navigateByUrl("/Services/Hotel/HotelManage/" + this.Extranet_Hotel_Id); + } + ShowDateTypeFields(event){ + this.Season_List = []; + if(event == 'SPECIFICDATES'){ + this.MinStayForm.addControl('ContractDatesArr',new FormArray([this.fb.group({ + date:['', Validators.compose([Validators.required, this.dateValidation(new Date())])], + })])); + this.MinStayForm.removeControl('Season_Id'); + }else if(event == 'SEASON'){ + this.MinStayForm.addControl('Season_Id',new FormControl('',Validators.required)) + this.MinStayForm.removeControl('ContractDatesArr'); + }else { + this.MinStayForm.removeControl('Season_Id'); + this.MinStayForm.removeControl('ContractDatesArr'); + } + } + public dateValidation(toDate): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + if (toDate && control.value.length <= 1 || control.value[0] <= toDate) { + return { 'range': true }; + } + } + return null; + }; + } + removeDate(index) { + let formArray = this.MinStayForm.controls['ContractDatesArr'] as FormArray; + formArray.removeAt(index); + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if (formArray.length > 0) { + if(index > 0){ + let formdate = formArray.controls[index - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + if (formArray.controls.length >= (index + 1)) { + formArray.controls[index].get("date").clearValidators(); + formArray.controls[index].get("date").setErrors(null); + formArray.controls[index].get("date").addValidators([Validators.required,this.dateValidation(currentDate)]); + // formArray.controls[index].get("date").markAsTouched(); + formArray.controls[index].get("date").updateValueAndValidity(); + // formArray.controls[index].get("date").markAsTouched(); + } + } + } + addDate() { + let formArray = this.MinStayForm.controls['ContractDatesArr'] as FormArray; + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if(formArray.length > 0){ + if (formArray.length > 0) { + let formdate = formArray.controls[formArray.length - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + formArray.push(this.fb.group({ + extranet_season_detail_id:'', + date: ['', Validators.compose([ + Validators.required, + this.dateValidation(currentDate) + ])] + })); + } + } + CloseCalender(element, index) { + let formArray = this.MinStayForm.controls['ContractDatesArr']['controls']; + if (element.value[0] && element.value[1]) { + element.overlayVisible = false; + element.datepickerClick = true; + if (formArray.length >= (index + 2)) { + formArray[index + 1].get("date").clearValidators(); + formArray[index + 1].get("date").setErrors(null); + formArray[index + 1].get("date").addValidators([Validators.required,this.dateValidation(element.value[1])]); + formArray[index + 1].get("date").markAsTouched(); + formArray[index + 1].get("date").updateValueAndValidity(); + formArray[index + 1].get("date").markAsTouched(); + } + } + } + ChangeinWeekDays(i?,event?){ + let selected_days_by_room = []; + let formdata = this.MinStayForm.controls['ApplicableDays'].value; + if(event?.includes('Select All')){ + formdata[i].applicable_days.splice(formdata[i].applicable_days.indexOf('Select All'), 1); + this.DaysArrValue.forEach(days_val=>{ + formdata[i].applicable_days.push(days_val); + }) + this.MinStayForm.controls['ApplicableDays']['controls'][i]['controls']['applicable_days'].setValue(formdata[i].applicable_days); + } + formdata.forEach(e=>{ + if(e.applicable_days && e.applicable_days.length > 0){ + e.applicable_days.forEach(days=>{ + selected_days_by_room.push(days); + }) + } + }) + this.DaysArrValue = this.AllDaysArr.filter(item => !selected_days_by_room.includes(item)); + if(this.DaysArrValue.length == 0){ + this.SelectAllVal = [] + }else { + this.SelectAllVal = this.SelectAll; + } + } + + AddAllocationDays(){ + let formArray = this.MinStayForm.controls['ApplicableDays'] as FormArray; + formArray.push(this.fb.group({ + applicable_days:this.validserv.required, + min_stay:this.validserv.required, + extranet_room_min_stay_id:'' + })); + } + RemoveAllocation(i){ + let formArray = this.MinStayForm.controls['ApplicableDays'] as FormArray; + formArray.removeAt(i); + this.ChangeinWeekDays(); + } + Save(){ + if (this.MinStayForm.status == "VALID") { + let val = this.MinStayForm.getRawValue(); + let PostObj = { + extranet_room_id:val.extranet_room_id ? val.extranet_room_id.join(',') : '', + extranet_hotel_id:this.Extranet_Hotel_Id, + date_ranges:'', + extranet_room_min_stay:[] + }; + if(val.date_type == 'SPECIFICDATES'){ + let date_Arr = []; + val.ContractDatesArr.forEach(data=>{ + date_Arr.push({ + date_from: moment(data.date[0]).format('YYYY-MM-DD'), + date_to: moment(data.date[1]).format('YYYY-MM-DD'), + }) + }); + PostObj['date_ranges'] = JSON.stringify(date_Arr); + } + if(val.date_type == 'SEASON'){ + let date_Arr = []; + this.Season_List.forEach(data=>{ + data.date_range.forEach(season_date=>{ + date_Arr.push({ + date_from: moment(season_date.split(' to ')[0]).format('YYYY-MM-DD'), + date_to: moment(season_date.split(' to ')[1]).format('YYYY-MM-DD'), + }) + }) + }); + PostObj['date_ranges'] = JSON.stringify(date_Arr); + } + val.ApplicableDays.forEach(allocation_data=>{ + PostObj.extranet_room_min_stay.push({ + applicable_days:allocation_data.applicable_days ? allocation_data.applicable_days.join(',') : '', + min_stay:allocation_data.min_stay ? allocation_data.min_stay : "", + extranet_room_min_stay_id:allocation_data.extranet_room_min_stay_id ? allocation_data.extranet_room_min_stay_id : '', + }) + }); + + this.apiserv.Post('/ExtranetMinStay/SaveExtranetMinStay',PostObj).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.backClick() : ''; + } + }) + }else { + this.validserv.showValidationsMsg(this.MinStayForm); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + } + } + + SelectAndRemoveAllRoom(){ + const contract_id = this.MinStayForm.get('extranet_room_id').value + if (contract_id && contract_id.length > 0 && (contract_id.includes('Select All') || contract_id.length == this.AllRoomsData.length) && !contract_id.includes('Clear All')) { + let room_id_List = [] + this.AllRoomsData.forEach(d=>{ + room_id_List.push(d.extranet_room_id) + }); + this.MinStayForm.get('extranet_room_id').setValue(room_id_List); + this.SelectAllRoom = []; + this.ClearAllRoom = ['Clear All']; + } else if (contract_id && contract_id.length > 0 && (contract_id.includes('Clear All'))){ + this.MinStayForm.get('extranet_room_id').setValue([]); + this.SelectAllRoom = ['Select All']; + this.ClearAllRoom = []; + } else { + this.SelectAllRoom = ['Select All']; + if(contract_id?.length > 0){ + this.ClearAllRoom = ['Clear All']; + } + } + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-view/minimum-stay-view.component.html b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-view/minimum-stay-view.component.html new file mode 100644 index 0000000..d9fa001 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-view/minimum-stay-view.component.html @@ -0,0 +1,138 @@ +
    +
    +
    +

    Minimum Stay

    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + {{data.room_name + (data.room_view_name ? ', ' : '') + data.room_view_name}} +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Room ID + + + + Room Name + + + + Minimum Stay Date Range + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + {{data.extranet_room_id}} + {{data.room_name}} + {{item}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + +
    + + +
    + + + No data found + + +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-view/minimum-stay-view.component.ts b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-view/minimum-stay-view.component.ts new file mode 100644 index 0000000..8365577 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay-view/minimum-stay-view.component.ts @@ -0,0 +1,92 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'minimum-stay-view', + templateUrl: './minimum-stay-view.component.html', +}) +export class MinimumStayViewComponent implements OnInit{ + Extranet_Hotel_Id; + AllRoomsData; + Room_Id; + Result; + cols; + constructor( + public activateRoute:ActivatedRoute, + public apiserv:API, + public _commonService:CommonFunctionService, + public router:Router + ) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.GetAllRooms() + this.cols = [ + { field: 'extranet_room_id', header: 'Room Id' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'date_range_arr', header: 'Minimum Stay Date Range' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_updated_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + } + GetAllRooms(){ + let ReqObj = { + extranet_hotel_id : this.Extranet_Hotel_Id, + extranet_room_id : '', + room_name : '', + room_view_name : '', + } + this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetHotelRoomName',ReqObj).subscribe(res=>{ + this.AllRoomsData = res ? res.data : []; + }) + } + + Search(){ + let ReqObj = { + extranet_room_id:this.Room_Id ? this.Room_Id : '', + extranet_hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetMinStay/GetAllExtranetRoomMinStay',ReqObj).subscribe(res=>{ + if(res){ + this.Result = res.data ? res.data : []; + if(res.data){ + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['date_range_arr'] = e['date_ranges'] ? JSON.parse(e['date_ranges']) : []; + if(typeof(e['date_range_arr']) != 'string'){ + e.date_range_arr.forEach((data,ind)=>{ + e.date_range_arr[ind] = moment(data.date_from).format('DD MMM YYYY') + ' - ' + moment(data.date_to).format('DD MMM YYYY'); + }) + } + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + + Edit(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/EditMinStay/${this.Extranet_Hotel_Id}/${Id}`); + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.component.html b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.component.html new file mode 100644 index 0000000..ba2e56c --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.component.html @@ -0,0 +1 @@ + diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.component.ts b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.component.ts new file mode 100644 index 0000000..148fab8 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'minimum-stay', + templateUrl: './minimum-stay.component.html', +}) +export class MinimumStayComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.module.ts b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.module.ts new file mode 100644 index 0000000..69361f3 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/minimum-stay.module.ts @@ -0,0 +1,56 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { MinimumStayAddComponent } from './minimum-stay-add/minimum-stay-add.component'; +import { MinimumStayViewComponent } from './minimum-stay-view/minimum-stay-view.component'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { MatButtonModule } from '@angular/material/button'; +import { MatMenuModule } from '@angular/material/menu'; +import { InputTextModule } from 'primeng/inputtext'; +import { CalendarModule } from 'primeng/calendar'; +import { MinimumStayComponent } from './minimum-stay.component'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { DialogModule } from 'primeng/dialog'; +import { UpdateMinimumStayComponent } from './update-minimum-stay/update-minimum-stay.component'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: 'AddMinStay/:Hotel_Eaxtranet_Id', + component: MinimumStayAddComponent, + }, + { + path: 'EditMinStay/:Hotel_Eaxtranet_Id/:RuleId', + component:UpdateMinimumStayComponent, + }, +] + +@NgModule({ + declarations: [ + MinimumStayComponent, + MinimumStayViewComponent, + MinimumStayAddComponent, + UpdateMinimumStayComponent + ], + imports: [ + CommonModule, + NgSelectModule, + TableModule, + MatButtonModule, + ToolbarModule, + MatMenuModule, + FormsModule, + TooltipModule, + ReactiveFormsModule, + DialogModule, + InputTextModule, + CalendarModule, + RouterModule.forChild(routes), + ], + exports:[ + MinimumStayComponent + ] +}) +export class MinimumStayModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/update-minimum-stay/update-minimum-stay.component.html b/src/app/modules/services/hotel/hotel-manage/minimum-stay/update-minimum-stay/update-minimum-stay.component.html new file mode 100644 index 0000000..08f231b --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/update-minimum-stay/update-minimum-stay.component.html @@ -0,0 +1,208 @@ + +
    +
    +
    +

    Update Minimum Stay

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Select + Specific Dates + Season +
    + Please + select Date type +
    +
    +
    +
    + +
    + + + Please select date greater than from today's date or previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Season

    +
    + +
    +
    +
    + {{data.season_name}} +
    + Please + select Season +
    +
    +
    +
    + + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    + +
    + {{item}} + {{item.Key}} +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +

    Minimum Stay

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + +
    +
    +
    Date
    +
    +
    Day
    +
    +
    + Min Stay + +
    +
    + {{date_wise_control.get('contract_date').value ? (date_wise_control.get('contract_date').value | date: "dd MMM YYYY") : '' }} + + {{date_wise_control.get('contract_day').value}} + + +
    No data found
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/minimum-stay/update-minimum-stay/update-minimum-stay.component.ts b/src/app/modules/services/hotel/hotel-manage/minimum-stay/update-minimum-stay/update-minimum-stay.component.ts new file mode 100644 index 0000000..b386a58 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/minimum-stay/update-minimum-stay/update-minimum-stay.component.ts @@ -0,0 +1,298 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { API } from 'src/app/core/services/api.service'; +import { isSameDay, startOfYear, endOfYear, addDays, parseISO } from 'date-fns'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import * as moment from 'moment'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; + +@Component({ + selector: 'app-update-minimum-stay', + templateUrl: './update-minimum-stay.component.html', +}) +export class UpdateMinimumStayComponent implements OnInit { + Extranet_Hotel_Id; + Edit_Id; + GetAllContractResp; + GetAllData; + Defaultdate = new Date(); + selectedDate: Date | null = null; + DisableDate; + selectAll = ['Select All']; + hasResult = false; + AllSeason; + enabledDates: Date[] = []; + AllDaysArr = [ + {Key:'Mon',Value:'Monday'}, + {Key:'Tue',Value:'Tuesday'}, + {Key:'Wed',Value:'Wednesday'}, + {Key:'Thu',Value:'Thursday'}, + {Key:'Fri',Value:'Friday'}, + {Key:'Sat',Value:'Saturday'}, + {Key:'Sun',Value:'Sunday'} + ]; + Minimum_stay_Search_Form:FormGroup; + Minimum_stay_Save_Form:FormGroup; + + constructor(private activateRoute:ActivatedRoute,private apiserv:API,public validserv:ValidationService,public fb:FormBuilder,public commonMasterSer:CommonFunctionService, + private hotelmanageserv:ManageHotelService,private router:Router) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Minimum_stay_Search_Form = this.fb.group({ + room_Name:'', + room_Id:'', + date_type:this.validserv.required, + contract_days:'' + }); + this.GetAllSeason(); + this.GetById(); + // this.disabledDates(); + } + + GetById(){ + this.apiserv.Get('/ExtranetMinStay/GetExtranetRoomMinStayById/'+ this.Edit_Id).subscribe(res=>{ + if(res && res.data){ + // this.SetRoomdata(res.data); + let dates_range_arr = res.data['date_ranges'] ? JSON.parse(res.data.date_ranges) : []; + this.Minimum_stay_Search_Form.get('room_Name').setValue(res.data.room_name); + this.Minimum_stay_Search_Form.get('room_Id').setValue(res.data.extranet_room_id); + this.GetAllData = res.data; + // this.GetAllData['max_adult_occupancy'] = 3; + dates_range_arr.forEach(date_range=>{ + const startDate = parseISO(date_range.date_from); + const endDate = parseISO(date_range.date_to); + + for (let d = startDate; d <= endDate; d = addDays(d, 1)) { + this.enabledDates.push(d); + } + }); + this.enabledDates.sort((a, b) => new Date(a).getTime() - new Date(b).getTime()); + for(let i=0;i= new Date().getTime()){ + this.Defaultdate = new Date(this.enabledDates[i]); + break; + } + if(this.enabledDates.length -1 == i){ + this.Defaultdate = new Date(this.enabledDates[i]); + } + } + let to_date = new Date(this.enabledDates[0]); + to_date.setMonth(to_date.getMonth()-12) + let from_date = new Date(this.enabledDates[0]); + from_date.setMonth(from_date.getMonth() + 18) + this.DisableDate = this.disabledDates(to_date,from_date) + } + }) + } + disabledDates(to_date,From_date): Date[] { + const start = startOfYear(new Date(to_date)); + const end = endOfYear(new Date(From_date)); + const disabledDates: Date[] = []; + + for (let d = start; d <= end; d.setDate(d.getDate() + 1)) { + if (!this.isDateEnabled(new Date(d))) { + disabledDates.push(new Date(d)); + } + } + + return disabledDates; + } + + isDateEnabled(date: Date): boolean { + return this.enabledDates.some(enabledDate => + isSameDay(date, enabledDate) + ); + } + BackButton(){ + this.hotelmanageserv.Active_tab = 'MinimumStay'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + SearchAdultcontract(){ + if (this.Minimum_stay_Search_Form.status == "INVALID") { + this.validserv.showValidationsMsg(this.Minimum_stay_Search_Form); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Minimum_stay_Search_Form.getRawValue(); + let ReqObj = { + extranet_room_id:val.room_Id, + date_range:[], + extranet_hotel_id:this.Extranet_Hotel_Id, + days:val.contract_days ? val.contract_days.join(','):'', + } + if(val.date_type == 'SPECIFICDATES'){ + const selectedFromDate = new Date(val.date[0]); + const fromuserTimezoneOffset = selectedFromDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const fromDate = new Date(selectedFromDate.getTime() - fromuserTimezoneOffset); + const selectedToDate = new Date(val.date[1]); + const toUserTimezoneOffset = selectedToDate.getTimezoneOffset() * 60000; // Convert minutes to milliseconds + const toDate = new Date(selectedToDate.getTime() - toUserTimezoneOffset); + ReqObj.date_range.push({ + date_from:fromDate, + date_to:toDate, + }); + }else if(val.date_type == 'SEASON'){ + val.Season_Id.forEach(data => { + let matched_season_by_id = this.AllSeason.find(e => e.extranet_season_id == data); + if (matched_season_by_id) { + if (typeof (matched_season_by_id['date_range']) == 'string') { + let splited_date = matched_season_by_id.date_range.split(', '); + splited_date.forEach((z) => { + ReqObj.date_range.push({ + date_from: new Date(`${z.split(' - ')[0]}T00:00:00.000Z`), + date_to:new Date(`${z.split(' - ')[1]}T00:00:00.000Z`), + }); + }) + } + } + }) + } + this.apiserv.Post('/ExtranetMinStay/GetUpdateMinStay',ReqObj).subscribe(resp=>{ + this.hasResult = true; + if(resp){ + this.GetAllContractResp = resp.data; + this.Minimum_stay_Save_Form = this.fb.group({ + Copy_Group:this.fb.group({ + min_stay:'', + }), + Adult_Contract_Arr:this.fb.array([]) + }); + let contract_group = this.Minimum_stay_Save_Form.controls['Copy_Group'] as FormGroup; + // for(let i=1;i<=this.GetAllData['max_adult_occupancy'];i++){ + // contract_group.addControl(`adult_${i}`,new FormControl('')); + // } + if(resp.data){ + resp.data.sort((a,b)=>{ + let from_date = new Date(a.contract_date); + let to_date = new Date(b.contract_date) + return from_date.getTime() - to_date.getTime() + }) + resp.data.forEach((contractc_data,ind)=>{ + let formArray = this.Minimum_stay_Save_Form.controls['Adult_Contract_Arr'] as FormArray; + let day = this.AllDaysArr.find(e=>e.Value == contractc_data.minstay_day) + formArray.push(this.fb.group({ + min_stay:this.fb.control(contractc_data.min_stay,this.validserv.required), + contract_date:contractc_data.date, + extranet_room_id:contractc_data.extranet_room_id, + contract_day:day ? day.Key : '', + extranet_contract_rate_id:contractc_data.extranet_room_min_stay_id, + })); + // for(let i=1;i<=this.GetAllData['max_adult_occupancy'];i++){ + // let formgroup = formArray.controls[ind] as FormGroup; + // formgroup.addControl(`adult_${i}`,new FormControl(contractc_data[`adult_${i}`])); + // } + }) + }else { + this.commonMasterSer.showMessage(resp.status,resp.message); + } + } + }) + } + copycolumn(colname,controlval?){ + let value = controlval ? controlval : this.Minimum_stay_Save_Form.controls['Adult_Contract_Arr']['controls'][0].get(colname).value; + if(this.GetAllContractResp && this.GetAllContractResp.length > 0){ + for(let i = 0;i { + this.validserv.scrollToError(); + }, 50); + return; + } + let val = this.Minimum_stay_Save_Form.controls['Adult_Contract_Arr'].getRawValue(); + let reqObjArr = []; + val.forEach(adultcontract=>{ + reqObjArr.push({ + extranet_room_min_stay_id : adultcontract.extranet_contract_rate_id, + extranet_room_id : adultcontract.extranet_room_id, + date : adultcontract.contract_date, + minstay_day : adultcontract.contract_day, + min_stay : adultcontract.min_stay ? adultcontract.min_stay :'' + }) + }); + this.apiserv.Post('/ExtranetMinStay/UpdateExtranetMinStay',reqObjArr).subscribe(resp=>{ + if(resp){ + this.commonMasterSer.showMessage(resp.status,resp.message); + resp.status ? this.BackButton() : ''; + } + }) + } + Reset(){ + this.Minimum_stay_Search_Form.reset(); + } + Check_day_type(){ + let daysArr = [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday' + ]; + let value = this.Minimum_stay_Search_Form.get('contract_days').value; + if(value && value.length > 0 && (value.includes('Select All') || value.length == 7)){ + this.Minimum_stay_Search_Form.get('contract_days').setValue(daysArr); + this.selectAll = [] + }else { + this.selectAll = ['Select All'] + } + } + + ShowDateTypeFields(event){ + if(event == 'SPECIFICDATES'){ + this.Minimum_stay_Search_Form.addControl('date', new FormControl('', Validators.compose([Validators.required, this.dateValidation()]))); + this.Minimum_stay_Search_Form.removeControl('Season_Id'); + }else if(event == 'SEASON'){ + this.Minimum_stay_Search_Form.addControl('Season_Id',new FormControl('',Validators.required)) + this.Minimum_stay_Search_Form.removeControl('date'); + }else { + this.Minimum_stay_Search_Form.removeControl('Season_Id'); + this.Minimum_stay_Search_Form.removeControl('date'); + } + } + public dateValidation(): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + } + return null; + }; + } + + GetAllSeason(){ + let ReqObj = { + season_name:'', + hotel_id:this.Extranet_Hotel_Id + } + this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj).subscribe(res=>{ + if(res){ + this.AllSeason = res.data; + } + }) + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/overview/overview.component.html b/src/app/modules/services/hotel/hotel-manage/overview/overview.component.html new file mode 100644 index 0000000..8cb522a --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/overview/overview.component.html @@ -0,0 +1,1622 @@ +
    +
    +
    +

    Overview

    +
    +
    +
    +
    + Hotel Image +
    +

    {{Hotel_Details['hotel_name']}}

    +
    + star + star + star + star + star +
    +
    {{Hotel_Details['address']}}
    +
    +
    +
    +
    Inventory and Pricing Calendar
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + Select + {{data.room_name}}{{data.room_view ? (', ' + + data.room_view) : '' }} +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + Please select date range + + + Please select search rates date + + + Select a date range with a maximum span of 30 days + + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + +
    + + + + +
    +
    Rooms
    +
    +
    + {{Date | date : 'EEE'}} + {{Date | date : 'd'}} + {{Date | date : 'MMM'}} +
    +
    + + + + +
    + {{room_data.room_name}} +
    + +
    + + + + + + + + + + + + + + + + + + +
    +
    + Status +
    +
    +
    +
    +
    + {{status == 'STOPSALE' ? 'Sold Out' : ''}} +
    + + + + + + + +
    +
    +
    +
    + Allocation +
    +
    +
    + + +
    +
    + + +
    +
    + {{allocation.value}} +
    +
    +
    + Net Sold +
    +
    +
    + {{net_sold}} +
    +
    +
    + Available +
    +
    +
    + {{availability}} +
    +
    + + +
    + + + + + +
    +
    +
    + {{contrtact_det.contract_name}} ({{contrtact_det.rate_plan}}, + {{contrtact_det.meal_plan}}) ({{room_data.currency_code}}) +
    +
    + + + + Expand to update rates +
    +
    + + + + Collapse +
    +
    +
    + + + + +
    +
    + {{j+1}} Adult +
    +
    +
    + {{adult_rate_on_date}} +
    +
    + + +
    + Child Age Range: {{contrtact_det.child_age_range_1}} +
    + + + + + + + +
    +
    + {{j+1}} Child +
    +
    +
    + {{adult_rate_on_date}} +
    +
    + + +
    + Child Age Range: {{contrtact_det.child_age_range_2}} +
    + + + + + + + +
    +
    + {{j+1}} Child +
    +
    +
    + {{adult_rate_on_date}} +
    +
    + + + + + + + +
    +
    + No Data Found +
    +
    +
    +
    +
    Rooms
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Room Name + + + + Room View + + + + Max Adult Occupancy + + + + Max Child Occupancy + + + + Max Child Age + + + + Max Total Occupancy + + + + Extrabed Supported + + + + Free Child Allowed + + + + Room Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.room_name}} + {{data.room_view}} + {{data.max_adult_occupancy}} + {{data.max_child_occupancy}} + {{data.max_child_age}} + {{data.max_total_occupancy}} + {{data.is_extra_bed_supported}} + {{data.is_free_child}} + {{data.extranet_room_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + + + + No data found + + +
    +
    +
    +
    +
    +
    Season
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Season Name + + + + Date Range + + + + Season Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.season_name}} + {{item}} + {{data.extranet_season_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    +
    +
    +
    +
    Room Contract
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Contract Status + + + + Contract Id + + + + Contract Name + + + + Room Id + + + + Room Name + + + + Rate Plan + + + + Meal Plan + + + + Nationality Type + + + + Nationality Applicability + + + + Nationality + + + + Date Range/Season + + + + Currency + + + + Meal Add On + + + + Meals + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + + Last updated + + + Action + + + + + + + {{data.status}} + + + {{data.extranet_contract_id}} + {{data.contract_name}} + {{data.extranet_room_id}} + {{data.room_name}} + {{data.rate_plan_name}} + {{data.meal_plan_name}} + {{data.nationality_type}} + {{data.nationality_applicable_type}} + {{data.nationality}} + {{item}} + {{data.currency_code}} + {{data.is_meal_addon_applicable}} + {{data.addon_name}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + {{data.last_updated}} + +
    + + + + + + + + + + + +
    + + +
    + + + No data found + + +
    +
    +
    +
    +
    +
    Allocation
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Room ID + + + + Room Name + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + {{data.extranet_room_id}} + {{data.room_name}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + +
    + + +
    + + + No data found + + +
    +
    +
    +
    +
    +
    Offers
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Offer Name + + + + Offer Type + + + + Room Name + + + + Combinable Offer + + + + Discount Code + + + + Offer days + + + + Offer Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.offer_name}} + {{data.offer_type}} + {{data.room_name}} + {{data.is_combinable_offer}} + {{data.discount_code}} + {{data.offer_days}} + {{data.extranet_offer_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    +
    +
    +
    +
    Supplements
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Supplement Name + + + + Supplement Rate Type + + + + Room Name + + + + Supplement Type + + + + Supplement Dates + + + + Supplement Days + + + + Supplement Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.supplement_name}} + {{data.supplement_rate_type}} + {{data.room_name}} + {{data.supplement_type}} + {{item}} + {{data.supplement_days}} + {{data.extranet_supplement_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    +
    +
    +
    +
    Meal Add-On
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Meal Add-On Name + + + + Meal Plan + + + + Currency + + + + Adult Rate + + + + Paid Child + + + + Meal Add-On Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.addon_name}} + {{data.meal_plan_name}} + {{data.currency}} + {{data.adult_rate}} + {{data.is_paid_child}} + {{data.extranet_meal_addon_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + + + No data found + + +
    +
    +
    +
    +
    +
    Block Dates
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Rule Name + + + + Block Date Type + + + + Dates + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.rule_name}} + {{data.block_date_type}} + {{item}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    +
    +
    +
    +
    Minimum Stay
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Room ID + + + + Room Name + + + + Minimum Stay Date Range + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + {{data.extranet_room_id}} + {{data.room_name}} + {{item}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + +
    + + + + +
    + + +
    + + + No data found + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/overview/overview.component.ts b/src/app/modules/services/hotel/hotel-manage/overview/overview.component.ts new file mode 100644 index 0000000..2d760be --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/overview/overview.component.ts @@ -0,0 +1,1203 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { AbstractControl, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; +import { OverViewData } from 'src/app/core/models/hotelService/OverViewData/RoomsOverView.model'; +@Component({ + selector: 'overview', + templateUrl: './overview.component.html', +}) +export class OverviewComponent implements OnInit { + + SeasonResult; + @ViewChild('tableContainer') tableContainer: ElementRef; + columnWidths: number[] = []; + Extranet_Hotel_Id; + Clone_Room_view; + Allocationcols; + AllocationResult; + timer; + cols; + BlockDateResult; + BlockDateCols; + OverViewDetail; + OverViewObj: OverViewData; + Clone_Room_data; + CloneRoomModal = false; + displayPosition = false; + AllRooms; + MealsResult; + RoomCol; + MinStayResult; + Contract_Results; + OffersResult; + OfferCols; + SupplementResult; + SupplementCols; + SeasonCols; + ContractCols; + MealCols; + Hotel_Details; + MinDate = new Date(); + OverviewForm: FormGroup; + constructor( + public activateRoute: ActivatedRoute, + public apiserv: API, + public _commonService: CommonFunctionService, + public router: Router, + private fb: FormBuilder, + public validserv: ValidationService) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + //room data + this.RoomCol = [ + { field: 'room_name', header: 'Room Name' }, + { field: 'room_view', header: 'Room View' }, + { field: "max_adult_occupancy", header: 'Max Adult Occupancy' }, + { field: 'max_child_occupancy', header: 'Max Child Occupancy' }, + { field: 'max_child_age', header: 'Max Child Age' }, + { field: 'max_total_occupancy', header: 'Max Total Occupancy' }, + { field: 'is_extra_bed_supported', header: 'Extrabed Supported' }, + { field: 'is_free_child', header: 'Free Child Allowed' }, + { field: 'extranet_room_id', header: 'Room Id' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + //season data + this.SeasonCols = [ + { field: 'season_name', header: 'Season Name' }, + { field: 'date_range', header: 'Date Range' }, + { field: 'extranet_season_id', header: 'Season Id' }, + { field: 'updated_by', header: 'Created By' }, + { field: 'Custom_updated_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + { field: 'status', header: 'Status' }, + ]; + //Contract data + this.ContractCols = [ + { field: 'extranet_contract_id', header: 'Contract Id' }, + { field: 'contract_name', header: 'Contract Name' }, + { field: 'extranet_room_id', header: 'Room Id' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'rate_plan_name', header: 'Rate Plan' }, + { field: 'meal_plan_name', header: 'Meal Plan' }, + { field: 'nationality_type', header: 'Nationality Type' }, + { field: 'nationality_applicable_type', header: 'Nationality Applicability' }, + { field: 'nationality', header: 'Nationality' }, + { field: 'date_range', header: 'Date Range/Season' }, + { field: 'currency_code', header: 'Currency' }, + { field: 'is_meal_addon_applicable', header: 'Meal Add On' }, + { field: 'addon_name', header: 'Meals' }, + { field: 'status', header: 'Contract Status' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + { field: 'last_updated', header: 'Last Updated' }, + ]; + //Allocation Data + this.Allocationcols = [ + { field: 'extranet_room_id', header: 'Room Id' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'updated_by', header: 'Created By' }, + { field: 'Custom_updated_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + //Offers data + this.OfferCols = [ + { field: 'offer_name', header: 'Offer Name' }, + { field: 'offer_type', header: 'Offer Type' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'is_combinable_offer', header: 'Combinable Offer' }, + { field: 'discount_code', header: 'Discount Code' }, + { field: 'offer_days', header: 'Offer days' }, + { field: 'status', header: 'Status' }, + { field: 'extranet_offer_id', header: 'Offer Id' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + //Supplement data + this.SupplementCols = [ + { field: 'supplement_name', header: 'Supplement Name' }, + { field: 'supplement_rate_type', header: 'Supplement Rate Type' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'supplement_type', header: 'Supplement Type' }, + { field: 'date_range_arr', header: 'supplement_dates' }, + { field: 'custom_days', header: 'Supplement days' }, + { field: 'extranet_supplement_id', header: 'Supplement Id' }, + { field: 'status', header: 'Status' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' } + ]; + //Meals data + this.MealCols = [ + { field: 'addon_name', header: 'Meal Add-On Name' }, + { field: 'meal_plan_name', header: 'Meal Plan' }, + { field: 'currency', header: 'Currency' }, + { field: 'adult_rate', header: 'Adult Rate' }, + { field: 'currency', header: 'Currency' }, + { field: 'is_paid_child', header: 'Paid Child' }, + { field: 'status', header: 'Status' }, + { field: 'extranet_meal_addon_id', header: 'Meal Add-On Id' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + //Block Dates Data + this.BlockDateCols = [ + { field: 'rule_name', header: 'Rule Name' }, + { field: 'block_date_type', header: 'Block Date Type' }, + { field: 'Custom_from_date', header: 'Date From' }, + { field: 'Custom_to_date', header: 'Date To' }, + { field: 'status', header: 'status' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + //Minimum Stay Data + this.cols = [ + { field: 'extranet_room_id', header: 'Room Id' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'date_range_arr', header: 'Minimum Stay Date Range' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_updated_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + this.Initform(); + this.GetAllData(); + } + GetAllData() { + forkJoin( + this.GetAllRooms(), + this.GetHotelDetails(this.Extranet_Hotel_Id), + this.SearchSeason(), + this.SearchContract(), + this.SearchAllocation(), + this.SearchOffers(), + this.SearchSupplement(), + this.SearchMeals(), + this.SearchBlockDate(), + this.SearchMinStay(), + this.GetOverViewData(), + ).subscribe(res => { + if (res && res.length > 0) { + // Rooms Data + this.AllRooms = res[0].data; + if (res[0]) { + this.AllRooms = res[0].data ? res[0].data : []; + if (res[0].data) { + this.AllRooms.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['is_extra_bed_supported'] = e.is_extra_bed_supported ? 'Yes' : 'No'; + e['is_free_child'] = e.is_free_child ? 'Yes' : 'No'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.AllRooms.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + // Hotel Data + this.Hotel_Details = res[1].data; + if (this.Hotel_Details) { + this.Hotel_Details['thumbnail_image'] = this.Hotel_Details['thumbnail_image'] ? JSON.parse(this.Hotel_Details['thumbnail_image']) : ''; + } + + //Season data + if (res[2]) { + this.SeasonResult = res[2].data ? res[2].data : []; + if (res[2].data) { + this.SeasonResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['date_range'] ? e['date_range'].split(', ') : e['date_range']; + if (typeof (e['date_range_arr']) != 'string') { + e.date_range_arr.forEach((data, ind) => { + e.date_range_arr[ind] = moment(data.split(' - ')[0]).format('DD MMM YYYY') + ' - ' + moment(data.split(' - ')[1]).format('DD MMM YYYY'); + }) + } + }); + this.SeasonResult.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + //contract data + if (res[3]) { + this.Contract_Results = res[3].data ? res[3].data : []; + if (res[3].data) { + this.Contract_Results.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['nationality_type'] = this.getNationalityType(e['nationality_type']) ; + e['nationality_applicable_type'] = this.getNationalityApplicabilityType(e['nationality_applicable_type']) ; + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['contract_dates'] ? JSON.parse(e['contract_dates']) : []; + if (typeof (e['date_range_arr']) != 'string') { + e.date_range_arr.forEach((data, ind) => { + e.date_range_arr[ind] = moment(data.date_from).format('DD MMM YYYY') + ' - ' + moment(data.date_to).format('DD MMM YYYY'); + }) + } + e['date_range'] = e.date_range_arr.length > 0 ? e.date_range_arr.join(',') : ''; + }); + this.Contract_Results.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + + //Allocation data + if (res[4]) { + this.AllocationResult = res[4].data ? res[4].data : []; + if (res[4].data) { + this.AllocationResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.AllocationResult.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + + //Offers Data + if (res[5]) { + this.OffersResult = res[5].data ? res[5].data : []; + if (res[5].data) { + this.OffersResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['offer_type'] = this.getOfferType(e['offer_type']); + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.OffersResult.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + + //Supplement Data + if (res[6]) { + this.SupplementResult = res[6].data ? res[6].data : []; + if (res[6].data) { + this.SupplementResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['supplement_rate_type'] = this.getSupplementRateType(e.supplement_rate_type); + e['supplement_type'] = this.getSupplementType(e.supplement_type); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['supplement_dates'] ? JSON.parse(e['supplement_dates']) : e['supplement_dates']; + if (typeof (e['date_range_arr']) != 'string') { + e.date_range_arr.forEach((data, ind) => { + e.date_range_arr[ind] = moment(data.from).format('DD MMM YYYY') + ' - ' + moment(data.to).format('DD MMM YYYY'); + }) + } + e['custom_days'] = e['supplement_days'] ? e['supplement_days'].split(',') : '' + }); + this.SupplementResult.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + + //Meals Data + if (res[7]) { + this.MealsResult = res[7].data ? res[7].data : []; + if (res[7].data) { + this.MealsResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.MealsResult.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + + //Block Date data + if (res[8]) { + this.BlockDateResult = res[8].data ? res[8].data : []; + if (res[8].data) { + this.BlockDateResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['date_range_arr'] = e['date_range'] ? e['date_range'].split(', ') : e['date_range']; + if (typeof (e['date_range_arr']) != 'string') { + e.date_range_arr.forEach((data, ind) => { + e.date_range_arr[ind] = moment(data.split(' - ')[0]).format('DD MMM YYYY') + ' - ' + moment(data.split(' - ')[1]).format('DD MMM YYYY'); + }) + } + e['Custom_created_on'] = this._commonService.convertDateWithTimeToShow(e.created_on); + e['block_date_type'] = e.block_date_type == 'CHECKINDATE' ? 'Check-in Date' : 'Check-out Date'; + }); + this.BlockDateResult.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + + //Minimum Stay + if(res[9]){ + this.MinStayResult = res[9].data ? res[9].data : []; + if(res[9].data){ + this.MinStayResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['date_range_arr'] = e['date_ranges'] ? JSON.parse(e['date_ranges']) : []; + if(typeof(e['date_range_arr']) != 'string'){ + e.date_range_arr.forEach((data,ind)=>{ + e.date_range_arr[ind] = moment(data.date_from).format('DD MMM YYYY') + ' - ' + moment(data.date_to).format('DD MMM YYYY'); + }) + } + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + this.MinStayResult.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + + //OverviewData + if (res[10]) { + this.OverViewDetail = res[10].data; + this.GetSortedOverviewDetails(res[10].data); + } + } + }) + } + GetHotelDetails(Editid) { + if (Editid) + return this.apiserv.Get('/ExtranetOverview/GetHotelData/' + Editid) + else + return of(null) + }; + Initform() { + const startDate = new Date(); + const endDate = new Date(startDate); + endDate.setDate(startDate.getDate() + 29) + this.OverviewForm = this.fb.group({ + extranet_room_id: '', + date: new FormControl([startDate, endDate], [Validators.required, this.dateValidation()]) + }); + } + + // date validation + public dateValidation(): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + if (control.value.length == 2) { + const diffInTime = control.value[1].getTime() - control.value[0].getTime(); // Difference in milliseconds + const diffInDays = diffInTime / (1000 * 3600 * 24); + if (diffInDays >= 30) { + return { 'range': true }; + } + } + } + return null; + }; + } + + // scroll tab on click of button + // ngAfterViewInit() { + // this.calculateColumnWidths(); + // } + + calculateColumnWidths(scroll_side) { + const container = this.tableContainer.nativeElement; + const columns = container.querySelectorAll('th'); + this.columnWidths = Array.from(columns).map((col: HTMLElement) => col.offsetWidth); + if(scroll_side == 'right'){ + this.scrollTable(1); + }else if(scroll_side == 'left'){ + this.scrollTable(-1); + } + } + // GetAllContract(){ + // let obj = { + // extranet_hotel_id:this.Extranet_Hotel_Id + // } + // return this.apiserv.Post('/ExtranetOffer/GetAllExtranetOfferAndSupplementContracts',obj) + // } + + + // scrollLeft() { + // this.scrollTable(-1); + // } + + // scrollRight() { + // this.scrollTable(1); + // } + + scrollTable(direction: number) { + const container = this.tableContainer.nativeElement; + const currentScroll = container.scrollLeft; + const columnIndex = this.findCurrentColumn(currentScroll); + + if (columnIndex !== -1) { + const scrollAmount = this.columnWidths[columnIndex] * direction; + container.scrollLeft += scrollAmount; + } + } + + findCurrentColumn(currentScroll: number): number { + let accumulatedWidth = 0; + for (let i = 0; i < this.columnWidths.length; i++) { + accumulatedWidth += this.columnWidths[i]; + if (accumulatedWidth > currentScroll) { + return i; + } + } + return -1; // In case something goes wrong + } + //OverView Data + GetOverViewData() { + // console.log(this.OverviewForm.getRawValue()); + let val = this.OverviewForm.getRawValue(); + let Obj = { + extranet_hotel_id: this.Extranet_Hotel_Id, + extranet_room_id: val.extranet_room_id ? val.extranet_room_id : '', + from_date: val.date ? moment(val.date[0]).format('YYYY-MM-DD') : '', + to_date: val.date ? moment(val.date[1]).format('YYYY-MM-DD') : '' + } + return this.apiserv.Post('/ExtranetOverview/GetOverView', Obj) + } + SearchOverview() { + if (this.OverviewForm.status == "INVALID") { + this.validserv.showValidationsMsg(this.OverviewForm); + return; + } + this.GetOverViewData().subscribe(res => { + if (res) { + this.OverViewDetail = res.data; + this.GetSortedOverviewDetails(this.OverViewDetail); + } + }) + } + Reset(){ + if(this.OverviewForm.get('extranet_room_id').value){ + this.OverviewForm.get('extranet_room_id').setValue(''); + this.SearchOverview(); + } + } + + GetSortedOverviewDetails(Overview_det) { + this.OverViewObj = undefined; + if (Overview_det) { + this.OverViewObj = { + Date: [], + RoomDetails: [] + } + // console.log(Overview_det) + let Unique_Date = [...new Set(Overview_det.map(item => item.overview_date))]; + const Unique_room_id = [...new Set(Overview_det.map(item => item.extranet_room_id))]; + Unique_Date.map((date: any, i) => { + Unique_Date[i] = new Date(date); + }) + Unique_Date.sort((a: any, b: any) => a - b); + if (Unique_Date.length > 0) { + Unique_room_id.forEach((room_id: any, room_ind) => { + let room_data = Overview_det.filter(e => { return e.extranet_room_id == room_id }) + const contract_names = [...new Set(room_data.map(item => item.contract_name))]; + // let room_data_list = + + let overview_data = { + room_name: room_data[0].room_name, + room_id: room_data[0].extranet_room_id, + currency_code: room_data[0].currency_code, + status: [], + allocation: [], + allocation_id:[], + net_sold: [], + availability: [], + RoomContractDetails: [] + } + // unique date and + contract_names.forEach((contract_data: any, contract_ind) => { + let contractDetails = { + contract_name: '', + aria_collapse: true, + rate_plan: '', + meal_plan: '', + child_age_range_1: '', + child_age_range_2: '', + min_stay: [], + ChildDataRange1: [], + ChildDataRange2: [], + AdultData: [] + } + let contract_details = Overview_det.find(e => { return (e.extranet_room_id == room_id && e.contract_name == contract_data) }) + contractDetails.contract_name = contract_details.contract_name; + contractDetails.rate_plan = contract_details.rate_plan_name ? contract_details.rate_plan_name : ''; + contractDetails.meal_plan = contract_details.meal_plan_name ? contract_details.meal_plan_name : ''; + contractDetails.child_age_range_1 = contract_details.child_age_range_1 ? contract_details.child_age_range_1 : ''; + contractDetails.child_age_range_2 = contract_details.child_age_range_2 ? contract_details.child_age_range_2 : ''; + for(let i=0;i { + let room_data_on_date = Overview_det.find(e => { return (e.extranet_room_id == room_id && date_data.getTime() == new Date(e.overview_date).getTime() && e.contract_name == contract_data) }) + if (room_ind == 0 && contract_ind == 0) this.OverViewObj.Date.push(date_data); + if(contract_ind == 0){ + let allocation_obj = { + id:`room${room_id}_allocation_${date_ind}`, + value:room_data_on_date ? room_data_on_date.allocation : '' + } + let available = room_data_on_date?.status == 'FREESALE' ? 'FREESALE' : room_data_on_date?.available; + overview_data.status.push(room_data_on_date ? room_data_on_date.status : ''); + overview_data.allocation.push(allocation_obj); + overview_data.allocation_id.push(room_data_on_date ? room_data_on_date.extranet_allocation_id : ''); + overview_data.availability.push(room_data_on_date ? available : ''); + overview_data.net_sold.push(room_data_on_date ? room_data_on_date.net_sold : ''); + }else if(room_data_on_date){ + let allocation_obj = { + id:`room${room_id}_allocation_${date_ind}`, + value:room_data_on_date ? room_data_on_date.allocation : '' + } + let available = room_data_on_date?.status == 'FREESALE' ? 'FREESALE' : room_data_on_date?.available; + overview_data.status[date_ind] = room_data_on_date ? room_data_on_date.status : ''; + overview_data.allocation[date_ind] = allocation_obj; + overview_data.allocation_id[date_ind] = room_data_on_date ? room_data_on_date.extranet_allocation_id : ''; + overview_data.availability[date_ind] = room_data_on_date ? available : ''; + overview_data.net_sold[date_ind] = room_data_on_date ? room_data_on_date.net_sold : ''; + } + contractDetails.min_stay.push(room_data_on_date ? room_data_on_date.min_stay : ''); + for(let i=0;i { + if((room_data.allocation[data_ind].value >= room_data.net_sold[data_ind] && (room_data.allocation[data_ind].value || room_data.allocation[data_ind].value === 0 )) || room_data.allocation[data_ind].value == 'FREESALE'){ + + let Obj = { + extranet_allocation_id:room_data.allocation_id[data_ind], + status:room_data.status[data_ind], + allocation:room_data.allocation[data_ind].value != 'FREESALE' ? parseInt(room_data.allocation[data_ind].value) : room_data.net_sold[data_ind], + net_sold:room_data.net_sold[data_ind], + } + this.apiserv.Post('/ExtranetOverview/UpdateOverViewAllocationTypeAndLimit',Obj).subscribe(resp=>{ + if(resp){ + this._commonService.showMessage(resp.status,resp.message); + if(resp.data){ + this.OverViewObj.RoomDetails[room_ind].availability[data_ind] = resp.data.status != 'FREESALE' ? resp.data.remaining_count : 'FREESALE'; + this.OverViewObj.RoomDetails[room_ind].allocation[data_ind].value = resp.data.status != 'FREESALE' ? parseInt(resp.data.allocation) : 'FREESALE'; + } + } + }) + }else { + this._commonService.showMessage(false,'allocation cannot be lesser than net sold') + } + }, 500); + } + // + + // Rooms Data and functions + + GetAllRooms() { + let ReObj = { + is_free_child: '', + is_extra_bed_supported: '', + extranet_room_view_id: '', + room_name: '', + hotel_id: this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetHotelRoom/GetAllExtranetHotelRoom', ReObj) + } + CloneRoom(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/CloneRoom/${this.Extranet_Hotel_Id}/${Id}`); + } + updateRoomStatus(id, val) { + let obj = { + Id: id, + Status: val ? false : true, + }; + this.apiserv.Post('/ExtranetHotelRoom/UpdateExtranetHotelRoomStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.SerachRooms() : ''; + } + }); + } + SerachRooms() { + this.GetAllRooms().subscribe(res => { + this.AllRooms = res.data; + if (res) { + this.AllRooms = res.data ? res.data : []; + if (res.data) { + this.AllRooms.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['is_extra_bed_supported'] = e.is_extra_bed_supported ? 'Yes' : 'No'; + e['is_free_child'] = e.is_free_child ? 'Yes' : 'No'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }) + } + } + }) + } + EditRoom(Id) { + this.router.navigateByUrl(`Services/Hotel/HotelManage/HotelEditRoom/${this.Extranet_Hotel_Id}/${Id}`); + } + //room Data Ends + + + // Season Data + SearchSeason() { + let ReqObj = { + season_name: '', + hotel_id: this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason', ReqObj) + } + updateSeasonStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetSeason/UpdateExtranetSeasonStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.GetAllSeason() : ''; + } + }); + } + + EditSeason(Id) { + this.router.navigateByUrl(`Services/Hotel/HotelManage/EditSeason/${this.Extranet_Hotel_Id}/${Id}`); + } + GetAllSeason() { + this.SearchSeason().subscribe(res => { + if (res) { + this.SeasonResult = res.data ? res.data : []; + if (res.data) { + this.SeasonResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['date_range'] ? e['date_range'].split(', ') : e['date_range']; + if (typeof (e['date_range_arr']) != 'string') { + e.date_range_arr.forEach((data, ind) => { + e.date_range_arr[ind] = moment(data.split(' - ')[0]).format('DD MMM YYYY') + ' - ' + moment(data.split(' - ')[1]).format('DD MMM YYYY'); + }) + } + }) + } + } + }) + } + //Season data ends + + //Contract Data + updateContractStatus(id, val) { + let obj = { + Id: id, + Status: val ? false : true, + }; + this.apiserv.Post('/ExtranetRoomContract/UpdateExtranetRoomContractStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.GetallContract() : ''; + } + }); + } + SearchContract() { + let ReObj = { + extranet_hotel_id: this.Extranet_Hotel_Id, + extranet_room_id: '', + extranet_rate_plan_id: '', + extranet_meal_plan_id: '' + } + return this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetRoomContract', ReObj) + } + Update(Id, pagename) { + this.router.navigateByUrl(`Services/Hotel/HotelManage/${pagename}/${this.Extranet_Hotel_Id}/${Id}`); + } + GetallContract() { + this.SearchContract().subscribe(res => { + if (res) { + this.Contract_Results = res.data ? res.data : []; + if (res.data) { + this.Contract_Results.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['nationality_type'] = this.getNationalityType(e['nationality_type']) ; + e['nationality_applicable_type'] = this.getNationalityApplicabilityType(e['nationality_applicable_type']) ; + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['contract_dates'] ? JSON.parse(e['contract_dates']) : []; + if (typeof (e['date_range_arr']) != 'string') { + e.date_range_arr.forEach((data, ind) => { + e.date_range_arr[ind] = moment(data.date_from).format('DD MMM YYYY') + ' - ' + moment(data.date_to).format('DD MMM YYYY'); + }) + } + e['date_range'] = e.date_range_arr.length > 0 ? e.date_range_arr.join(',') : ''; + }) + } + } + }) + } + EditContract(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/RoomContractEdit/${this.Extranet_Hotel_Id}/${Id}`); + } + getNationalityType(value){ + if(value == 'INCLUDE'){ + return 'Include' + }else if(value == 'EXCLUDE'){ + return 'Exclude' + } + return '' + } + getNationalityApplicabilityType(value){ + if(value == 'ALL'){ + return 'All' + }else if(value == 'SPECIFIC'){ + return 'Specific' + } + return '' + } + //contract data ends + + //Allocation data + updateAllocationStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetAllocation/UpdateExtranetAllocationStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.GetAllocationDeata() : ''; + } + }); + } + + SearchAllocation() { + let ReqObj = { + extranet_room_id: '', + extranet_hotel_id: this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetAllocation/GetAllExtranetAllocation', ReqObj) + } + GetAllocationDeata() { + this.SearchAllocation().subscribe(res => { + if (res) { + this.AllocationResult = res.data ? res.data : []; + if (res.data) { + this.AllocationResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }) + } + } + }) + } + + EditAllocation(Id) { + this.router.navigateByUrl(`Services/Hotel/HotelManage/UpdateAllocation/${this.Extranet_Hotel_Id}/${Id}`); + } + //Allocation data ends + + //Offers data + + SearchOffers() { + let obj = { + extranet_hotel_id: this.Extranet_Hotel_Id, + extranet_room_id: '', + contract_name: '', + offer_name: '', + offer_type: '', + discount_code: '', + is_combinable_offer: '', + } + return this.apiserv.Post('/ExtranetOffer/GetAllExtranetOffer', obj) + } + GetAllOffers() { + this.SearchOffers().subscribe(res => { + if (res) { + this.OffersResult = res.data ? res.data : []; + if (res.data) { + this.OffersResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['offer_type'] = this.getOfferType(e['offer_type']); + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }) + } + } + }) + } + updateOfferStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetOffer/UpdateExtranetOfferStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.GetAllOffers() : ''; + } + }); + } + + EditOffer(Id) { + this.router.navigateByUrl(`Services/Hotel/HotelManage/EditOffer/${this.Extranet_Hotel_Id}/${Id}`); + } + getOfferType(value){ + if(value == 'EARLYBIRD'){ + return 'Early Bird' + }else if(value == 'STAYPAY'){ + return 'Stay Pay' + }else if(value == 'LONGSTAY'){ + return 'Long Stay' + }else if(value == 'DISCOUNT'){ + return 'Discount' + }else if(value == 'CONTRACTREMARK'){ + return 'Contract Remark' + } + return '' + } + //Offer data ends + + //supplements data + SearchSupplement() { + let obj = { + extranet_hotel_id: this.Extranet_Hotel_Id, + extranet_room_id: '', + contract_name: '', + supplement_name: '', + supplement_rate_type: '', + supplement_type: '', + } + return this.apiserv.Post('/ExtranetSupplement/GetAllExtranetSupplement', obj) + } + GetAllSupplement() { + this.SearchSupplement().subscribe(res => { + if (res) { + this.SupplementResult = res.data ? res.data : []; + if (res.data) { + this.SupplementResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['supplement_rate_type'] = this.getSupplementRateType(e.supplement_rate_type); + e['supplement_type'] = this.getSupplementType(e.supplement_type); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['supplement_dates'] ? JSON.parse(e['supplement_dates']) : e['supplement_dates']; + if (typeof (e['date_range_arr']) != 'string') { + e.date_range_arr.forEach((data, ind) => { + e.date_range_arr[ind] = moment(data.from).format('DD MMM YYYY') + ' - ' + moment(data.to).format('DD MMM YYYY'); + }) + } + e['custom_days'] = e['supplement_days'] ? e['supplement_days'].split(',') : '' + }) + } + } + }) + } + updateSupplementStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetSupplement/UpdateExtranetSupplementStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.GetAllSupplement() : ''; + } + }); + } + + EditSupplement(Id) { + this.router.navigateByUrl(`Services/Hotel/HotelManage/EditSuppliment/${this.Extranet_Hotel_Id}/${Id}`); + } + getSupplementType(value){ + if(value == 'ADDONRATE'){ + return 'Add-On Rate' + }else if(value == 'NEWRATE'){ + return 'New Rate' + } + return '' + } + getSupplementRateType(value){ + if(value == 'PERROOMPERNIGHT'){ + return 'Per Room Per Night' + }else if(value == 'PERPAXPERNIGHT'){ + return 'Per Pax Per Night' + }else if(value == 'PERPAXPERSTAY'){ + return 'Per Pax Per Stay' + } + return '' + } + //Supplement Data ends + + //Meals Add-on data + SearchMeals() { + let ReObj = { + addon_name: '', + extranet_meal_plan_id: '', + hotel_id: this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetMealAddon/GetAllExtranetMealAddon', ReObj) + } + GetAllMeals() { + this.SearchMeals().subscribe(res => { + if (res) { + this.MealsResult = res.data ? res.data : []; + if (res.data) { + this.MealsResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }) + } + } + }) + } + updateMealsStatus(id, val) { + let obj = { + Id: id, + Status: val ? false : true, + }; + this.apiserv.Post('/ExtranetMealAddon/UpdateExtranetMealAddOnStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.GetAllMeals() : ''; + } + }); + } + EditMeals(Id) { + this.router.navigateByUrl(`Services/Hotel/HotelManage/HotelMealEdit/${this.Extranet_Hotel_Id}/${Id}`); + } + //Meals Data ends + + //Block Date Data + SearchBlockDate() { + let ReqObj = { + rule_name: '', + block_date_type: '', + hotel_id: this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetBlockDate/GetAllExtranetBlockDate', ReqObj) + } + GetAllBlockDate() { + this.SearchBlockDate().subscribe(res => { + if (res) { + this.BlockDateResult = res.data ? res.data : []; + if (res.data) { + this.BlockDateResult.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['date_range_arr'] = e['date_range'] ? e['date_range'].split(', ') : e['date_range']; + if (typeof (e['date_range_arr']) != 'string') { + e.date_range_arr.forEach((data, ind) => { + e.date_range_arr[ind] = moment(data.split(' - ')[0]).format('DD MMM YYYY') + ' - ' + moment(data.split(' - ')[1]).format('DD MMM YYYY'); + }) + } + e['Custom_created_on'] = this._commonService.convertDateWithTimeToShow(e.created_on); + e['block_date_type'] = e.block_date_type == 'CHECKINDATE' ? 'Check-in Date' : 'Check-out Date'; + }) + } + } + }) + } + updateStatus(id, val) { + let obj = { + Id: id, + status: val ? false : true, + }; + this.apiserv.Post('/ExtranetBlockDate/UpdateExtranetBlockDateStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.GetAllBlockDate() : ''; + } + }); + } + + Edit(Id) { + this.router.navigateByUrl(`Services/Hotel/HotelManage/HotelEditBlockDate/${this.Extranet_Hotel_Id}/${Id}`); + } + //Block Date Data Ends + + //Minimum stay + SearchMinStay(){ + let ReqObj = { + extranet_room_id:'', + extranet_hotel_id:this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetMinStay/GetAllExtranetRoomMinStay',ReqObj) + } + + EditMinStay(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/EditMinStay/${this.Extranet_Hotel_Id}/${Id}`); + } + //Minimum Stay ends + +} diff --git a/src/app/modules/services/hotel/hotel-manage/overview/overview.module.ts b/src/app/modules/services/hotel/hotel-manage/overview/overview.module.ts new file mode 100644 index 0000000..7b7d57a --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/overview/overview.module.ts @@ -0,0 +1,47 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { OverviewComponent } from './overview.component'; +import { CalendarModule } from 'primeng/calendar'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; + + + +@NgModule({ + declarations: [ + OverviewComponent + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + CalendarModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + + ], + exports:[ + OverviewComponent + ] +}) +export class OverviewModule { } diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/rate-setting-add.component.html b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/rate-setting-add.component.html new file mode 100644 index 0000000..5d2dfbd --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/rate-setting-add.component.html @@ -0,0 +1,1245 @@ + + +
    +
    +
    +

    Room Contract

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + {{item}} + {{item}} + {{data.room_name + + (data.room_view_name ? ', ' : '') + data.room_view_name}} +
    + Please + select room name +
    +
    +
    +
    + + + +
    +
    +
    +

    Rate Plan

    +
    + +
    +
    +
    + Select + {{data.rate_plan_name}} +
    + Please + select rate plan +
    +
    +
    +
    + + + +
    +
    +
    +

    Meal Plan

    +
    + +
    +
    +
    + Select + {{data.meal_plan_name}} +
    + Please + select meal plan +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality Type

    +
    + +
    +
    +
    + Select + Include + Exclude +
    + Please + select nationality type +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality Applicability

    +
    + +
    +
    +
    + Select + {{data.Label}} +
    + Please + select nationality applicalbility +
    +
    +
    +
    + + + +
    +
    +
    +

    Nationality

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select nationality +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence Type

    +
    + +
    +
    +
    + Select + Include + Exclude +
    + Please + select residence type +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence Applicability

    +
    + +
    +
    +
    + Select + {{data.Label}} +
    + Please + select residence applicalbility +
    +
    +
    +
    + + + +
    +
    +
    +

    Residence

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select residence +
    +
    +
    +
    + + + +
    +
    +
    +

    Date Type

    +
    + +
    +
    +
    + Select + Specific Dates + Season +
    + Please + select Date type +
    +
    + +
    +
    + +
    +
    +
    + + + Please select date greater than from today's date or previous range + + + Please select range to date + + + Please select date range + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Meals

    +
    + +
    +
    +
    + {{data.season_name}} +
    + + info + + Please + select Season +
    +
    +
    +
    +
    +
    + Meal Add On +
    +
    +
    +
    + + + +
    +
    +
    +

    Meals

    +
    + +
    +
    +
    + {{data.addon_name}} +
    + Please + select meals +
    +
    +
    +
    +
    +
    +
    +
    +

    Pricing Details

    +
    +
    +
    + + + +
    + {{Room_data.get('extranet_room_name').value}} ({{(showRate_Plan_Name ? (showRate_Plan_Name + ', + ') : '') + (showRate_meal_Name ? showRate_meal_Name : '')}}) +
    +
    +
    +
    +
    +
    + + + Please + enter contract name +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    +
    + {{item}} + {{item}} +
    + Please + enter contract days +
    +
    +
    +
    Adult Pricing
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Occupancy +
    + 1 Adult + +
    +
    +
    + 2 Adult +
    +
    + ExtraBed Included +
    +
    +
    + 3 Adult +
    +
    + ExtraBed Included +
    +
    +
    + 4 Adult +
    +
    + ExtraBed Included +
    +
    +
    + 5 Adult +
    +
    + ExtraBed Included +
    +
    +
    + 6 Adult +
    +
    + ExtraBed Included +
    +
    +
    + 7 Adult +
    +
    + ExtraBed Included +
    +
    +
    + 8 Adult +
    +
    + ExtraBed Included +
    +
    +
    + 9 Adult +
    +
    + ExtraBed Included +
    +
    Price +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    Child + Pricing
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Child Age Range + + Occupancy + + ExtraBed Included + + Charges +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +

    Cancellation Policy

    +
    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Policy Type

    +
    + +
    +
    +
    + Select + Day +
    + Please + select cancellation policy type +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + From + day + Please + enter range greater than previous range +
    +
    +
    +
    + + + To + days + Please + enter to value greater than from value +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Cancellation Type

    +
    + +
    +
    +
    + Select + Full Charges + Night Count + Amount + Percentage +
    + Please + select cancellation type +
    +
    +
    +
    + + + +
    +
    +
    +

    Night Type

    +
    + +
    +
    +
    + Select + First + Last + Cheapest + Highest +
    + Please + select night type +
    +
    +
    +
    + + + Please + enter value +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    + +
    {{item.season_name}}
    +
    +

    {{date}}

    +
    +
    +
    + + + +
    + +
    + +
    + To determine the cancellation fee, we consider both the number of nights booked and the type of night + selected (e.g., "First Night"). For instance, if you choose "First Night" in type and specify 3 nights, the + cancellation fee will be calculated from the first 3 nights of the stay. +
    +
    + + + +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/rate-setting-add.component.ts b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/rate-setting-add.component.ts new file mode 100644 index 0000000..77878d8 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/rate-setting-add.component.ts @@ -0,0 +1,783 @@ +import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-rate-setting-add', + templateUrl: './rate-setting-add.component.html', +}) +export class RateSettingAddComponent implements OnInit { + displayPosition: boolean; + position: string; + ActiveTab = 0; + Extranet_Hotel_Id; + Clone_Rule; + SelectAllRoom = []; + ClearAllRoom = []; + CancelModal = false; + HotelRoomContractForm:FormGroup; + AllRoomsData; + Nationality_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + Residence_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + AllRatePlan; + timer; + Season_List = []; + Selected_Room_List = []; + AllSeason; + SelectAll=["Select All"]; + showRate_Plan_Name; + showRate_meal_Name; + AllMeal; + MinDate = new Date(); + CountryList; + Edit_Id; + AllMealPlan; + ddLoader = { + Country:false, + Residence:false, + } + IsMobile; + AllDaysArr = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']; + SelectAllVal=[]; + DaysArrValue=[]; + constructor(public activateRoute:ActivatedRoute,private router:Router,private hotelmanageserv:ManageHotelService, + public apiserv:API,public fb:FormBuilder,public validserv:ValidationService,public commonMasterSer:CommonFunctionService) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.Edit_Id = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.Clone_Rule = this.activateRoute.snapshot['_routerState'].url.includes('CloneContract') && this.Edit_Id ? true :false; + this.InitForm(); + this.getAllData(); + } + CheckTabInd(event){ + this.ActiveTab = event.index; +} + InitForm(){ + this.HotelRoomContractForm = this.fb.group({ + room_name:this.validserv.required, + extranet_rate_plan_id:this.validserv.required, + extranet_meal_plan_id:this.validserv.required, + currency_code:'', + nationality_type:'', + nationality_applicable_type:'', + residence_type:'', + residence_applicable_type:'', + date_type:this.validserv.required, + is_meal_addon_applicable:false, + RoomPricingDetail:this.fb.array([]) + }); + } + getAllData() { + forkJoin( + this.GetAllRooms(), + this.GetAllPlan(), + this.GetAllMealPlan(), + this.GetHotelDataById(), + this.GetAllSeason(), + this.GetAllMeal(), + this.GetContractById(this.Edit_Id) + ).subscribe(res=>{ + if(res && res.length > 0){ + this.AllRoomsData = res[0] ? res[0].data : []; + if(res[0].data){ + this.SelectAllRoom = ['Select All']; + } + this.AllRatePlan = res[1] ? res[1].data : []; + this.AllMealPlan = res[2].data; + this.HotelRoomContractForm.get('currency_code').setValue(res[3].data ? res[3].data['currency'] : ''); + this.AllSeason = res[4].data ? res[4].data : []; + this.AllMeal = res[5].data ? res[5].data : []; + this.SetContractFormValue(res[6] ? res[6].data :'') + } + }); + } + GetContractById(Editid) { + if (Editid) + return this.apiserv.Get('/ExtranetRoomContract/GetExtranetRoomContractById/' + Editid) + else + return of(null) + }; + GetAllPlan(){ + return this.apiserv.Get('/ExtranetRoomContract/GetAllExtranetHotelRatePlan/EN') + } + GetAllMeal(){ + return this.apiserv.Get('/ExtranetMealAddon/GetAllExtranetMealAddonByOrg/'+ this.Extranet_Hotel_Id) + } + GetAllRooms(){ + let ReqObj = { + extranet_hotel_id : this.Extranet_Hotel_Id, + extranet_room_id : '', + room_name : '', + room_view_name : '', + } + return this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetHotelRoomName',ReqObj) + } + GetHotelDataById() { + if (this.Extranet_Hotel_Id) + return this.apiserv.Get('/ExtranetHotel/GetExtranetHotelById/' + this.Extranet_Hotel_Id) + else + return of(null) + }; + GetAllMealPlan(){ + return this.apiserv.Get('/ExtranetMealAddon/GetAllExtranetMeal/EN') + } + GetAllSeason(){ + let ReqObj = { + season_name:'', + hotel_id:this.Extranet_Hotel_Id + } + return this.apiserv.Post('/ExtranetSeason/GetAllExtranetSeason',ReqObj) + } + showPositionDialog(position) { + this.position = position; + this.displayPosition = true; + }; + + BackButton(){ + this.hotelmanageserv.Active_tab = 'RoomContract'; + this.router.navigateByUrl(`Services/Hotel/HotelManage/${this.Extranet_Hotel_Id}`); + } + NationalityShowhide(event){ + if(event == 'SPECIFIC'){ + this.HotelRoomContractForm.addControl('nationality',new FormControl('',Validators.required)) + }else{ + this.HotelRoomContractForm.removeControl('nationality'); + } + } + ResidenceShowhide(event){ + if(event == 'SPECIFIC'){ + this.HotelRoomContractForm.addControl('residence',new FormControl('',Validators.required)) + }else{ + this.HotelRoomContractForm.removeControl('residence'); + } + } + NationalityTypeCheck(event){ + if(event == 'INCLUDE'){ + this.Nationality_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + }else{ + this.Nationality_type = [{Label:'Specific',Value:'SPECIFIC'}]; + if(this.HotelRoomContractForm.controls['nationality_applicable_type'].value == 'ALL'){ + this.HotelRoomContractForm.get('nationality_applicable_type').setValue(''); + } + } + } + ResidenceTypeCheck(event){ + if(event == 'INCLUDE'){ + this.Residence_type = [{Label:'All',Value:'ALL'},{Label:'Specific',Value:'SPECIFIC'}]; + }else{ + this.Residence_type = [{Label:'Specific',Value:'SPECIFIC'}]; + if(this.HotelRoomContractForm.controls['residence_applicable_type'].value == 'ALL'){ + this.HotelRoomContractForm.get('residence_applicable_type').setValue(''); + } + } + } + getCountryList(event,name) { + if (event.value.length >= 2) { + this.ddLoader[name] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGet(`/MasterSearch/GetAllCountry/en/${event.value}`).subscribe(res => { + if (res) { + this.CountryList = res; + this.ddLoader[name] = false; + } + }); + }, 500); + } + } + ShowDateTypeFields(event){ + this.Season_List = []; + if(event == 'SPECIFICDATES'){ + this.HotelRoomContractForm.addControl('ContractDatesArr',new FormArray([this.fb.group({ + date:['', Validators.compose([Validators.required, this.dateValidation(new Date(new Date().setDate(new Date().getDate() - 1)))])], + })])); + this.HotelRoomContractForm.removeControl('Season_Id'); + }else if(event == 'SEASON'){ + this.HotelRoomContractForm.addControl('Season_Id',new FormControl('',Validators.required)) + this.HotelRoomContractForm.removeControl('ContractDatesArr'); + }else { + this.HotelRoomContractForm.removeControl('Season_Id'); + this.HotelRoomContractForm.removeControl('ContractDatesArr'); + } + } + addDate() { + let formArray = this.HotelRoomContractForm.controls['ContractDatesArr'] as FormArray; + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if(formArray.length > 0){ + if (formArray.length > 0) { + let formdate = formArray.controls[formArray.length - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + formArray.push(this.fb.group({ + extranet_season_detail_id:'', + date: ['', Validators.compose([ + Validators.required, + this.dateValidation(currentDate) + ])] + })); + } + } + public dateValidation(toDate): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value) { + if (control.value.length <= 1 || control.value[1] == null) { + return { 'todate': true }; + } + if (toDate && control.value.length <= 1 || control.value[0] <= toDate) { + return { 'range': true }; + } + } + return null; + }; + } + removeDate(index) { + let formArray = this.HotelRoomContractForm.controls['ContractDatesArr'] as FormArray; + formArray.removeAt(index); + let date = new Date(); + let currentDate = date; + currentDate = new Date(currentDate.getTime() - 1 * 24 * 60 * 60 * 1000); + if (formArray.length > 0) { + if(index > 0){ + let formdate = formArray.controls[index - 1].get('date').value; + if (formdate && formdate.length == 2) { + currentDate = formdate[1]; + } + } + if (formArray.controls.length >= (index + 1)) { + formArray.controls[index].get("date").clearValidators(); + formArray.controls[index].get("date").setErrors(null); + formArray.controls[index].get("date").addValidators([Validators.required,this.dateValidation(currentDate)]); + // formArray.controls[index].get("date").markAsTouched(); + formArray.controls[index].get("date").updateValueAndValidity(); + // formArray.controls[index].get("date").markAsTouched(); + } + } + } + CloseCalender(element, index) { + let formArray = this.HotelRoomContractForm.controls['ContractDatesArr']['controls']; + if (element.value[0] && element.value[1]) { + element.overlayVisible = false; + element.datepickerClick = true; + if (formArray.length >= (index + 2)) { + formArray[index + 1].get("date").clearValidators(); + formArray[index + 1].get("date").setErrors(null); + formArray[index + 1].get("date").addValidators([Validators.required,this.dateValidation(element.value[1])]); + formArray[index + 1].get("date").markAsTouched(); + formArray[index + 1].get("date").updateValueAndValidity(); + formArray[index + 1].get("date").markAsTouched(); + } + } + } + MealHideShow(check){ + if(check){ + this.HotelRoomContractForm.addControl('extranet_meal_addon_id',new FormControl('',Validators.required)) + }else { + this.HotelRoomContractForm.removeControl('extranet_meal_addon_id'); + } + } + SeasonDataAddRemove(){ + this.Season_List = []; + let selected_season = this.HotelRoomContractForm.controls['Season_Id'].value; + selected_season.forEach(data=>{ + let matched_season_by_id = this.AllSeason.find(e=>e.extranet_season_id == data); + if(matched_season_by_id){ + if(typeof(matched_season_by_id['date_range']) == 'string'){ + matched_season_by_id['date_range'] = matched_season_by_id.date_range.split(', '); + matched_season_by_id['date_range'].forEach((z,i)=>{ + matched_season_by_id['date_range'][i] = moment(z.split(' - ')[0]).format('DD MMM YYYY') + ' to ' + moment(z.split(' - ')[1]).format('DD MMM YYYY') + }) + } + this.Season_List.push(matched_season_by_id); + console.log(this.Season_List) + } + }) + } + AddRemoveRoomContract(event,formVal?){ + const contract_id = this.HotelRoomContractForm.get('room_name').value + if (contract_id && contract_id.length > 0 && (contract_id.includes('Select All') || contract_id.length == this.AllRoomsData.length) && !contract_id.includes('Clear All')) { + let room_id_List = [] + this.AllRoomsData.forEach(d=>{ + room_id_List.push(d.extranet_room_id) + }); + this.HotelRoomContractForm.get('room_name').setValue(room_id_List); + event = this.HotelRoomContractForm.get('room_name').value + this.SelectAllRoom = []; + this.ClearAllRoom = ['Clear All']; + } else if (contract_id && contract_id.length > 0 && (contract_id.includes('Clear All'))){ + this.HotelRoomContractForm.get('room_name').setValue([]); + this.SelectAllRoom = ['Select All']; + this.ClearAllRoom = []; + event = this.HotelRoomContractForm.get('room_name').value + } else { + this.SelectAllRoom = ['Select All']; + if(contract_id?.length > 0){ + this.ClearAllRoom = ['Clear All']; + } + } + const addedItems = event.filter(item => !this.Selected_Room_List.includes(item)); + const removedItems = this.Selected_Room_List.filter(item => !event.includes(item)); + if(addedItems.length){ + addedItems.forEach(item=>{ + this.AddItems(item,formVal) + }) + }else if(removedItems.length){ + removedItems.forEach(item=>{ + this.RemoveItems(item); + }) + } + this.Selected_Room_List = [...event]; + } + AddItems(item,formVal){ + let Room_Details = this.AllRoomsData.find(e=>e.extranet_room_id == item); + let formArray = this.HotelRoomContractForm.get('RoomPricingDetail') as FormArray; + if(Room_Details){ + let age_range = JSON.parse(Room_Details.age_range) + formArray.push(this.fb.group({ + contract_name:this.validserv.required, + extranet_room_name:Room_Details.room_name, + // type: this.validserv.required, + contract_days: this.fb.array([ + this.fb.group({ + extranet_room_id:Room_Details.extranet_room_id, + days:this.fb.control(formVal && formVal.ExtranetRoomContractRate[0]?.days ? formVal.ExtranetRoomContractRate[0].days : [], [Validators.required]), + age_range1:'', + age_range2:'', + }) + ]), + })); + if(formVal && formVal.ExtranetRoomContractRate[0]?.days){ + this.ChangeinWeekDays( 0,formVal.ExtranetRoomContractRate[0]?.days,0); + } + if(this.Clone_Rule){ + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][0].get('contract_name').setValue(formVal ? formVal.ExtranetRoomContractRate[0]?.contract_name : '') + } + let rate_plan_id = this.HotelRoomContractForm.get('extranet_rate_plan_id').value; + if(rate_plan_id != '20240724044902547713' && rate_plan_id != '20240724044902546366'){ + let formgroup = formArray.controls[formArray.controls.length - 1] as FormGroup; + formgroup.addControl(`type`,new FormControl(formVal ? formVal.ExtranetRoomContractCancellationPolicy[0].type : [],Validators.required)); + formgroup.addControl(`cancel_policy`,new FormArray([this.fb.group({ + from: [formVal ? formVal.ExtranetRoomContractCancellationPolicy[0].from : 0,Validators.compose([Validators.required])], + to: [formVal ? formVal.ExtranetRoomContractCancellationPolicy[0].to : '',Validators.compose([Validators.required,this.AmountRangeValidation(0)])], + charge_type: this.fb.control(formVal && formVal.ExtranetRoomContractCancellationPolicy[0] ? formVal.ExtranetRoomContractCancellationPolicy[0].charge_type : [], [Validators.required]), + charge_value: this.fb.control(formVal && formVal.ExtranetRoomContractCancellationPolicy[0]? formVal.ExtranetRoomContractCancellationPolicy[0].charge_value : [], [Validators.required]), + })])); + this.Checkcanceltype(formVal?.ExtranetRoomContractCancellationPolicy[0].charge_type,0,0); + if(formVal && formVal.ExtranetRoomContractCancellationPolicy[0] && formVal && formVal.ExtranetRoomContractCancellationPolicy[0].charge_type == 'NIGHTCOUNT'){ + formgroup.controls['cancel_policy']['controls'][0].get('night_type').setValue(formVal.ExtranetRoomContractCancellationPolicy[0].night_type) + } + } + let Adult_Bed_Obj = Room_Details.adult_extrabed_details_json ? JSON.parse(Room_Details.adult_extrabed_details_json) : ''; + for(let i=1;i <= Room_Details.max_adult_occupancy;i++){ + formArray.controls[formArray.controls.length -1]['controls']['contract_days']['controls'][0].addControl(`adult_${i}`,new FormControl(formVal ? formVal.ExtranetRoomContractRate[0][`adult_${i}`] : '',Validators.required)) + formArray.controls[formArray.controls.length -1]['controls']['contract_days']['controls'][0].addControl(`supplement_${i}`,new FormControl({value: Adult_Bed_Obj ? Adult_Bed_Obj[`adult_${i}`] : false, disabled: true})) + } + let paid_child_extrabed_obj = JSON.parse(Room_Details.paid_child_extrabed_details); + for(let i=1;i <= age_range.length;i++){ + formArray.controls[formArray.controls.length -1]['controls']['contract_days']['controls'][0].get(`age_range${i}`).setValue(age_range[i-1]['from'] + ' to ' + age_range[i-1]['to']); + formArray.controls[formArray.controls.length -1]['controls']['contract_days']['controls'][0].addControl(`is_child_extra_bed_age_range${i}`,new FormControl(formVal ? formVal.ExtranetRoomContractRate[0][`is_child_extra_bed_age_range${i}`] : false)); + for(let j=1;j <= Room_Details.max_child_occupancy;j++){ + if(Room_Details.max_child_occupancy == Room_Details.max_free_child || j > Room_Details.max_free_child || i == 2){ + formArray.controls[formArray.controls.length -1]['controls']['contract_days']['controls'][0].addControl(`age_range${i}_child_${j}`,new FormControl(formVal ? formVal.ExtranetRoomContractRate[0][`age_range${i}_child_${j}`] : [],Validators.required)) + formArray.controls[formArray.controls.length -1]['controls']['contract_days']['controls'][0].addControl(`age_range${i}_extrabed_${j}`,new FormControl({value: false, disabled: true})); + if(paid_child_extrabed_obj?.length > 0){ + formArray.controls[formArray.controls.length -1]['controls']['contract_days']['controls'][0].get(`age_range${i}_extrabed_${j}`).setValue(paid_child_extrabed_obj ? paid_child_extrabed_obj[i-1].Child_Extra_bed_detail[j-1] : false); + } + } + } + } + this.DaysArrValue[formArray.controls.length -1] = this.AllDaysArr; + this.SelectAllVal[formArray.controls.length -1] = this.SelectAll; + if(formVal?.ExtranetRoomContractRate[0].days){ + this.ChangeinWeekDays(0,0); + } + } + } + RemoveItems(item){ + let formdata = this.HotelRoomContractForm.get('RoomPricingDetail').value; + let index = 0; + formdata.forEach((data,ind)=>{ + if(data.contract_days[0].extranet_room_id == item){ + index = ind + } + }) + let formArray = this.HotelRoomContractForm.get('RoomPricingDetail') as FormArray; + formArray.removeAt(index); + let formvalue = this.HotelRoomContractForm.get('RoomPricingDetail').value; + for(let i=0;i < formvalue.length;i++){ + this.ChangeinWeekDays(i); + } + } + AddCancelArr(ind,formVal?){ + let formArray = this.HotelRoomContractForm.get('RoomPricingDetail') as FormArray; + let cancel_arr = formArray.controls[ind]['controls']['cancel_policy']; + let min_amnt = cancel_arr.controls[cancel_arr.controls.length - 1].get('to').value; + formArray.controls[ind]['controls']['cancel_policy'].push( + this.fb.group({ + from: [formVal?.from ? formVal?.from : '',Validators.compose([Validators.required])], + to: [formVal?.to ? formVal.to : '',Validators.compose([Validators.required,this.AmountRangeValidation(0)])], + charge_type: this.fb.control(formVal?.charge_type ? formVal.charge_type : [], [Validators.required]), + charge_value: this.fb.control(formVal?.charge_value ? formVal.charge_value : [], [Validators.required]), + }) + ); + if(min_amnt){ + formArray.controls[ind]['controls']['cancel_policy']['controls'][formArray.controls[ind]['controls']['cancel_policy']['controls'].length -1].get('from').setValue(min_amnt ? (parseInt(min_amnt) + 1) : '') + this.ChangeFeeMinValue('to',min_amnt ? (parseInt(min_amnt) + 1) : min_amnt ,ind,formArray.controls[ind]['controls']['cancel_policy']['controls'].length -1); + } + formVal ? this.Checkcanceltype(formVal?.charge_type,0,formArray.controls[ind]['controls']['cancel_policy']['controls'].length -1) :''; + if(formVal?.charge_type == 'NIGHTCOUNT'){ + formArray.controls[ind]['controls']['cancel_policy']['controls'][formArray.controls[ind]['controls']['cancel_policy']['controls'].length -1].get('night_type').setValue(formVal.night_type) + } + } + removeCancelArr(room_ind,arr_ind){ + let formArray = this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][room_ind]['controls']['cancel_policy'] as FormArray; + formArray.removeAt(arr_ind); + if(formArray.controls[arr_ind]){ + let amount = arr_ind == 0 ? '' : formArray.controls[arr_ind-1].get('to').value; + this.ChangeFeeMinValue('from',amount,room_ind,arr_ind); + } + } + Checkcanceltype(event,room_ind,cancel_ind){ + let formcontrol = this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][room_ind]['controls']['cancel_policy']['controls'][cancel_ind] as FormGroup; + if(event == 'NIGHTCOUNT'){ + formcontrol.addControl('night_type',new FormControl('',Validators.required)); + if(!formcontrol.controls['charge_value']){ + formcontrol.addControl('charge_value',new FormControl('',Validators.required)); + } + } else if(event == 'FULLCHARGES'){ + formcontrol.removeControl('night_type'); + formcontrol.removeControl('charge_value'); + } else { + if(!formcontrol.controls['charge_value']){ + formcontrol.addControl('charge_value',new FormControl('',Validators.required)); + } + formcontrol.removeControl('night_type'); + } + } + AddContractArr(room_ind,room_id,formVal?){ + let Room_Details = this.AllRoomsData.find(e=>e.extranet_room_id == room_id); + let formArray = this.HotelRoomContractForm.get('RoomPricingDetail') as FormArray; + if(Room_Details){ + let age_range = JSON.parse(Room_Details.age_range) + formArray.controls[room_ind]['controls']['contract_days'].push( + this.fb.group({ + extranet_room_id:Room_Details.extranet_room_id, + days:this.fb.control(formVal?.days ? formVal.days : [], [Validators.required]), + age_range1:'', + age_range2:'', + }) + ) + if(formVal?.days){ + this.ChangeinWeekDays( 0,formVal.days,formArray.controls[room_ind]['controls']['contract_days']['controls'].length -1); + } + let room_days_arr = formArray.controls[room_ind]['controls']['contract_days'] as FormArray; + let Adult_Bed_Obj = Room_Details.adult_extrabed_details_json ? JSON.parse(Room_Details.adult_extrabed_details_json) : ''; + for(let i=1;i <= Room_Details.max_adult_occupancy;i++){ + formArray.controls[room_ind]['controls']['contract_days']['controls'][room_days_arr.controls.length -1].addControl(`adult_${i}`,new FormControl(formVal ? formVal[`adult_${i}`] :'',Validators.required)) + formArray.controls[room_ind]['controls']['contract_days']['controls'][room_days_arr.controls.length -1].addControl(`supplement_${i}`,new FormControl({value: Adult_Bed_Obj ? Adult_Bed_Obj[`adult_${i}`] : false, disabled: true})) + } + let paid_child_extrabed_obj = JSON.parse(Room_Details.paid_child_extrabed_details); + for(let i=1;i <= age_range.length;i++){ + formArray.controls[room_ind]['controls']['contract_days']['controls'][room_days_arr.controls.length -1].get(`age_range${i}`).setValue(age_range[i-1]['from'] + ' to ' + age_range[i-1]['to']); + formArray.controls[room_ind]['controls']['contract_days']['controls'][room_days_arr.controls.length -1].addControl(`is_child_extra_bed_age_range${i}`,new FormControl(formVal ? formVal[`is_child_extra_bed_age_range${i}`] : false)); + for(let j=1;j <= Room_Details.max_child_occupancy;j++){ + if(Room_Details.max_child_occupancy == Room_Details.max_free_child || j > Room_Details.max_free_child || i == 2){ + formArray.controls[room_ind]['controls']['contract_days']['controls'][room_days_arr.controls.length -1].addControl(`age_range${i}_child_${j}`,new FormControl(formVal ? formVal[`age_range${i}_child_${j}`] : '',Validators.required)) + formArray.controls[room_ind]['controls']['contract_days']['controls'][room_days_arr.controls.length -1].addControl(`age_range${i}_extrabed_${j}`,new FormControl({value: false, disabled: true})); + if(paid_child_extrabed_obj?.length > 0){ + formArray.controls[room_ind]['controls']['contract_days']['controls'][room_days_arr.controls.length -1].get(`age_range${i}_extrabed_${j}`).setValue(paid_child_extrabed_obj ? paid_child_extrabed_obj[i-1].Child_Extra_bed_detail[j-1] : false); + } + } + } + } + } + console.log(formArray) + } + RemoveContractArr(room_ind,contract_day_ind){ + let formArray = this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][room_ind]['controls']['contract_days'] as FormArray; + formArray.removeAt(contract_day_ind); + } + CopyAdultValues(room_ind,contract_day_ind,adult_value,room_id){ + if(adult_value || adult_value == 0){ + let Room_Details = this.AllRoomsData.find(e=>e.extranet_room_id == room_id); + let formArray = this.HotelRoomContractForm.get('RoomPricingDetail') as FormArray; + for(let i=1;i <= Room_Details.max_adult_occupancy;i++){ + formArray.controls[room_ind]['controls']['contract_days']['controls'][contract_day_ind].get(`adult_${i}`).setValue(adult_value) + } + } + } + ChangeinWeekDays(i,event?,j?){ + let selected_days_by_room = []; + let formdata = this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['contract_days'].value; + if( event && event.includes('Select All')){ + formdata[j].days.splice(formdata[j].days.indexOf('Select All'), 1); + this.DaysArrValue[i].forEach(days_val=>{ + formdata[j].days.push(days_val); + }) + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['contract_days'].controls[j]['controls']['days'].setValue(formdata[j].days); + } + formdata.forEach(e=>{ + if(e.days && e.days.length > 0){ + e.days.forEach(days=>{ + selected_days_by_room.push(days); + }) + } + }) + this.DaysArrValue[i] = this.AllDaysArr.filter(item => !selected_days_by_room.includes(item)); + if(this.DaysArrValue[i].length == 0){ + this.SelectAllVal[i] = [] + }else { + this.SelectAllVal[i] = this.SelectAll; + } + } + Save(){ + if (this.HotelRoomContractForm.status == "VALID") { + let formvalue = this.HotelRoomContractForm.getRawValue(); + let postData = { + extranet_hotel_id:this.Extranet_Hotel_Id, + extranet_rate_plan_id:formvalue.extranet_rate_plan_id, + extranet_meal_plan_id:formvalue.extranet_meal_plan_id, + currency_code:formvalue.currency_code, + nationality_type:formvalue.nationality_type ? formvalue.nationality_type : '', + nationality_applicable_type:formvalue.nationality_applicable_type ? formvalue.nationality_applicable_type : '', + nationality:formvalue.nationality_applicable_type == 'SPECIFIC' ? formvalue.nationality.join(',') : '', + residence_type:formvalue.residence_type, + residence_applicable_type:formvalue.residence_applicable_type, + residence:formvalue.residence_applicable_type == 'SPECIFIC' ? formvalue.residence.join(',') : '', + contract_dates:'', + is_meal_addon_applicable:formvalue.is_meal_addon_applicable, + date_type:formvalue.date_type, + season:formvalue.Season_Id ? formvalue.Season_Id.join(',') : '', + extranet_meal_addon_id:formvalue.is_meal_addon_applicable ? formvalue.extranet_meal_addon_id.join(',') : '', + RoomPricingDetail:[] + } + if(formvalue.date_type == 'SPECIFICDATES'){ + let date_Arr = []; + formvalue.ContractDatesArr.forEach(data=>{ + date_Arr.push({ + date_from: moment(data.date[0]).format('YYYY-MM-DD'), + date_to: moment(data.date[1]).format('YYYY-MM-DD'), + }) + }); + postData['contract_dates'] = JSON.stringify(date_Arr); + } + if(formvalue.date_type == 'SEASON'){ + let date_Arr = []; + this.Season_List.forEach(data=>{ + data.date_range.forEach(season_date=>{ + date_Arr.push({ + date_from: moment(season_date.split(' to ')[0]).format('YYYY-MM-DD'), + date_to: moment(season_date.split(' to ')[1]).format('YYYY-MM-DD'), + }) + }) + }); + postData['contract_dates'] = JSON.stringify(date_Arr); + } + if(formvalue.RoomPricingDetail && formvalue.RoomPricingDetail.length > 0){ + formvalue.RoomPricingDetail.forEach(roomdata=>{ + let subObj = { + contract_days : [], + cancel_policy : [] + } + if(roomdata.contract_days && roomdata.contract_days.length > 0){ + roomdata.contract_days.forEach(contract_data=>{ + subObj.contract_days.push({ + extranet_room_id:contract_data.extranet_room_id, + contract_name:roomdata.contract_name, + days:contract_data.days ? contract_data.days.join(',').toLowerCase() : '', + adult_1:contract_data['adult_1'] ? parseFloat(contract_data['adult_1']) : null, + adult_2:contract_data['adult_2'] ? parseFloat(contract_data['adult_2']) : null, + adult_3:contract_data['adult_3'] ? parseFloat(contract_data['adult_3']) : null, + adult_4:contract_data['adult_4'] ? parseFloat(contract_data['adult_4']) : null, + adult_5:contract_data['adult_5'] ? parseFloat(contract_data['adult_5']) : null, + adult_6:contract_data['adult_6'] ? parseFloat(contract_data['adult_6']) : null, + adult_7:contract_data['adult_7'] ? parseFloat(contract_data['adult_7']) : null, + adult_8:contract_data['adult_8'] ? parseFloat(contract_data['adult_8']) : null, + adult_9:contract_data['adult_9'] ? parseFloat(contract_data['adult_9']) : null, + age_range1_child_1:contract_data['age_range1_child_1'] ? parseFloat(contract_data['age_range1_child_1']) : null, + age_range1_child_2:contract_data['age_range1_child_2'] ? parseFloat(contract_data['age_range1_child_2']) : null, + age_range1_child_3:contract_data['age_range1_child_3'] ? parseFloat(contract_data['age_range1_child_3']) : null, + age_range1_child_4:contract_data['age_range1_child_4'] ? parseFloat(contract_data['age_range1_child_4']) : null, + age_range1_child_5:contract_data['age_range1_child_5'] ? parseFloat(contract_data['age_range1_child_5']) : null, + age_range1_child_6:contract_data['age_range1_child_6'] ? parseFloat(contract_data['age_range1_child_6']) : null, + age_range2_child_1:contract_data['age_range2_child_1'] ? parseFloat(contract_data['age_range2_child_1']) : null, + age_range2_child_2:contract_data['age_range2_child_2'] ? parseFloat(contract_data['age_range2_child_2']) : null, + age_range2_child_3:contract_data['age_range2_child_3'] ? parseFloat(contract_data['age_range2_child_3']) : null, + age_range2_child_4:contract_data['age_range2_child_4'] ? parseFloat(contract_data['age_range2_child_4']) : null, + age_range2_child_5:contract_data['age_range2_child_5'] ? parseFloat(contract_data['age_range2_child_5']) : null, + age_range2_child_6:contract_data['age_range2_child_6'] ? parseFloat(contract_data['age_range2_child_6']) : null, + }) + }) + } + if(roomdata.cancel_policy && roomdata.cancel_policy.length > 0){ + roomdata.cancel_policy.forEach(cancel_data=>{ + subObj.cancel_policy.push({ + type:roomdata.type, + from:cancel_data.from.toString(), + to:cancel_data.to, + charge_type:cancel_data.charge_type, + charge_value:cancel_data.charge_value ? parseInt(cancel_data.charge_value):0, + night_type:cancel_data['night_type'] ? cancel_data['night_type'] : '', + }) + }) + } + postData.RoomPricingDetail.push(subObj); + }) + } + console.log(postData) + this.apiserv.Post('/ExtranetRoomContract/SaveExtranetRoomContract',postData).subscribe(data=>{ + if(data){ + this.commonMasterSer.showMessage(data.status,data.message); + data.status ? this.BackButton() : ''; + } + }) + }else{ + this.validserv.showValidationsMsg(this.HotelRoomContractForm); + setTimeout(() => { + this.validserv.scrollToError(); + }, 50); + } + } + Rate_Plan_Check(){ + let rate_plan_id = this.HotelRoomContractForm.get('extranet_rate_plan_id').value; + if(rate_plan_id == '20240724044902547713' || rate_plan_id == '20240724044902546366'){ + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'].forEach(formgroup=>{ + formgroup.removeControl('cancel_policy'); + formgroup.removeControl('type'); + }) + }else{ + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'].forEach(formgroup=>{ + // formgroup.removeControl('cancel_policy'); + // formgroup.removeControl('type'); + if(!formgroup.contains('cancel_policy')){ + formgroup.addControl(`type`,new FormControl([],Validators.required)) + formgroup.addControl(`cancel_policy`,new FormArray([this.fb.group({ + from: [0,Validators.compose([Validators.required])], + to: [[],Validators.compose([Validators.required,this.AmountRangeValidation(0)])], + charge_type: this.validserv.required, + charge_value: this.validserv.required, + })])) + } + }) + } + if(rate_plan_id){ + let planName = this.AllRatePlan.find(e=>e.extranet_rate_plan_id == rate_plan_id); + this.showRate_Plan_Name = planName.rate_plan_name; + }else { + this.showRate_Plan_Name = undefined; + } + } + Meal_Plan_Show(){ + let meal_plan_id = this.HotelRoomContractForm.get('extranet_meal_plan_id').value; + if(meal_plan_id){ + let planName = this.AllMealPlan.find(e=>e.extranet_meal_plan_id == meal_plan_id); + this.showRate_meal_Name = planName.meal_plan_name; + }else { + this.showRate_meal_Name = undefined; + } + } + ChangeFeeMinValue(controlname,min,i,j) { + let min_amt = min; + if(this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['cancel_policy']['controls'][j] && controlname != 'from'){ + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['cancel_policy']['controls'][j].get(controlname).clearValidators(); + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['cancel_policy']['controls'][j].get(controlname).addValidators([Validators.required, this.AmountRangeValidation(min_amt)]); + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['cancel_policy']['controls'][j].get(controlname).markAsUntouched(); + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['cancel_policy']['controls'][j].get(controlname).setErrors(null); + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['cancel_policy']['controls'][j].get(controlname).updateValueAndValidity(); + } + if(controlname == 'from' && this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['cancel_policy']['controls'][j]){ + this.HotelRoomContractForm.controls['RoomPricingDetail']['controls'][i]['controls']['cancel_policy']['controls'][j].get(controlname).setValue(min_amt ? (parseInt(min_amt) + 1) : 0) + this.ChangeFeeMinValue('to',min_amt ? (parseInt(min_amt) + 1) : 0,i,j); + } + } + private AmountRangeValidation(initialValue): ValidatorFn { + return (control: AbstractControl): { [key: string]: boolean } | null => { + if (control.value || control.value == 0) { + if (initialValue && parseInt(control.value) <= parseInt(initialValue)) { + return { 'range': true }; + } + } + return null; + }; + } + //set form data + SetContractFormValue(formValue) { + if (formValue) { + let Val = formValue; + // console.log(Val); + this.HotelRoomContractForm.get('room_name').setValue(Val.extranet_room_id ? Val.extranet_room_id.split(','):[]); + this.HotelRoomContractForm.get('extranet_rate_plan_id').setValue(Val.extranet_rate_plan_id); + this.HotelRoomContractForm.get('extranet_meal_plan_id').setValue(Val.extranet_meal_plan_id); + this.HotelRoomContractForm.get('nationality_applicable_type').setValue(Val.nationality_applicable_type); + this.HotelRoomContractForm.get('nationality_type').setValue(Val.nationality_type); + this.HotelRoomContractForm.get('residence_applicable_type').setValue(Val.nationality_applicable_type); + this.HotelRoomContractForm.get('residence_type').setValue(Val.nationality_type); + this.HotelRoomContractForm.get('date_type').setValue(Val.date_type); + this.HotelRoomContractForm.get('is_meal_addon_applicable').setValue(Val.is_meal_addon_applicable); + this.Meal_Plan_Show(); + this.Rate_Plan_Check(); + if(Val.nationality_applicable_type == 'SPECIFIC'){ + this.NationalityShowhide(Val.nationality_applicable_type); + this.HotelRoomContractForm.get('nationality').setValue(Val.nationality ? Val.nationality.split(','):[]); + this.CountryList = Val.country ? JSON.parse(Val.country) : []; + } + if(Val.nationality_applicable_type == 'SPECIFIC'){ + this.ResidenceShowhide(Val.nationality_applicable_type); + this.HotelRoomContractForm.get('residence').setValue(Val.residence ? Val.residence.split(','):[]); + this.CountryList = Val.country ? JSON.parse(Val.country) : []; + } + if(Val.is_meal_addon_applicable){ + this.MealHideShow(Val.is_meal_addon_applicable); + this.HotelRoomContractForm.get('extranet_meal_addon_id').setValue(Val.extranet_meal_addon_id ? Val.extranet_meal_addon_id.split(','):[]); + } + if (Val.ExtranetRoomContractRate) { + Val.ExtranetRoomContractRate.forEach((data,ind) => { + Val.ExtranetRoomContractRate[ind]['days'] = data.days ? data.days.split(',') : []; + for (let i = 0; i < Val.ExtranetRoomContractRate[ind]['days'].length; i++) { + Val.ExtranetRoomContractRate[ind]['days'][i] = Val.ExtranetRoomContractRate[ind]['days'][i][0].toUpperCase() + Val.ExtranetRoomContractRate[ind]['days'][i].substr(1); + } + }) + Val.ExtranetRoomContractRate.forEach((formvalue,formInd)=>{ + if(formInd == 0){ + this.AddRemoveRoomContract(this.HotelRoomContractForm.get('room_name').value, Val); + } + if(formInd > 0){ + // this.AddCancelArr(0,Val.ExtranetRoomContractCancellationPolicy[formInd]); + this.AddContractArr(0,formvalue.extranet_room_id,formvalue); + } + }); + } + if(Val.ExtranetRoomContractCancellationPolicy){ + Val.ExtranetRoomContractCancellationPolicy.forEach((cancellation_data,cancel_ind)=>{ + if(cancel_ind > 0){ + this.AddCancelArr(0,cancellation_data); + } + }) + } + this.ShowDateTypeFields(Val.date_type); + if(Val.date_type == 'SPECIFICDATES'){ + let date_arr = Val.contract_dates ? JSON.parse(Val.contract_dates) : []; + date_arr.forEach((date_data,date_ind)=>{ + if(date_ind)this.addDate(); + this.HotelRoomContractForm.controls['ContractDatesArr']['controls'][date_ind].get('date').setValue([new Date(date_data.date_from),new Date(date_data.date_to)]) + }) + }else if(Val.date_type == 'SEASON'){ + this.HotelRoomContractForm.get('Season_Id').setValue(Val.season ? Val.season.split(',') : []); + this.SeasonDataAddRemove(); + } + if(this.Clone_Rule){ + this.HotelRoomContractForm.disable(); + } + } + } +} \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab1/sub-tab1.component.html b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab1/sub-tab1.component.html new file mode 100644 index 0000000..b37264f --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab1/sub-tab1.component.html @@ -0,0 +1,244 @@ +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    +
    + +
    +
    +
    + + + +
    + +
    +
    Adult Pricing
    +
    + + + + + + + + + + + + + + + + + + + +
    Occupancy +
    + 1 Adult + +
    +
    + 2 Adult + + 3 Adult + + 4 Adult + + 1 Adult + + 2 Adult + + 3 Adult + + 4 Adult +
    Price +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    Child Pricing
    +
    + + + + + + + + + + + +
    + Child Age Range + + Occupancy + + Charges +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    Child Extrabed
    +
    + + + + + + + + + + + + + +
    + Child Age Range + + Extrabed Included +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab1/sub-tab1.component.ts b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab1/sub-tab1.component.ts new file mode 100644 index 0000000..2d0c555 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab1/sub-tab1.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'sub-tab1', + templateUrl: './sub-tab1.component.html', +}) +export class SubTab1Component implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab2/sub-tab2.component.html b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab2/sub-tab2.component.html new file mode 100644 index 0000000..1b9fd1f --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab2/sub-tab2.component.html @@ -0,0 +1,194 @@ +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
    +

    Allocation Type

    +
    + +
    +
    +
    + +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + Meal Add On +
    +
    + + + +
    +
    +
    +

    Meals

    +
    + +
    +
    +
    + +
    +
    +
    +
    Adult Pricing
    +
    + + + + + + + + + + + + + + + + + + + +
    Occupancy + 1 Adult + + 2 Adult + + 3 Adult + + 4 Adult + + 1 Adult + + 2 Adult + + 3 Adult + + 4 Adult +
    Price +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    Child Pricing
    +
    + + + + + + + + + + + + + +
    + Child Age Range + + Occupancy + + Extrabed Included + + Charges +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab2/sub-tab2.component.ts b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab2/sub-tab2.component.ts new file mode 100644 index 0000000..4f0df6f --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab2/sub-tab2.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'sub-tab2', + templateUrl: './sub-tab2.component.html', +}) +export class SubTab2Component implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab3/sub-tab3.component.html b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab3/sub-tab3.component.html new file mode 100644 index 0000000..1b9fd1f --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab3/sub-tab3.component.html @@ -0,0 +1,194 @@ +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Contract Days

    +
    + +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
    +

    Allocation Type

    +
    + +
    +
    +
    + +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + Meal Add On +
    +
    + + + +
    +
    +
    +

    Meals

    +
    + +
    +
    +
    + +
    +
    +
    +
    Adult Pricing
    +
    + + + + + + + + + + + + + + + + + + + +
    Occupancy + 1 Adult + + 2 Adult + + 3 Adult + + 4 Adult + + 1 Adult + + 2 Adult + + 3 Adult + + 4 Adult +
    Price +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    Child Pricing
    +
    + + + + + + + + + + + + + +
    + Child Age Range + + Occupancy + + Extrabed Included + + Charges +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab3/sub-tab3.component.ts b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab3/sub-tab3.component.ts new file mode 100644 index 0000000..af57c91 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting-add/sub-tab-content/sub-tab3/sub-tab3.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'sub-tab3', + templateUrl: './sub-tab3.component.html', +}) +export class SubTab3Component implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.component.html b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.component.html new file mode 100644 index 0000000..b1f5dc1 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.component.html @@ -0,0 +1,304 @@ +
    +
    +
    +

    Room Contract

    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Room Name

    +
    + +
    +
    +
    + Select + {{data.room_name + (data.room_view_name ? ', ' : '') + + data.room_view_name}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Rate Plan

    +
    + +
    +
    +
    + Select + {{data.rate_plan_name}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Meal Plan

    +
    + +
    +
    +
    + Select + {{data.meal_plan_name}} +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Contract Status + + + + Contract Id + + + + Contract Name + + + + Room Id + + + + Room Name + + + + Rate Plan + + + + Meal Plan + + + + Nationality Type + + + + Nationality Applicability + + + + Nationality + + + + Date Range/Season + + + + Currency + + + + Meal Add On + + + + Meals + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + + Last updated + + + Action + + + + + + + {{data.status}} + + + {{data.extranet_contract_id}} + {{data.contract_name}} + {{data.extranet_room_id}} + {{data.room_name}} + {{data.rate_plan_name}} + {{data.meal_plan_name}} + {{data.nationality_type}} + {{data.nationality_applicable_type}} + {{data.nationality}} + {{item}} + {{data.currency_code}} + {{data.is_meal_addon_applicable}} + {{data.addon_name}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + {{data.last_updated}} + +
    + + + + + + + + + + + + +
    + + +
    + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.component.ts b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.component.ts new file mode 100644 index 0000000..82eca1f --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.component.ts @@ -0,0 +1,175 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import * as moment from 'moment'; +import { forkJoin } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'rate-setting', + templateUrl: './rate-setting.component.html', +}) +export class RateSettingComponent implements OnInit { + displayPosition: boolean; + position: string; + Extranet_Hotel_Id; + AllMealPlan; + AllRatePlan; + Result; + AllRoomsData; + ExtranetMealPlan; + ExtranetRatePlan; + HotelRoomContractForm:FormGroup; + ExtranetRoom; + cols; + constructor(public activateRoute:ActivatedRoute,private router:Router, public apiserv:API,public _commonService:CommonFunctionService, + public validserv:ValidationService,public fb:FormBuilder) { } + + ngOnInit(): void { + this.Extranet_Hotel_Id = this.activateRoute.snapshot.paramMap.get('Hotel_Eaxtranet_Id') as string; + this.cols = [ + { field: 'extranet_contract_id', header: 'Contract Id' }, + { field: 'contract_name', header: 'Contract Name' }, + { field: 'extranet_room_id', header: 'Room Id' }, + { field: 'room_name', header: 'Room Name' }, + { field: 'rate_plan_name', header: 'Rate Plan' }, + { field: 'meal_plan_name', header: 'Meal Plan' }, + { field: 'nationality_type', header: 'Nationality Type' }, + { field: 'nationality_applicable_type', header: 'Nationality Applicability' }, + { field: 'nationality', header: 'Nationality' }, + { field: 'date_range', header: 'Date Range/Season' }, + { field: 'currency_code', header: 'Currency' }, + { field: 'is_meal_addon_applicable', header: 'Meal Add On' }, + { field: 'addon_name', header: 'Meals' }, + { field: 'status', header: 'Contract Status' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + { field: 'last_updated', header: 'Last Updated' }, + ]; + this.getAllData(); + this.HotelRoomContractForm = this.fb.group({ + contract_name:this.validserv.required, + }) + } + getAllData() { + forkJoin( + this.GetAllRooms(), + this.GetAllPlan(), + this.GetAllMealPlan() + ).subscribe(res=>{ + if(res && res.length > 0){ + this.AllRoomsData = res[0] ? res[0].data : []; + this.AllRatePlan = res[1] ? res[1].data : []; + this.AllMealPlan = res[2].data; + } + }); + } + showPositionDialog(position) { + this.position = position; + this.displayPosition = true; + }; + GetAllPlan(){ + return this.apiserv.Get('/ExtranetRoomContract/GetAllExtranetHotelRatePlan/EN') + } + GetAllMealPlan(){ + return this.apiserv.Get('/ExtranetMealAddon/GetAllExtranetMeal/EN') + } + GetAllRooms(){ + let ReqObj = { + extranet_hotel_id : this.Extranet_Hotel_Id, + extranet_room_id : '', + room_name : '', + room_view_name : '', + } + return this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetHotelRoomName',ReqObj) + } + updateStatus(id, val) { + let obj = { + Id: id, + Status: val ? false : true, + }; + this.apiserv.Post('/ExtranetRoomContract/UpdateExtranetRoomContractStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + Search(){ + let ReObj = { + extranet_hotel_id:this.Extranet_Hotel_Id, + extranet_room_id:this.ExtranetRoom ? this.ExtranetRoom : '', + extranet_rate_plan_id:this.ExtranetRatePlan ? this.ExtranetRatePlan : '', + extranet_meal_plan_id:this.ExtranetMealPlan ? this.ExtranetMealPlan : '' + } + this.apiserv.Post('/ExtranetRoomContract/GetAllExtranetRoomContract',ReObj).subscribe(res=>{ + if (res) { + this.Result = res.data ? res.data : []; + if (res.data) { + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['nationality_type'] = this.getNationalityType(e['nationality_type']) ; + e['nationality_applicable_type'] = this.getNationalityApplicabilityType(e['nationality_applicable_type']) ; + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + e['date_range_arr'] = e['contract_dates'] ? JSON.parse(e['contract_dates']) : []; + if(typeof(e['date_range_arr']) != 'string'){ + e.date_range_arr.forEach((data,ind)=>{ + e.date_range_arr[ind] = moment(data.date_from).format('DD MMM YYYY') + ' - ' + moment(data.date_to).format('DD MMM YYYY'); + }) + } + e['date_range'] = e.date_range_arr.length > 0 ? e.date_range_arr.join(',') : ''; + }); + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + } + } + }) + } + Reset(){ + this.ExtranetMealPlan = undefined; + this.ExtranetRatePlan = undefined; + this.ExtranetRoom = undefined; + } + Update(Id,pagename){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/${pagename}/${this.Extranet_Hotel_Id}/${Id}`); + } + EditContract(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/RoomContractEdit/${this.Extranet_Hotel_Id}/${Id}`); + } + getNationalityType(value){ + if(value == 'INCLUDE'){ + return 'Include' + }else if(value == 'EXCLUDE'){ + return 'Exclude' + } + return '' + } + getNationalityApplicabilityType(value){ + if(value == 'ALL'){ + return 'All' + }else if(value == 'SPECIFIC'){ + return 'Specific' + } + return '' + } + RoomView(Id){ + this.router.navigateByUrl(`Services/Hotel/HotelManage/CloneContract/${this.Extranet_Hotel_Id}/${Id}`); + } +} diff --git a/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.module.ts b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.module.ts new file mode 100644 index 0000000..eee06e5 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-manage/rate-setting/rate-setting.module.ts @@ -0,0 +1,73 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RateSettingComponent } from './rate-setting.component'; +import { RouterModule, Routes } from '@angular/router'; +import { MatMenuModule } from '@angular/material/menu'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FileUploadModule } from 'primeng/fileupload'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { RateSettingAddComponent } from './rate-setting-add/rate-setting-add.component'; +import { CalendarModule } from 'primeng/calendar'; +import { TabViewModule } from 'primeng/tabview'; +import { SubTab1Component } from './rate-setting-add/sub-tab-content/sub-tab1/sub-tab1.component'; +import { SubTab2Component } from './rate-setting-add/sub-tab-content/sub-tab2/sub-tab2.component'; +import { SubTab3Component } from './rate-setting-add/sub-tab-content/sub-tab3/sub-tab3.component'; +import { TooltipModule } from 'primeng/tooltip'; + +const routes: Routes = [ + { + path: 'RoomContractAdd/:Hotel_Eaxtranet_Id', + component:RateSettingAddComponent, + }, + { + path: 'RoomContractEdit/:Hotel_Eaxtranet_Id/:RuleId', + component:RateSettingAddComponent, + }, + { + path: 'CloneContract/:Hotel_Eaxtranet_Id/:RuleId', + component:RateSettingAddComponent, + }, +] + +@NgModule({ + declarations: [ + RateSettingComponent, + RateSettingAddComponent, + SubTab1Component, + SubTab2Component, + SubTab3Component + ], + imports: [ + CommonModule, + ToastModule, + TableModule, + DialogModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + TooltipModule, + MatCheckboxModule, + ButtonModule, + FileUploadModule, + NgSelectModule, + TabViewModule, + RouterModule.forChild(routes), + ], + exports:[ + RateSettingComponent + ] +}) +export class RateSettingModule { } diff --git a/src/app/modules/services/hotel/hotel-search/hotel-search.component.html b/src/app/modules/services/hotel/hotel-search/hotel-search.component.html new file mode 100644 index 0000000..a2dbab8 --- /dev/null +++ b/src/app/modules/services/hotel/hotel-search/hotel-search.component.html @@ -0,0 +1,312 @@ +
    +
    +
    +

    Hotel Search

    +
    + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Hotel Name

    +
    + +
    +
    +
    + + {{item.hotelName }} {{item.cityName }}, {{item.countryName }} + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Vendor Name

    +
    + +
    +
    +
    + Select + {{data.vendor_name}} +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Star Rating

    +
    + +
    +
    +
    + Select + 1 Star + 2 Star + 3 Star + 4 Star + 5 Star +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Country

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    City

    +
    + +
    +
    +
    + + {{item.cityName }}, {{item.countryName }} + +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Status

    +
    + +
    +
    +
    + Select + Active + Deactive +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + + Status + + + + Hotel Name + + + + Hotel Mapping Code + + + + Vendor Name + + + + Star Rating + + + + Country + + + + City + + + + Currency + + + + Extranet Hotel Id + + + + Created By + + + + Created On + + + + Updated By + + + + Updated On + + + Action + + + + + + + {{data.status}} + + + {{data.hotel_name}} + {{data.hotel_code_mapping}} + {{data.vendor_name}} + {{data.star_rating}} + {{data.country}} + {{data.city}} + {{data.currency}} + {{data.extranet_hotel_id}} + {{data.created_by}} + {{data.Custom_created_on}} + {{data.updated_by}} + {{data.Custom_updated_on}} + + + + + + + + + + + + + No data found + + +
    +
    \ No newline at end of file diff --git a/src/app/modules/services/hotel/hotel-search/hotel-search.component.ts b/src/app/modules/services/hotel/hotel-search/hotel-search.component.ts new file mode 100644 index 0000000..e7d9f7b --- /dev/null +++ b/src/app/modules/services/hotel/hotel-search/hotel-search.component.ts @@ -0,0 +1,226 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { API } from 'src/app/core/services/api.service'; +import { environment } from 'src/environments/environment'; + +@Component({ + selector: 'app-hotel-search', + templateUrl: './hotel-search.component.html', +}) +export class HotelSearchComponent implements OnInit { + + constructor(private apiserv: API, public fb: FormBuilder, public _commonService: CommonFunctionService, private router: Router, private hotelmanageserv: ManageHotelService) { } + timer; + Result; + HotelList; + AllVendors; + cols; + Cdn_url = environment.cdnFileUrl; + All + ddLoader = { + Country: false, + city: false, + hotel_list: false, } + CountryList; + CityList; + HotelSearchForm: FormGroup; + ngOnInit(): void { + this.HotelSearchForm = this.fb.group({ + hotel_code_mapping: '', + vendor_id: '', + star_rating: '', + country_code: null, + city_code: null, + is_active: '' + }); + this.cols = [ + { field: 'hotel_name', header: 'Hotel Name' }, + { field: 'hotel_code_mapping', header: 'Hotel Mapping Code' }, + { field: "vendor_name", header: 'Vendor Name' }, + { field: 'star_rating', header: 'Star Rating' }, + { field: 'country', header: 'Country' }, + { field: 'city', header: 'City' }, + { field: 'currency', header: 'Currency' }, + { field: 'status', header: 'Status' }, + { field: 'extranet_hotel_id', header: 'Extranet Hotel Id' }, + { field: 'created_by', header: 'Created By' }, + { field: 'Custom_created_on', header: 'Created On' }, + { field: 'updated_by', header: 'Updated By' }, + { field: 'Custom_updated_on', header: 'Updated On' }, + ]; + this.GetallVendors(); + } + + getCountryList(event) { + if (event.value.length >= 2) { + this.ddLoader['Country'] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGet(`/MasterSearch/GetAllCountry/en/${event.value}`).subscribe(res => { + if (res) { + this.CountryList = res; + this.ddLoader['Country'] = false; + } + }); + }, 500); + } + } + GetallVendors(){ + this.apiserv.Get('/ExtranetHotel/GetAllVendorNameByOrg').subscribe(res => { + if(res && res.data){ + this.AllVendors = res.data; + } + }) + + } + getHotelCitySearch(event) { + if (event.value.length >= 2) { + let reqObj = { + cityName: event.value, + languageCode: 'en', + lattitude: '0', + longitude: '0' + } + this.ddLoader.city = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGoPost("/Hotel/GetHotelCities", reqObj).subscribe(res => { + if (res) { + this.CityList = res.cities; + this.ddLoader.city = false; + } + }); + }, 500); + } + if (!event.value) { + this.CityList = []; + } + }; + Search() { + let val = this.HotelSearchForm.getRawValue(); + let ReqObj = { + hotel_code_mapping: val.hotel_code_mapping ? val.hotel_code_mapping : '', + vendor_id: val.vendor_id ? val.vendor_id : '', + star_rating: val.star_rating ? parseInt(val.star_rating) : 0, + country_code: val.country_code ? val.country_code : '', + city_code: val.city_code ? val.city_code : '', + is_active: val.is_active ? val.is_active : '' + } + this.apiserv.Post('/ExtranetHotel/GetAllExtranetHotel', ReqObj).subscribe(res => { + if (res) { + this.Result = res.data ? res.data :[]; + if (res.data) { + this.Result.forEach(e => { + e['status'] = e.is_active ? 'Active' : 'Deactive'; + e['Custom_updated_on'] = this._commonService.convertDateWithTimeToShow(e.updated_on); + e['Custom_created_on'] = e['created_on'] ? this._commonService.convertDateWithTimeToShow(e.created_on) : e['created_on']; + }); + // customSort(event: SortEvent) { + this.Result.sort((a: any, b: any) => { + // Sort by status: Active first, then Deactive + if (a.status !== b.status) { + return a.status === 'Active' ? -1 : 1; + } + + // If both are Active, sort by activeDate + if (a.status === 'Active') { + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + } + + // If both are Deactive, sort by deactiveDate + return new Date(b.updated_on).getTime() - new Date(a.updated_on).getTime(); + }); + // } + } + } + }) + } + updateStatus(id, val) { + let obj = { + Id: id, + Status: val ? false : true, + }; + this.apiserv.Post('/ExtranetHotel/UpdateExtranetHotelStatus', obj).subscribe(res => { + if (res) { + this._commonService.showMessage(res['status'], res['message']); + res['status'] ? this.Search() : ''; + } + }); + } + ManageHotel(Id) { + this.hotelmanageserv.Active_tab = 'OverView' + this.router.navigateByUrl(`Services/Hotel/HotelManage/${Id}`); + } + Reset() { + this.HotelSearchForm = this.fb.group({ + hotel_code_mapping: '', + vendor_id: '', + star_rating: '', + country_code: null, + city_code: null, + is_active: '' + }); + } + + GetHotels(event){ + if (event.value.length >= 2) { + let obj ={ + languageCode:'en', + cityName:event.value, + lattitude:'0', + longitude:'0', + } + this.ddLoader['hotel_list'] = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.apiserv.AdminGoPost(`/Hotel/GetHotels`,obj).subscribe(res => { + if (res) { + this.HotelList = res.hotels; + this.ddLoader['hotel_list'] = false; + } + }); + }, 500); + } +} +btnClick() { + this.router.navigateByUrl("Services/Hotel/HotelAdd"); + } + SelectImage(e, filedata, extranet_hotel_id) { + if (e.currentFiles.length != 0) { + let file = e.files[0]; + if (file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') { + const reader = new FileReader(); + console.log(file) + reader.readAsText(file); // Read as binary data + reader.onload = (res) => { + const binaryString = res.target.result as string; + const hasScriptTag = this._commonService.hasScriptTagInBinary(binaryString); + if (hasScriptTag) { + filedata.clear(); + this._commonService.showMessage(false, 'Invalid file (contains script tag)'); + } else { + //base 64 + // this.HotelRoomForm.get(contol).setValue(file); + // if (fileInfo && fileInfo.length > 0 && fileArr && fileArr.length > 0) { + let formdata = new FormData(); + // fileArr.forEach((x) => { + formdata.append("file", file); + formdata.append("extranet_hotel_id", extranet_hotel_id); + // }); + filedata.clear(); + // let file_info_list = JSON.stringify(fileInfo).replaceAll('ExtranetRoomId', edit_id); + this.apiserv.PostFileExtranet("/ExtranetHotelUpload/UploadHotelContrctFromFile", formdata).subscribe(res=>{ + if(res){ + this._commonService.showMessage(res.status,res.message); + } + }); + // } + }; + } + } + } + } +} diff --git a/src/app/modules/services/hotel/hotel.component.html b/src/app/modules/services/hotel/hotel.component.html new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/services/hotel/hotel.component.ts b/src/app/modules/services/hotel/hotel.component.ts new file mode 100644 index 0000000..cd3475a --- /dev/null +++ b/src/app/modules/services/hotel/hotel.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-hotel', + templateUrl: './hotel.component.html', +}) +export class HotelComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/services/hotel/hotel.module.ts b/src/app/modules/services/hotel/hotel.module.ts new file mode 100644 index 0000000..fff9c7a --- /dev/null +++ b/src/app/modules/services/hotel/hotel.module.ts @@ -0,0 +1,70 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { HotelComponent } from './hotel.component'; +import { HotelAddComponent } from './hotel-add/hotel-add.component'; +import { HotelSearchComponent } from './hotel-search/hotel-search.component'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { CalendarModule } from 'angular-calendar'; +import { DialogModule } from 'primeng/dialog'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToastModule } from 'primeng/toast'; +import { ToolbarModule } from 'primeng/toolbar'; +import { ButtonModule } from 'primeng/button'; +import { ManageHotelService } from 'src/app/core/services/HotelServices/manage-hotel.service'; +import { FileUploadModule } from 'primeng/fileupload'; + + +const routes: Routes = [ + { + path: 'HotelSearch', + component:HotelSearchComponent, + }, + { + path: 'HotelAdd', + component:HotelAddComponent, + }, + { + path: '', + component:HotelComponent, + }, + { + path: 'HotelManage', + loadChildren: () => + import('./hotel-manage/hotel-manage.module').then( + (m) => m.HotelManageModule + ), + }, +] +@NgModule({ + declarations: [ + HotelComponent, + HotelSearchComponent, + HotelAddComponent + ], + imports: [ + ToastModule, + TableModule, + DialogModule, + CommonModule, + FileUploadModule, + ToolbarModule, + MatMenuModule, + CalendarModule, + NgSelectModule, + InputTextModule, + ReactiveFormsModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + ButtonModule, + RouterModule.forChild(routes), + ], + providers:[ManageHotelService ] +}) +export class HotelModule { } diff --git a/src/app/modules/services/services.module.ts b/src/app/modules/services/services.module.ts new file mode 100644 index 0000000..011bea8 --- /dev/null +++ b/src/app/modules/services/services.module.ts @@ -0,0 +1,76 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule, Routes } from '@angular/router'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +// import { ExpServicesComponent } from './activity-services/exp-services/exp-services.component'; + +const routes: Routes = [ + { + path: 'Hotel', + loadChildren: () => + import('./hotel/hotel.module').then( + (m) => m.HotelModule + ), + }, + { + path: 'ActivityInventory', + loadChildren: () => + import('./activity/activity.module').then( + (m) => m.ActivityModule + ), + }, + { + path: 'ActivityConfing', + loadChildren: () => + import('./activity-config/activity-config.module').then( + (m) => m.ActivityConfigModule + ), + }, + + { + path: 'ActivityServices', + loadChildren: () => + import( + './activity-services/activity-services.module' + ).then((m) => m.ActivityServicesModule), + }, + { + path: 'FlightServices', + loadChildren: () => + import('./flight-services/flight-services.module').then( + (m) => m.FlightServicesModule + ), + }, + { + path: 'FlightInventory', + loadChildren: () => + import('./flight-inventory/flight-inventory.module').then( + (m) => m.FlightInventoryModule + ), + }, + { + path: 'FlightInventoryReport', + loadChildren: () => + import('./flight-inventory-report/flight-inventory-report.module').then( + (m) => m.FlightInventoryReportModule + ), + }, + { + path: '', + pathMatch: 'full', + redirectTo: 'search', + }, +]; + +@NgModule({ + declarations: [ + + ], + imports: [ + CommonModule, + FormsModule, + ReactiveFormsModule, + RouterModule.forChild(routes), + ], +}) +export class ServicesModule {} diff --git a/src/app/modules/user-configuration/role-management/role-add/role-add.component.html b/src/app/modules/user-configuration/role-management/role-add/role-add.component.html new file mode 100644 index 0000000..3fe37c3 --- /dev/null +++ b/src/app/modules/user-configuration/role-management/role-add/role-add.component.html @@ -0,0 +1,132 @@ + +
    +
    +
    +
    +

    Add Role Management

    +
    +
    +
    +
    +
    +
    + + + Please + enter role name +
    +
    +
    +
    + + + Please + enter role description +
    +
    +
    +
    + Role Type + + + Please + select role type +
    +
    + +
    +
    +
    +
    + + + + + {{ col.header }} + + + + + + + + + + + {{ rowData.menu_name }} + + + + +
    + + View +
    + + +
    + + Add +
    + + +
    + + Edit +
    + + +
    + + Download +
    + + +
    + + Status +
    + + +
    +
    +
    +
    + Active +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/src/app/modules/user-configuration/role-management/role-add/role-add.component.ts b/src/app/modules/user-configuration/role-management/role-add/role-add.component.ts new file mode 100644 index 0000000..e8c6943 --- /dev/null +++ b/src/app/modules/user-configuration/role-management/role-add/role-add.component.ts @@ -0,0 +1,605 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { TreeNode } from 'primeng/api'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { securityFunctions } from 'src/app/core/common/security'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { dtoRoleAccessMapping, dtoRoleMaster, dtoRoleMaster_Root } from 'src/app/core/models/user-role-management/user-role.model'; +import { API } from 'src/app/core/services/api.service'; + +interface Column { + field: string; + header: string; +} + +@Component({ + selector: 'app-role-add', + templateUrl: './role-add.component.html', +}) + +export class RoleAddComponent implements OnInit { + + constructor( + private router: Router, + private ApiServ: API, + public fb: FormBuilder, + public validationServ: ValidationService, + public route: ActivatedRoute, + public commonServ: CommonFunctionService + ) { } + files!: TreeNode[]; + selectedNodes: TreeNode[] = [] + HeaderList!: Column[]; + formdata: FormGroup; + allStaff; + EditId; + newMenuList = []; + RoleAccessMapping = []; + AllMenuMasterNew; + roleAccessMappingdata; + roleType = [ + { value: 'Extranet', label: 'Extranet' } + ] + ngOnInit(): void { + this.ngOnintForm(); + this.ngOinitEditForm(); + this.commonServ.LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null + this.HeaderList = [ + { field: 'menu_name', header: 'Name' }, + { field: 'View', header: 'View' }, + { field: 'Add', header: 'Add' }, + { field: 'Edit', header: 'Edit' }, + { field: 'Download', header: 'Download' }, + { field: 'Status', header: 'Status' }, + ]; + } + ngOnintForm() { + let VData = JSON.parse(securityFunctions.getSessionStorage('VData')); + console.log(VData); + this.formdata = this.fb.group({ + role_name: this.validationServ.required, + reporting_role_id: [''], + role_description: this.validationServ.required, + role_type: ['Extranet'], + extranet_vendor_id: [VData.vendor_name], + is_active: [false] + }); + this.formdata.get('role_type').disable(); + this.formdata.get('extranet_vendor_id').disable(); + this.GetAllMenu(false); + }; + + + + /** + * @author Abdul razzak + * @description Copies and binds menu items based on the provided list. + * @param {array} list - The list of menu items to copy and bind. + */ + CopyBindMenu(list) { + let role_type = '2405170833594899108' + let aisemenu = []; + // Sort the list based on sequence + let FliterList = list.sort(function (a, b) { return a.sequence - b.sequence; }); + // Filter all parent menu items + let AllParentlist = list.filter(e => (role_type == '2405170833594899108' ? true : e.ui_controller == '') && e.parent_id == ''); + AllParentlist.forEach(e => { + // Check menu type and push data accordingly + if (e.menu_type == '2305170833594899101') { + aisemenu.push( + { + "data": { + "menu_name": e.menu_name, + "menu_id": e.menu_id, + "View": false, + "Add": false, + "Edit": false, + "Download": false, + "Status": false, + }, + // "parent": null, + "children": [] + } + ); + } else { + aisemenu.push( + { + "data": { + "menu_name": e.menu_name, + "menu_id": e.menu_id, + "View": false, + "Add": false, + "Edit": false, + "Status": false, + "Download": false, + } + } + ); + } + let index = aisemenu.length - 1; + // Filter submenu items for the current parent menu + let submenu = FliterList.filter(s => s.parent_id == e.menu_id); + // If submenu items exist, recursively copy submenu + if (submenu.length > 0) { + this.CopysubMenu(aisemenu[index], submenu, FliterList); + } + }); + this.newMenuList = aisemenu; + } + /** + * @author Abdul Razzak + * @description Copies submenu items and binds them to the provided menu. + * @param {object} menu - The menu object to which submenu items are to be copied and bound. + * @param {array} FilterSubmenu - The list of submenu items to copy and bind. + * @param {array} Allmenu - The list of all menu items. + */ + CopysubMenu(menu, FilterSubmenu, Allmenu) { + if (FilterSubmenu.length > 0) { + FilterSubmenu.forEach(e => { + // Check menu type and push data accordingly + if (e.menu_type == '2305170833594899101') { + menu.children.push( + { + "data": { + "menu_name": e.menu_name, + "menu_id": e.menu_id, + "View": false, + "Add": false, + "Edit": false, + "Download": false, + "Status": false, + }, + "children": [] + } + ); + } else { + menu.children.push( + { + "data": { + "menu_name": e.menu_name, + "menu_id": e.menu_id, + "View": false, + "Add": false, + "Edit": false, + "Download": false, + "Status": false, + } + } + ); + } + let index = menu.children.length - 1; + // Filter submenu items for the current submenu + let submenu = Allmenu.filter(a => a.parent_id == e.menu_id); + // If submenu items exist, recursively copy submenu + if (submenu.length > 0) { + this.CopysubMenu(menu.children[index], submenu, Allmenu); + } + }) + } + } + /** + * @author Abdul Razzak + * @description Checks data against provided list and updates selectedNodes accordingly. + * @param data - The data object to be checked. + * @param list - The list object containing flags for Add, Edit, and View. + * @param name - The name of the property to be updated in data.node.parent. + */ + checkData(data, list, name) { + // If View permission is not granted, disable Add and Edit + if (!list.View) { + list.Add = false + list.Edit = false + list.Status = false + list.Download = false + }; + // If Add, Edit, and View permissions are granted, add data.node to selectedNodes + if (list.Add && list.Edit && list.View && list.Download && list.Status) { + this.selectedNodes = [...this.selectedNodes, data.node]; + } + // If any of the permissions are not granted, remove data.node from selectedNodes + else if (!list.Add || !list.Edit || !list.View || list.Status || list.Download) { + this.selectedNodes = this.selectedNodes.filter(selectedNode => selectedNode !== data.node); + }; + // Update parent data property if any of the permissions are granted + if (list.Add || list.Edit || list.View || list.Status || list.Download) { + if (data.node.parent) { + data.node.parent.data[name] = true; + } + }; + // Recursively check children nodes + if (data.node.children) this.CheeckcolumLevel(data, name, list[name]); + // Check if any parent or child nodes are checked + let parentdata = this.getParentNode(data.node); + this.isAnyParentOrChildChecked(parentdata); + }; + + + /** + * @author Abdul Razzak + * @description Function to check if any child node has properties (View, Edit, Add) set to true + * @param node + * @returns boolen + */ + isAnyChildChecked(node): any { + // If node has no children, check its own properties + if (!node.children || node.children.length === 0) { + return node.data.View || node.data.Edit || node.data.Add || node.data.Download || node.data.Status; + } + // If node has children, check each child recursively + for (const child of node.children) { + if (this.isAnyChildChecked(child)) { + return true; // If any child or its descendants are checked, return true + } + } + // If none of the children or their descendants are checked, return false + return false; + } + + /** + * @author Abdul Razzak + * @description Checks if any parent or child nodes are checked and updates their partialSelected property accordingly. + * @param {object} node - The node to check for parent or child checked status. + */ + isAnyParentOrChildChecked(node) { + if (!node) return; + // Check if any child nodes are checked + let isChildChecked = this.isAnyChildChecked(node); + // Check if all children are checked + let parentlevel = this.areAllChildrenChecked(node); + // Set partialSelected property for the current node based on child checked status + if (node.children && (isChildChecked) && !parentlevel) { + node.partialSelected = true; + this.selectedNodes = this.selectedNodes.filter(selectedNode => selectedNode !== node); + } else { + if (node.children && (isChildChecked)) { + node.partialSelected = true; + } else node.partialSelected = false + if (parentlevel) { + node.partialSelected = false + this.selectedNodes = [...this.selectedNodes, node]; + } + } + // Recursively set partialSelected property for all children + if (node.children) { + for (const child of node.children) { + this.isAnyParentOrChildChecked(child); + } + } + } + + /** + * @author Abdul Razzak + * @description Checks the parent level permissions for a given node and its children. + * @param {object} data - The data object containing the node whose permissions are to be checked. + * @param {boolean} val - The value to set for Add, Edit, and View permissions. + */ + CheckParentLevel(data, val) { + if (data.node) { + // Set Add, Edit, and View permissions for the current node + data.node.data.Add = val; + data.node.data.Edit = val; + data.node.data.View = val; + data.node.data.Status = val; + data.node.data.Download = val; + // Recursively check child level permissions if children exist + data.node['children'] ? this.checkchildLevel(data.node['children'], val) : ''; + }; + }; + /** + * @author Abdul Razzak + * @description Checks the child level permissions for a given submenu and its children. + * @param {array} submenu - The array containing submenu items whose permissions are to be checked. + * @param {boolean} val - The value to set for Add, Edit, and View permissions. + */ + checkchildLevel(submenu, val) { + submenu.forEach(e => { + // Set Add, Edit, and View permissions for each submenu item + e.data.Add = val; + e.data.Edit = val; + e.data.Status = val; + e.data.Download = val; + e.data.View = val; + if (e['children']) { + // Recursively check child level permissions if children exist + this.checkchildLevel(e['children'], val); + } + }) + }; + + + /** + * @author Abdul Razzak + * @description Checks the column level permissions for a given node and its children. + * @param {object} data - The data object containing the node whose permissions are to be checked. + * @param {string} name - The name of the permission to be checked (e.g., 'View', 'Add', 'Edit'). + * @param {boolean} val - The value to set for the specified permission. + */ + CheeckcolumLevel(data, name, val) { + if (data.node) { + // Set Add and Edit permissions to false if View permission is set to false + name == 'View' && !val ? data.node.data.Add = val : ''; + name == 'View' && !val ? data.node.data.Edit = val : ''; + name == 'View' && !val ? data.node.data.Status = val : ''; + name == 'View' && !val ? data.node.data.Download = val : ''; + // Set the specified permission for the current node + data.node.data[name] = val; + // Recursively set column level permissions for children if they exist + data.node['children'] ? this.SetchildcolumLevel(data.node['children'], name, val) : ''; + } + }; + + /** + * @author Abdul Razzak + * @description Sets the column level permissions for children submenu items. + * @param {array} submenu - The array containing submenu items whose permissions are to be set. + * @param {string} name - The name of the permission to be set (e.g., 'View', 'Add', 'Edit'). + * @param {boolean} val - The value to set for the specified permission. + */ + SetchildcolumLevel(submenu, name, val) { + submenu.forEach(e => { + // Set Add and Edit permissions to false if View permission is set to false + name == 'View' && !val ? e.data.Add = val : ''; + name == 'View' && !val ? e.data.Edit = val : ''; + name == 'View' && !val ? e.data.Status = val : ''; + name == 'View' && !val ? e.data.Download = val : ''; + // Set the specified permission for the submenu item + if (name != 'View') e.data.View ? e.data[name] = val : ''; + else e.data[name] = val; + // Update selectedNodes based on permissions + if (e.data.Add && e.data.Edit && e.data.View && e.data.Status && e.data.Download) { + this.selectedNodes = [...this.selectedNodes, e]; + } else if (!e.data.Add || !e.data.Edit || !e.data.View || e.data.Status || e.data.Download) { + this.selectedNodes = this.selectedNodes.filter(selectedNode => selectedNode !== e); + }; + // Recursively set column level permissions for children if they exist + if (e['children']) { + this.SetchildcolumLevel(e['children'], name, val); + } + }) + + }; + + /** + * @author Abdul Razzak + * @description Checks a TreeNode and adds it to the selectedNodes if it's not already included. + * @param {TreeNode} node - The TreeNode to be checked and added. + */ + checkNode(node: TreeNode) { + if (!this.selectedNodes.includes(node)) { + this.selectedNodes = [...this.selectedNodes, node]; + } + }; + /** + * @author Abdul Razzak + * @description Finds a TreeNode with the specified menu ID within an array of TreeNode objects. + * @param {TreeNode[]} nodes - The array of TreeNode objects to search. + * @param {number} menuId - The menu ID to search for. + * @returns {TreeNode | null} - The matching TreeNode if found, otherwise null. + */ + findMatchingNode(nodes: TreeNode[], menuId: number): TreeNode | null { + for (const node of nodes) { + if (node.data.menu_id === menuId) { + return node; + } + if (node.children) { + const matchingChild = this.findMatchingNode(node.children, menuId); + if (matchingChild) { + return matchingChild; + } + } + } + + return null; + }; + + /** + * @author Abdul Razzak + * @description Checks if all children and their descendants of a TreeNode are checked. + * @param {TreeNode} node - The TreeNode to check. + * @returns {boolean} - True if all children and their descendants are checked, otherwise false. + */ + areAllChildrenChecked(node): boolean { + if (!node.children || node.children.length === 0) { + // If node has no children, return true if node's permissions are all true + return node.data.View && node.data.Edit && node.data.Add && node.data.Download && node.data.Status; + } + for (const child of node.children) { + // Recursively check all children and their descendants + if (!this.areAllChildrenChecked(child)) { + return false; // If any child or its descendants are not checked, return false + } + } + return true; // All children and their descendants are checked + }; + + /** + * @author Abdul Razzak + * @description Recursively finds the topmost parent node of the given node. + * @param node - The node whose parent is to be found. + * @returns - The topmost parent node. + */ + getParentNode(node) { + // If node has a parent, recursively call getParentNode with the parent node + if (node.parent) { + return this.getParentNode(node.parent); // Return the result of the recursive call + } else { + // If node has no parent, return the node itself (topmost parent) + return node; + } + }; + + ngOinitEditForm() { + this.EditId = this.route.snapshot.paramMap.get('RuleId') as string; + if (this.EditId) { + this.ApiServ.AdminGet("/RoleMaster/GetAllRoleByRoleId_Root/" + this.EditId).subscribe((res) => { + if (res.respObj) { + this.setValue(res.respObj); + } + }); + } + }; + + /** + * @author Abdul Razzak + * @description Sets values for form fields based on the provided data. + * @param {object} data - The data object containing roleMaster and roleAccessMapping information. + */ + setValue(data) { + if (data.roleMaster) { + this.formdata.get('role_name').setValue(data.roleMaster['role_name']); + this.formdata.get('role_description').setValue(data.roleMaster['role_description']); + this.formdata.get('role_type').setValue(data.roleMaster['role_type']); + this.formdata.get('is_active').setValue(data.roleMaster['is_active']); + this.GetAllMenu(true); + } + this.roleAccessMappingdata = data.roleAccessMapping; + }; + /** + * @author Abdul Razzak + * @description Sets role access mapping based on the provided roleAccessMappingdata. + */ + setroleAccessMapping() { + if (this.roleAccessMappingdata) { + if (this.roleAccessMappingdata.length > 0) { + this.roleAccessMappingdata.forEach(r => { + let json = JSON.parse(r.permission) + if (json.View) { + let Obj = this.findMatchingNode(this.newMenuList, r.menu_id); + if (Obj) { + Obj.data['Add'] = json.Add; + Obj.data['Edit'] = json.Edit; + Obj.data['View'] = json.View; + Obj.data['Status'] = json.Status; + Obj.data['Download'] = json.Download; + if (Obj.data['Add'] && Obj.data['Edit'] && Obj.data['View'] && Obj.data['Status'] && Obj.data['Download']) { + this.selectedNodes = [...this.selectedNodes, Obj]; + } else if (!Obj.data['Add'] || !Obj.data['Edit'] || !Obj.data['View'] || Obj.data['Status'] || Obj.data['Download']) { + this.selectedNodes = this.selectedNodes.filter(selectedNode => selectedNode !== Obj); + }; + } + } + }) + this.newMenuList.forEach(e => { + let parentdata = this.getParentNode(e); + this.isAnyParentOrChildChecked(parentdata); + }) + } + } + }; + save() { + if (this.formdata.valid) { + let val = this.formdata.getRawValue(); + let postdata = new dtoRoleMaster() + postdata.reporting_role_id = ''; + postdata.role_description = val.role_description; + postdata.role_name = val.role_name; + postdata.role_type = val.role_type; + postdata.extranet_vendor_id = this.commonServ.LoginUserData.extranet_vendor_id; + postdata.is_active = val.is_active; + postdata.role_id = this.EditId ? this.EditId : ''; + this.RoleAccessMapping = []; + if (this.newMenuList.length > 0) { + this.newMenuList.forEach(MainObj => { + let e = MainObj.data + let PostdataArr = new dtoRoleAccessMapping(); + PostdataArr.project_id = ''; + PostdataArr.menu_id = e.menu_id; + PostdataArr.is_active = val.is_active; + let obj = {} + obj['View'] = e.View; + obj['Add'] = e.Add; + obj['Delete'] = e.Delete; + obj['Edit'] = e.Edit; + obj['Status'] = e.Status; + obj['Download'] = e.Download; + PostdataArr.permission = JSON.stringify(obj); + this.RoleAccessMapping.push(PostdataArr) + MainObj['children'] ? this.AddSubmenu(MainObj['children']) : ''; + }) + } + let postObj = new dtoRoleMaster_Root(); + postObj.roleMaster = postdata; + postObj.roleAccessMapping = this.RoleAccessMapping; + let url = this.EditId ? "UpdateRoleMaster_Root" : "SaveRoleMaster_Root"; + this.ApiServ.AdminPost("/RoleMaster/"+ url, postObj).subscribe( + (res) => { + if (res) { + res["resp"] ? this.showToastrMsg(res) : this.showToastrMsg(res); + } + } + ); + } else { + this.validationServ.showValidationsMsg(this.formdata); + } + }; + + /** + * @author Abdul Razzak + * @description Adds submenu items to the RoleAccessMapping array based on the provided data. + * @param {TreeNode[]} data - The array of TreeNode objects representing submenu items. + */ + AddSubmenu(data) { + let val = this.formdata.getRawValue(); + data.forEach(MainObj => { + let e = MainObj.data + let PostdataArr = new dtoRoleAccessMapping(); + PostdataArr.project_id = ''; + PostdataArr.menu_id = e.menu_id; + PostdataArr.is_active = val.is_active; + let obj = {} + obj['View'] = e.View; + obj['Add'] = e.Add; + obj['Delete'] = e.Delete; + obj['Edit'] = e.Edit; + obj['Status'] = e.Status; + obj['Download'] = e.Download; + PostdataArr.permission = JSON.stringify(obj); + this.RoleAccessMapping.push(PostdataArr); + MainObj['children'] ? this.AddSubmenu(MainObj.children) : '' + }); + }; + + showToastrMsg(respData) { + this.commonServ.showMessage(respData['resp'], respData['respMsg']); + setTimeout(() => { + respData["resp"] ? this.BackButton() : ""; + }, 500); + }; + + /** + * Navigates to the view page of Role Management when the back button is clicked. + */ + BackButton() { + this.router.navigateByUrl("UserConfiguration/RoleManagement/Search"); + }; + + + /** + * @author Abdul Razzak + * @description Retrieves all menu items based on the project ID and affiliate ID (if present), + * and updates the menu list accordingly. Optionally triggers role access mapping setting. + * @param {boolean} check - Indicates whether to set role access mapping after updating the menu list. + */ + GetAllMenu(check) { + this.commonServ.LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null + if (this.commonServ.LoginUserData.extranet_vendor_id) { + this.ApiServ.AdminGet(`/MenuMasterNew/GetMenuMasterNewsByOrgId/2405170833594899108`).subscribe(res => { + if (res) { + this.AllMenuMasterNew = res; + this.CopyBindMenu(this.AllMenuMasterNew); + if (check) { + this.setroleAccessMapping() + } + } + }) + } else { + this.newMenuList = []; + } + }; + + backClick() { + this.router.navigateByUrl("/UserConfiguration/RoleManagement/Search"); + } + +} diff --git a/src/app/modules/user-configuration/role-management/role-management.component.html b/src/app/modules/user-configuration/role-management/role-management.component.html new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/user-configuration/role-management/role-management.component.scss b/src/app/modules/user-configuration/role-management/role-management.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/user-configuration/role-management/role-management.component.ts b/src/app/modules/user-configuration/role-management/role-management.component.ts new file mode 100644 index 0000000..24ec213 --- /dev/null +++ b/src/app/modules/user-configuration/role-management/role-management.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-role-management', + templateUrl: './role-management.component.html', + styleUrls: ['./role-management.component.scss'] +}) +export class RoleManagementComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/user-configuration/role-management/role-management.module.ts b/src/app/modules/user-configuration/role-management/role-management.module.ts new file mode 100644 index 0000000..4b25d47 --- /dev/null +++ b/src/app/modules/user-configuration/role-management/role-management.module.ts @@ -0,0 +1,68 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Routes, RouterModule } from '@angular/router'; +import { RoleViewComponent } from './role-view/role-view.component'; +import { RoleAddComponent } from './role-add/role-add.component'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { TreeModule } from 'primeng/tree'; +import { TreeTableModule } from 'primeng/treetable'; +import { ButtonModule } from 'primeng/button'; +import { TreeSelectModule } from 'primeng/treeselect'; +import { CheckboxModule } from 'primeng/checkbox'; +import { TriStateCheckboxModule } from 'primeng/tristatecheckbox'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { NodeService } from 'src/app/core/services/nodeservice'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ToastModule } from 'primeng/toast'; +import { MessageService } from 'primeng/api'; +import { MatButtonModule } from '@angular/material/button'; + + +const routes: Routes = [ + { + path: 'Search', + component: RoleViewComponent, + }, + { + path: 'Add', + component: RoleAddComponent, + }, + { + path: 'Edit/:RuleId', + component: RoleAddComponent, + }, +] + + +@NgModule({ + declarations: [ + RoleViewComponent, + RoleAddComponent + ], + imports: [ + TableModule, + CommonModule, + MatMenuModule, + ToolbarModule, + ToastModule, + InputTextModule, + MatCheckboxModule, + TreeModule, + TreeSelectModule, + TreeTableModule, + ButtonModule, + CheckboxModule, + TriStateCheckboxModule, + FormsModule, + NgSelectModule, + MatButtonModule, + ReactiveFormsModule, + RouterModule.forChild(routes), + ], + providers: [NodeService,MessageService] +}) +export class RoleManagementModule { } diff --git a/src/app/modules/user-configuration/role-management/role-view/role-view.component.html b/src/app/modules/user-configuration/role-management/role-view/role-view.component.html new file mode 100644 index 0000000..96f32ff --- /dev/null +++ b/src/app/modules/user-configuration/role-management/role-view/role-view.component.html @@ -0,0 +1,145 @@ + +
    +
    +
    +

    Role Management

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + Role Id + + + Role Name + + + Role Type + + + + Vendor + + + Updated By + + + Updated On + + + Status + + + Action + + + + + + {{data.role_id}} + + {{data.role_name}} + + + {{data.role_type}} + + {{data.vendor_name}} + {{data.updated_by}} + {{data.Custom_updated_on }} + + + {{data.status}} + + + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    +
    + + \ No newline at end of file diff --git a/src/app/modules/user-configuration/role-management/role-view/role-view.component.ts b/src/app/modules/user-configuration/role-management/role-view/role-view.component.ts new file mode 100644 index 0000000..31c92a2 --- /dev/null +++ b/src/app/modules/user-configuration/role-management/role-view/role-view.component.ts @@ -0,0 +1,90 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { securityFunctions } from 'src/app/core/common/security'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-role-view', + templateUrl: './role-view.component.html', +}) +export class RoleViewComponent implements OnInit { + + cols: any[]; + allStaff; + role_name = ''; + reporting_role_id = ''; + role_description = ''; + AllRole; + @ViewChild('dt') myTable; + constructor( + private router: Router, + private ApiServ: API, + public commonServ: CommonFunctionService + ) { } + + ngOnInit(): void { + this.cols = [ + { field: "role_id", header: "Role Id" }, + { field: "role_name", header: "Role Name" }, + { field: "role_type", header: "Role Type" }, + { field: "affiliate_name", header: "Agency Name" }, + { field: "role_description", header: "Role Description" }, + { field: "reporting_role_id", header: "Reporting Role Id" }, + { field: "updated_by", header: "Updated By" }, + { field: "updated_on", header: "Updated On" }, + { field: "status", header: "Status" }, + ]; + } + roleType = { + Extranet: 'Extranet', + } + + + Search() { + let LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null + let searchObj = { + role_name: this.role_name, + role_description: this.role_description, + reporting_role_id: '', + extranet_vendor_id: LoginUserData.extranet_vendor_id, + } + this.ApiServ.AdminPost('/RoleMaster/GetAllRoleBySearchFilters', searchObj).subscribe(res => { + if (res) { + this.AllRole = res; + this.AllRole.forEach(e => { + e['role_type'] = this.roleType[e['role_type']] + e['status'] = e['is_active'] ? 'Active' : 'Deactive' + e['Custom_updated_on'] = this.commonServ.convertDateWithTimeToShow(e.updated_on); + }); + this.myTable ? this.myTable.first = 0 : ''; + } + }) + }; + + UpdateStatus(id, status) { + let obj = { + Id: id, + Status: status ? false : true, + }; + this.ApiServ.AdminPost("/RoleMaster/UpdateStatusRoleMaster", obj).subscribe( + (data) => { + if (data) { + this.commonServ.showMessage(data['resp'], data['respMsg']) + this.Search(); + } + } + ); + } + Edit(role_id) { + this.router.navigate(["UserConfiguration/RoleManagement/Edit/" + role_id]); + } + Reset() { + this.role_name = ''; + this.role_description = ''; + } + btnClick() { + this.router.navigateByUrl("/UserConfiguration/RoleManagement/Add"); + } + +} diff --git a/src/app/modules/user-configuration/user-configuration.module.ts b/src/app/modules/user-configuration/user-configuration.module.ts new file mode 100644 index 0000000..31ee954 --- /dev/null +++ b/src/app/modules/user-configuration/user-configuration.module.ts @@ -0,0 +1,34 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Routes, RouterModule } from '@angular/router'; +import { UserManagementComponent } from './user-management/user-management.component'; +import { RoleManagementComponent } from './role-management/role-management.component'; + +const routes: Routes = [ + { + path: 'RoleManagement', + loadChildren: () => + import('./role-management/role-management.module').then( + (m) => m.RoleManagementModule + ), + }, + { + path: 'UserManagement', + loadChildren: () => + import('./user-management/user-management.module').then( + (m) => m.UserManagementModule + ), + }, +] + +@NgModule({ + declarations: [ + RoleManagementComponent, + UserManagementComponent + ], + imports: [ + CommonModule, + RouterModule.forChild(routes), + ] +}) +export class UserConfigurationModule { } diff --git a/src/app/modules/user-configuration/user-management/user-add/user-add.component.html b/src/app/modules/user-configuration/user-management/user-add/user-add.component.html new file mode 100644 index 0000000..ae87043 --- /dev/null +++ b/src/app/modules/user-configuration/user-management/user-add/user-add.component.html @@ -0,0 +1,350 @@ + +
    +
    +
    +
    +

    Add User Management

    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + Please + enter name +
    +
    +
    +
    +
    + + + +
    +
    +
    +

    Contact Number

    +
    + +
    +
    +
    + {{ '(' + + data.MobileCode + +')' + ' ' + data.CountryName }} +
    + +
    +
    + +
    +
    + + Please enter a phone number + + please enter valid phone number + + The phone number should have a minimum of 5 digits + + + The phone number should not exceed 13 digit + +
    + +
    +
    +
    +
    + + + +
    +
    +
    +

    Country

    +
    + +
    +
    +
    + + {{item.country_name }} + +
    + Please + select country +
    +
    +
    +
    + + + +
    +
    +
    +

    City

    +
    + +
    +
    +
    + +
    + Please + select city + +
    +
    +
    +
    + + + +
    +
    +
    +

    Timezone

    +
    + +
    +
    +
    + {{timeZone.Utc + + ' ' + + timeZone.Timezone_Description}} +
    + Please + select timezone +
    +
    +
    +
    + + + +
    +
    +
    +

    User Role

    +
    + +
    +
    +
    + +
    + Please + select user role +
    +
    +
    +
    + + + Please enter + email Id + Invalid + email Id +
    +
    +
    +
    + +
    + + +
    + Please + enter + password + Please + check + the + password criteria +
      +
      +
    • + One + lowercase + letter
    • +
    • + One + uppercase + letter
    • +
    • + One + number
    • +
      +
      +
    • + One + special character
    • +
    • + 8 + characters + minimum
    • +
      +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + New Password +
    + + +
    + Please + Enter + New Password + Please + check the + password criteria +
      +
    • + One + lowercase letter
    • +
    • + One + uppercase letter
    • +
    • + One + number +
    • +
    • + One special character
    • +
    • + 8 + characters minimum
    • +
    +
    +
    +
    +
    + Confirm New Password +
    + + +
    + Please + Enter Confirm Password +
    +
    +
    +
    + + + +
    +
    +
    +
    + \ No newline at end of file diff --git a/src/app/modules/user-configuration/user-management/user-add/user-add.component.ts b/src/app/modules/user-configuration/user-management/user-add/user-add.component.ts new file mode 100644 index 0000000..371af0e --- /dev/null +++ b/src/app/modules/user-configuration/user-management/user-add/user-add.component.ts @@ -0,0 +1,262 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { forkJoin, of } from 'rxjs'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { securityFunctions } from 'src/app/core/common/security'; +import { ValidationService } from 'src/app/core/common/validation.service'; +import { changeUserLoginPassword } from 'src/app/core/models/common-model/userModel'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-user-add', + templateUrl: './user-add.component.html', +}) +export class UserAddComponent implements OnInit { + + constructor( + private router: Router, + private activateRoute: ActivatedRoute, + public fb: FormBuilder, + public commonService: CommonFunctionService, + private ApiServ: API, + public validationService: ValidationService, + + ) { } + + formdata: FormGroup; + Editid = null + PasswordForm: FormGroup; + NewPass = false; + confirmPass = false; + AllCountryNamePhone = []; + TimeZonedata = []; + + ngOnInit(): void { + this.Editid = this.activateRoute.snapshot.paramMap.get('RuleId') as string; + this.pageSetUp(); + }; + pageSetUp() { + this.FormOnInit(); + this.GetAllData(); + + }; + GetAllData() { + forkJoin( + this.GetUserDetailsById(this.Editid), + this.GetAllCountryNamePhone(), + this.getAllTimezoneData() + ).subscribe(res => { + if (res && res.length > 0) { + if (res[0]) this.FormSetvalue(res[0]['Result']) + else this.GetRoleData();; + + if (!this.Editid) this.formdata.addControl('password', this.validationService.passwordV2); + this.AllCountryNamePhone = res[1]; + this.TimeZonedata = res[2]; + } + }) + }; + FormOnInit() { + let VData = JSON.parse(securityFunctions.getSessionStorage('VData')); + this.formdata = this.fb.group({ + vendor_name: [VData.vendor_name], + first_name: this.validationService.required, + user_mobile_country_code: this.validationService.required, + user_mobile: ['', [Validators.required, Validators.pattern("^[0-9]*$"), + Validators.minLength(5), Validators.maxLength(13)]], + email: this.validationService.email, + country: this.validationService.required, + timezone: this.validationService.required, + city: [{ value: null, disabled: true }, Validators.required], + is_active: [], + role_id: this.validationService.required, + extranet_vendor_id: [], + }); + }; + initPasswordForm() { + this.PasswordForm = this.fb.group({ + new_password: this.validationService.passwordV2, + Confirm_password: this.validationService.required + }) + }; + save() { + if (this.formdata.invalid) { + this.validationService.showValidationsMsg(this.formdata) + return + } + let value = this.formdata.getRawValue(); + let user_login = { + first_name: value.first_name, + user_mobile_country_code: value.user_mobile_country_code, + user_mobile: value.user_mobile, + email: value.email.trim(), + country: value.country, + timezone: value.timezone, + city: value.city, + role_id: value.role_id, + password: this.Editid ? '' : value.password, + user_id: this.userDetails?.user_id ? this.userDetails?.user_id : '', + extranet_vendor_id: this.commonService.LoginUserData.extranet_vendor_id, + user_type: this.userDetails?.user_type ? this.userDetails?.user_type : '210526104324609566', + }; + let url = this.Editid ? '/Update' : '/Save'; + this.ApiServ.AdminGoPost('/ExtranetUserMaster'+url, user_login).subscribe(res => { + if (res) { + this.commonService.showMessage(res.Resp, res.Message); + setTimeout(() => { + res.Resp ? this.backClick() : ''; + }, 500); + } + }) + }; + UpdateUserPassword() { + let formValue = this.PasswordForm.getRawValue(); + if (this.PasswordForm.status == "INVALID") { + this.validationService.showValidationsMsg(this.PasswordForm); + return; + } + if (formValue.new_password === formValue.Confirm_password) { + let formData = new changeUserLoginPassword(); + formData.user_id = this.userDetails.user_id; + formData.password = formValue.Confirm_password; + formData.email = this.userDetails.email; + formData.user_type = this.userDetails.user_type; + let obj = { + key: securityFunctions.encryptRSA(securityFunctions.rsa_public_key, JSON.stringify(formData)), + }; + this.ApiServ.AdminGoPost('/ExtranetUserMaster/ChangedPassword', obj).subscribe(data => { + if (data) { + this.commonService.showMessage(data['Resp'], data['Message']); + setTimeout(() => { + data['Resp'] ? this.displayPosition = false : ""; + }, 500); + } + }) + } else { + this.commonService.showMessage(false, 'password does not match'); + } + }; + userDetails = undefined; + FormSetvalue(data) { + this.userDetails = data; + this.formdata.get('first_name').setValue(data.first_name); + this.formdata.get('user_mobile_country_code').setValue(data.user_mobile_country_code); + this.formdata.get('user_mobile').setValue(data.user_mobile); + this.formdata.get('email').setValue(data.email); + this.formdata.get('email').disable(); + this.formdata.get('country').setValue(data.country); + this.UpdateCountry(); + this.formdata.get('timezone').setValue(data.timezone); + this.formdata.get('city').setValue(data.city); + this.formdata.get('role_id').setValue(data.role_id); + if (data.user_type == '210526104324609565') { + this.formdata.get('role_id').disable(); + } + this.formdata.get('extranet_vendor_id').setValue(data.extranet_vendor_id); + data.user_type == '210526104324609565' ? this.UserTypeCheck = true : this.UserTypeCheck = false; + this.GetRoleData(); + let Countries = []; + let Cities = []; + if (data.Cities.length > 0) { + data.Cities.forEach(e => { + Cities.push({ + city_code: e._key, + city_name: e._value + }); + }); + this.commonService.CityList = Cities; + }; + if (data.Countries.length > 0) { + data.Countries.forEach(e => { + Countries.push({ + country_code: e._key, + country_name: e._value + }); + }); + this.commonService.CountryList = Countries; + }; + } + displayPosition!: boolean; + position!: string; + showPositionDialog(position: string) { + this.initPasswordForm(); + this.position = position; + this.displayPosition = true; + }; + + UpdateCountry() { + this.formdata.get('city').setValue(null); + if (this.formdata.get('country').value) { + this.formdata.get('city').enable(); + } else { + this.formdata.get('city').disable(); + } + }; + + backClick() { + this.router.navigateByUrl("/UserConfiguration/UserManagement/Search"); + }; + + GetAllVendorGroup() { + let searchObj = { + vendor_group_name: '', + } + return this.ApiServ.AdminGoPost('/ExtranetVendorGroupMaster/GetAll', searchObj) + }; + GetUserDetailsById(Editid) { + if (Editid) + return this.ApiServ.AdminGOGet('/ExtranetUserMaster/GetById/' + Editid) + else + return of(null) + }; + UserTypeCheck = false; + GetAllRoleByType() { + return this.ApiServ.AdminGet(`/RoleMaster/GetAllRoleByType/Extranet`) + } + + // All API + GetAllCountryNamePhone() { + return this.ApiServ.AdminGet('/CountryNamePhone/GetAllCountryNamePhone') + }; + + getAllTimezoneData() { + return this.ApiServ.AdminGet('/TimezoneCity/GetAllTimezoneCity') + }; + // ddLoader = false + // timer; + // AllVendor + // ExtranetVendorMaster(val) { + // if (val.length >= 2) { + // let searchObj = { + // vendor_name: val, + // }; + // this.ddLoader = true; + // clearTimeout(this.timer); + // this.timer = setTimeout(() => { + // this.ApiServ.AdminGoPost('/ExtranetVendorMaster/GetAll', searchObj).subscribe(res => { + // if (res) { + // this.AllVendor = res.Result; + // this.ddLoader = false; + // } + // }); + // }, 500); + // } + // if (!val) { + // this.AllVendor = []; + // } + // }; + allRoleList = [] + GetRoleData() { + if (this.commonService?.LoginUserData?.extranet_vendor_id) { + this.GetAllRoleByType().subscribe(res => { + if (res) { + this.allRoleList = res; + } + }) + } else { + this.allRoleList = [] + } + }; + +} diff --git a/src/app/modules/user-configuration/user-management/user-management.component.html b/src/app/modules/user-configuration/user-management/user-management.component.html new file mode 100644 index 0000000..1ca51cf --- /dev/null +++ b/src/app/modules/user-configuration/user-management/user-management.component.html @@ -0,0 +1 @@ +

    user-management works!

    diff --git a/src/app/modules/user-configuration/user-management/user-management.component.scss b/src/app/modules/user-configuration/user-management/user-management.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/user-configuration/user-management/user-management.component.ts b/src/app/modules/user-configuration/user-management/user-management.component.ts new file mode 100644 index 0000000..4a03c00 --- /dev/null +++ b/src/app/modules/user-configuration/user-management/user-management.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-user-management', + templateUrl: './user-management.component.html', +}) +export class UserManagementComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/user-configuration/user-management/user-management.module.ts b/src/app/modules/user-configuration/user-management/user-management.module.ts new file mode 100644 index 0000000..0151c3b --- /dev/null +++ b/src/app/modules/user-configuration/user-management/user-management.module.ts @@ -0,0 +1,58 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { UserViewComponent } from './user-view/user-view.component'; +import { UserAddComponent } from './user-add/user-add.component'; +import { MatMenuModule } from '@angular/material/menu'; +import { InputTextModule } from 'primeng/inputtext'; +import { TableModule } from 'primeng/table'; +import { ToolbarModule } from 'primeng/toolbar'; +import { RouterModule, Routes } from '@angular/router'; +import { NgSelectModule } from '@ng-select/ng-select'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { HTTP_INTERCEPTORS } from '@angular/common/http'; +import { InterceptLoader } from 'src/app/core/common/intercept-loader.service'; +import { ToastModule } from 'primeng/toast'; +import { MessageService } from 'primeng/api'; +import { MatButtonModule } from '@angular/material/button'; + +const routes: Routes = [ + { + path: 'Search', + component: UserViewComponent, + }, + { + path: 'Add', + component: UserAddComponent, + }, + { + path: 'Edit/:RuleId', + component: UserAddComponent, + }, +] + +@NgModule({ + declarations: [ + UserViewComponent, + UserAddComponent + ], + imports: [ + DialogModule, + ReactiveFormsModule, + FormsModule, + TableModule, + CommonModule, + ButtonModule, + MatMenuModule, + ToastModule, + ToolbarModule, + NgSelectModule, + InputTextModule, + MatButtonModule, + RouterModule.forChild(routes), + ], providers: [MessageService, + { provide: HTTP_INTERCEPTORS, useClass: InterceptLoader, multi: true } + ], +}) +export class UserManagementModule { } diff --git a/src/app/modules/user-configuration/user-management/user-view/user-view.component.html b/src/app/modules/user-configuration/user-management/user-view/user-view.component.html new file mode 100644 index 0000000..b1c4a90 --- /dev/null +++ b/src/app/modules/user-configuration/user-management/user-view/user-view.component.html @@ -0,0 +1,140 @@ + +
    +
    +
    +

    User Management

    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + + + + + + +
    + + + + +
    +
    +
    +
    + + + User Id + + Name + + Email Id + + Vendor + + User Role + + User Type + + Updated By + + Updated On + + Status + + Action + + + + + {{data.user_id}} + {{data.first_name}} + {{data.email}} + {{data.vendor_name}} + {{data.role_name}} + {{data.user_role}} + {{data.updated_by}} + {{data.custom_updated_on}} + + + {{data.status}} + + +
    + + + + + +
    + + +
    + + + No data found + + +
    +
    +
    + + \ No newline at end of file diff --git a/src/app/modules/user-configuration/user-management/user-view/user-view.component.ts b/src/app/modules/user-configuration/user-management/user-view/user-view.component.ts new file mode 100644 index 0000000..e84c55d --- /dev/null +++ b/src/app/modules/user-configuration/user-management/user-view/user-view.component.ts @@ -0,0 +1,108 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { CommonFunctionService } from 'src/app/core/common/common-function.service'; +import { securityFunctions } from 'src/app/core/common/security'; +import { API } from 'src/app/core/services/api.service'; + +@Component({ + selector: 'app-user-view', + templateUrl: './user-view.component.html', +}) +export class UserViewComponent implements OnInit { + + cols: any[]; + user_name = ''; + user_email = ''; + vendor_id = null; + AllExtranetUser; + @ViewChild('dt') myTable; + constructor( + private router: Router, + private ApiServ: API, + public commonserv: CommonFunctionService + ) { } + ngOnInit(): void { + this.commonserv.LoginUserData = securityFunctions.getSessionStorage('LoginUserData') ? JSON.parse(securityFunctions.getSessionStorage('LoginUserData')) : null + this.cols = [ + { field: "user_id", header: "User Id" }, + { field: "first_name", header: "Name" }, + { field: "email", header: "Email Id" }, + { field: "vendor_name", header: "Vendor" }, + { field: "role_name", header: "User Role" }, + { field: "user_role", header: "User Type" }, + { field: "updated_by", header: "Updated By" }, + { field: "updated_on", header: "Updated On" }, + { field: "status", header: "Status" }, + ]; + }; + + Search() { + let searchObj = { + first_name: this.user_name ? this.user_name : '', + email: this.user_email ? this.user_email : '', + extranet_vendor_id: this.commonserv.LoginUserData.extranet_vendor_id, + }; + this.ApiServ.AdminGoPost('/ExtranetUserMaster/GetAll', searchObj).subscribe(res => { + if (res) { + this.myTable.first = 0; + this.AllExtranetUser = res.Result; + this.AllExtranetUser.forEach(e => { + e['status'] = e['is_active'] ? 'Active' : 'Deactive' + e['custom_updated_on'] = this.commonserv.UtcToLocaleTime(e.updated_on, "DD MMM YYYY, HH:mm:ss"); + }); + } + }) + }; + + UpdateStatus(id, status) { + let obj = { + Id: id, + Status: status ? false : true, + }; + this.ApiServ.AdminGoPost("/ExtranetUserMaster/UpdateStatus", obj).subscribe( + (data) => { + if (data) { + this.commonserv.showMessage(data['Resp'], data['Message']); + this.Search(); + } + } + ); + }; + + Reset() { + this.user_name = ''; + this.user_email = ''; + this.vendor_id = null; + }; + + edit(user_id) { + this.router.navigate([`/UserConfiguration/UserManagement/Edit/${user_id}`]); + }; + ddLoader = false + timer; + AllVendor + ExtranetVendorMaster(val) { + if (val.length >= 2) { + let searchObj = { + vendor_name: val, + }; + this.ddLoader = true; + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.ApiServ.AdminPost('/ExtranetVendorMaster/GetAll', searchObj).subscribe(res => { + if (res) { + this.AllVendor = res.Result; + this.ddLoader = false; + } + }); + }, 500); + } + if (!val) { + this.AllVendor = []; + } + }; + + btnClick() { + this.router.navigateByUrl("/UserConfiguration/UserManagement/Add"); + } +} diff --git a/src/assets/.gitkeep b/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/assets/files-lazy.json b/src/assets/files-lazy.json new file mode 100644 index 0000000..4deaf89 --- /dev/null +++ b/src/assets/files-lazy.json @@ -0,0 +1,18 @@ +{ + "data": [{ + "label": "Lazy Node 0", + "data": "Node 0", + "leaf": false + }, + { + "label": "Lazy Node 1", + "data": "Node 1", + "leaf": false + }, + { + "label": "Lazy Node 1", + "data": "Node 2", + "leaf": false + } + ] +} \ No newline at end of file diff --git a/src/assets/files.json b/src/assets/files.json new file mode 100644 index 0000000..64af3bd --- /dev/null +++ b/src/assets/files.json @@ -0,0 +1,121 @@ +{ + "data": [ + { + "label": "Dining", + "children": [ + { + "label": "Fruits" + }, + { + "label": "pastries" + }, + { + "label": "Minibar" + }, + { + "label": "Minibar" + }, + { + "label": "Minibar" + }, + { + "label": "Minibar" + }, + { + "label": "Minibar" + }, + { + "label": "Minibar" + }, + { + "label": "Minibar" + } + ] + }, + { + "label": "Swimming pools", + "children": [ + { + "label": "Indoor Pool" + }, + { + "label": "Outdoor pool" + } + ] + }, + { + "label": "Media and Entertainment", + "children": [ + { + "label": "TV" + }, + { + "label": "Satellite or cable television" + } + ] + }, + { + "label": "Internet", + "children": [ + { + "label": "Locker" + }, + { + "label": "WiFi" + } + ] + }, + { + "label": "Personal Items", + "children": [ + { + "label": "Hair Dryers" + }, + { + "label": "Irons" + } + ] + }, + { + "label": "Television", + "children": [ + { + "label": "Cable TV" + }, + { + "label": "Satelite TV" + } + ] + }, + { + "label": "Facility", + "children": [ + { + "label": "Gym" + } + ] + }, + { + "label": "Bath and Personal Care", + "children": [ + { + "label": "Toiletries" + }, + { + "label": "Bathtub" + } + ] + }, + { + "label": "Refreshments", + "children": [ + { + "label": "Coffee or tea making facility" + }, + { + "label": "Minibar" + } + ] + } + ] +} diff --git a/src/assets/image/Hotel-Image.jpg b/src/assets/image/Hotel-Image.jpg new file mode 100644 index 0000000..472691a Binary files /dev/null and b/src/assets/image/Hotel-Image.jpg differ diff --git a/src/assets/image/hotel.jpeg b/src/assets/image/hotel.jpeg new file mode 100644 index 0000000..07a24c9 Binary files /dev/null and b/src/assets/image/hotel.jpeg differ diff --git a/src/assets/image/menu.png b/src/assets/image/menu.png new file mode 100644 index 0000000..bf9cf5e Binary files /dev/null and b/src/assets/image/menu.png differ diff --git a/src/assets/products.json b/src/assets/products.json new file mode 100644 index 0000000..742215d --- /dev/null +++ b/src/assets/products.json @@ -0,0 +1,363 @@ +{ + "data": [{ + "id": "1000", + "code": "f230fh0g3", + "name": "Bamboo Watch", + "description": "Product Description", + "image": "bamboo-watch.jpg", + "price": 65, + "category": "Accessories", + "quantity": 24, + "inventoryStatus": "Active", + "rating": 5 + }, + { + "id": "1001", + "code": "nvklal433", + "name": "Black Watch", + "description": "Product Description", + "image": "black-watch.jpg", + "price": 72, + "category": "Accessories", + "quantity": 61, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1002", + "code": "zz21cz3c1", + "name": "Blue Band", + "description": "Product Description", + "image": "blue-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 2, + "inventoryStatus": "InActive", + "rating": 3 + }, + { + "id": "1003", + "code": "244wgerg2", + "name": "Blue T-Shirt", + "description": "Product Description", + "image": "blue-t-shirt.jpg", + "price": 29, + "category": "Clothing", + "quantity": 25, + "inventoryStatus": "Active", + "rating": 5 + }, + { + "id": "1004", + "code": "h456wer53", + "name": "Bracelet", + "description": "Product Description", + "image": "bracelet.jpg", + "price": 15, + "category": "Accessories", + "quantity": 73, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1005", + "code": "av2231fwg", + "name": "Brown Purse", + "description": "Product Description", + "image": "brown-purse.jpg", + "price": 120, + "category": "Accessories", + "quantity": 0, + "inventoryStatus": "InActive", + "rating": 4 + }, + { + "id": "1006", + "code": "bib36pfvm", + "name": "Chakra Bracelet", + "description": "Product Description", + "image": "chakra-bracelet.jpg", + "price": 32, + "category": "Accessories", + "quantity": 5, + "inventoryStatus": "InActive", + "rating": 3 + }, + { + "id": "1007", + "code": "mbvjkgip5", + "name": "Galaxy Earrings", + "description": "Product Description", + "image": "galaxy-earrings.jpg", + "price": 34, + "category": "Accessories", + "quantity": 23, + "inventoryStatus": "Active", + "rating": 5 + }, + { + "id": "1008", + "code": "vbb124btr", + "name": "Game Controller", + "description": "Product Description", + "image": "game-controller.jpg", + "price": 99, + "category": "Electronics", + "quantity": 2, + "inventoryStatus": "InActive", + "rating": 4 + }, + { + "id": "1009", + "code": "cm230f032", + "name": "Gaming Set", + "description": "Product Description", + "image": "gaming-set.jpg", + "price": 299, + "category": "Electronics", + "quantity": 63, + "inventoryStatus": "Active", + "rating": 3 + }, + { + "id": "1010", + "code": "plb34234v", + "name": "Gold Phone Case", + "description": "Product Description", + "image": "gold-phone-case.jpg", + "price": 24, + "category": "Accessories", + "quantity": 0, + "inventoryStatus": "InActive", + "rating": 4 + }, + { + "id": "1011", + "code": "4920nnc2d", + "name": "Green Earbuds", + "description": "Product Description", + "image": "green-earbuds.jpg", + "price": 89, + "category": "Electronics", + "quantity": 23, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1012", + "code": "250vm23cc", + "name": "Green T-Shirt", + "description": "Product Description", + "image": "green-t-shirt.jpg", + "price": 49, + "category": "Clothing", + "quantity": 74, + "inventoryStatus": "Active", + "rating": 5 + }, + { + "id": "1013", + "code": "fldsmn31b", + "name": "Grey T-Shirt", + "description": "Product Description", + "image": "grey-t-shirt.jpg", + "price": 48, + "category": "Clothing", + "quantity": 0, + "inventoryStatus": "InActive", + "rating": 3 + }, + { + "id": "1014", + "code": "waas1x2as", + "name": "Headphones", + "description": "Product Description", + "image": "headphones.jpg", + "price": 175, + "category": "Electronics", + "quantity": 8, + "inventoryStatus": "InActive", + "rating": 5 + }, + { + "id": "1015", + "code": "vb34btbg5", + "name": "Light Green T-Shirt", + "description": "Product Description", + "image": "light-green-t-shirt.jpg", + "price": 49, + "category": "Clothing", + "quantity": 34, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1016", + "code": "k8l6j58jl", + "name": "Lime Band", + "description": "Product Description", + "image": "lime-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 12, + "inventoryStatus": "Active", + "rating": 3 + }, + { + "id": "1017", + "code": "v435nn85n", + "name": "Mini Speakers", + "description": "Product Description", + "image": "mini-speakers.jpg", + "price": 85, + "category": "Clothing", + "quantity": 42, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1018", + "code": "09zx9c0zc", + "name": "Painted Phone Case", + "description": "Product Description", + "image": "painted-phone-case.jpg", + "price": 56, + "category": "Accessories", + "quantity": 41, + "inventoryStatus": "Active", + "rating": 5 + }, + { + "id": "1019", + "code": "mnb5mb2m5", + "name": "Pink Band", + "description": "Product Description", + "image": "pink-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 63, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1020", + "code": "r23fwf2w3", + "name": "Pink Purse", + "description": "Product Description", + "image": "pink-purse.jpg", + "price": 110, + "category": "Accessories", + "quantity": 0, + "inventoryStatus": "InActive", + "rating": 4 + }, + { + "id": "1021", + "code": "pxpzczo23", + "name": "Purple Band", + "description": "Product Description", + "image": "purple-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 6, + "inventoryStatus": "InActive", + "rating": 3 + }, + { + "id": "1022", + "code": "2c42cb5cb", + "name": "Purple Gemstone Necklace", + "description": "Product Description", + "image": "purple-gemstone-necklace.jpg", + "price": 45, + "category": "Accessories", + "quantity": 62, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1023", + "code": "5k43kkk23", + "name": "Purple T-Shirt", + "description": "Product Description", + "image": "purple-t-shirt.jpg", + "price": 49, + "category": "Clothing", + "quantity": 2, + "inventoryStatus": "InActive", + "rating": 5 + }, + { + "id": "1024", + "code": "lm2tny2k4", + "name": "Shoes", + "description": "Product Description", + "image": "shoes.jpg", + "price": 64, + "category": "Clothing", + "quantity": 0, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1025", + "code": "nbm5mv45n", + "name": "Sneakers", + "description": "Product Description", + "image": "sneakers.jpg", + "price": 78, + "category": "Clothing", + "quantity": 52, + "inventoryStatus": "Active", + "rating": 4 + }, + { + "id": "1026", + "code": "zx23zc42c", + "name": "Teal T-Shirt", + "description": "Product Description", + "image": "teal-t-shirt.jpg", + "price": 49, + "category": "Clothing", + "quantity": 3, + "inventoryStatus": "InActive", + "rating": 3 + }, + { + "id": "1027", + "code": "acvx872gc", + "name": "Yellow Earbuds", + "description": "Product Description", + "image": "yellow-earbuds.jpg", + "price": 89, + "category": "Electronics", + "quantity": 35, + "inventoryStatus": "Active", + "rating": 3 + }, + { + "id": "1028", + "code": "tx125ck42", + "name": "Yoga Mat", + "description": "Product Description", + "image": "yoga-mat.jpg", + "price": 20, + "category": "Fitness", + "quantity": 15, + "inventoryStatus": "Active", + "rating": 5 + }, + { + "id": "1029", + "code": "gwuby345v", + "name": "Yoga Set", + "description": "Product Description", + "image": "yoga-set.jpg", + "price": 20, + "category": "Fitness", + "quantity": 25, + "inventoryStatus": "Active", + "rating": 8 + } + ] +} \ No newline at end of file diff --git a/src/environments/environment.dev.ts b/src/environments/environment.dev.ts new file mode 100644 index 0000000..794c4b9 --- /dev/null +++ b/src/environments/environment.dev.ts @@ -0,0 +1,12 @@ +export const environment = { + production: false, + cdnBaseUrl: 'https://edgeftp.b-cdn.net/', + cdnFileUrl: 'https://edgeftp.b-cdn.net/dev/', + client_id: "2109111018200000022", + ExtranetAPIBaseUrl: "https://extranetapi.dev.futuretravelplatform.com/api/v1", + AdminAPIGOBaseUrl: "https://adminapi-go.dev.futuretravelplatform.com/api", + APIBaseUrl: "https://adminapi.dev.futuretravelplatform.com/api", + hotelApiBaseUrl: "https://hotelapi.dev.futuretravelplatform.com/api", + APIBaseGoUrl: "https://adminapi-go.dev.futuretravelplatform.com/api", + +}; diff --git a/src/environments/environment.preprod.ts b/src/environments/environment.preprod.ts new file mode 100644 index 0000000..821b473 --- /dev/null +++ b/src/environments/environment.preprod.ts @@ -0,0 +1,10 @@ +export const environment = { + production: true, + client_id: "2109111018200000021", + ExtranetAPIBaseUrl: "https://extranetapi.preprod.amadeusonlinesuite.com/api/v1", + AdminAPIGOBaseUrl: "https://adminapi-go.preprod.amadeusonlinesuite.com/api", + APIBaseUrl: "https://adminapi.preprod.amadeusonlinesuite.com/api", + fileUploadBaseUrl:'https://edge.amadeusonlinesuite.com/preprod', + hotelApiBaseUrl: "https://hotelapi.preprod.amadeusonlinesuite.com/api", + APIBaseGoUrl: "https://adminapi-go.preprod.amadeusonlinesuite.com/api", + }; \ No newline at end of file diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts new file mode 100644 index 0000000..4264e34 --- /dev/null +++ b/src/environments/environment.prod.ts @@ -0,0 +1,12 @@ +export const environment = { + production: false, + cdnBaseUrl: 'https://edgeftp.b-cdn.net/', + cdnFileUrl: 'https://edgeftp.b-cdn.net/prod/', + client_id: "2109111018200000022", + ExtranetAPIBaseUrl: "https://extranetapi.futuretravelplatform.com/api/v1", + AdminAPIGOBaseUrl: "https://adminapi-go.futuretravelplatform.com/api", + APIBaseUrl: "https://adminapi.futuretravelplatform.com/api", + hotelApiBaseUrl: "https://hotelapi.futuretravelplatform.com/api", + APIBaseGoUrl: "https://adminapi-go.futuretravelplatform.com/api", + +}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts new file mode 100644 index 0000000..96f80a4 --- /dev/null +++ b/src/environments/environment.ts @@ -0,0 +1,25 @@ +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. + +export const environment = { + production: false, + cdnBaseUrl: 'https://edgeftp.b-cdn.net/', + cdnFileUrl: 'https://edgeftp.b-cdn.net/dev/', + client_id: "2109111018200000022", + ExtranetAPIBaseUrl: "https://extranetapi.dev.futuretravelplatform.com/api/v1", + AdminAPIGOBaseUrl: "https://adminapi-go.dev.futuretravelplatform.com/api", + APIBaseUrl: "https://adminapi.dev.futuretravelplatform.com/api", + hotelApiBaseUrl: "https://hotelapi.dev.futuretravelplatform.com/api", + APIBaseGoUrl: "https://adminapi-go.dev.futuretravelplatform.com/api", + +}; + +/* + * For easier debugging in development mode, you can import the following file + * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. + * + * This import should be commented out in production mode because it will have a negative impact + * on performance if an error is thrown. + */ +// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/src/environments/environment.uat.ts b/src/environments/environment.uat.ts new file mode 100644 index 0000000..1f77e99 --- /dev/null +++ b/src/environments/environment.uat.ts @@ -0,0 +1,10 @@ +export const environment = { + production: true, + client_id: "2109111018200000021", + ExtranetAPIBaseUrl: "https://extranetapi.aosuat.com/api/v1", + AdminAPIGOBaseUrl: "https://adminapi-go.aosuat.com/api", + APIBaseUrl: "https://adminapi.aosuat.com/api", + fileUploadBaseUrl: "https://edge.aosuat.com/uat", + hotelApiBaseUrl: "https://hotelapi.aosuat.com/api", + APIBaseGoUrl: "https://adminapi-go.aosuat.com/api", +}; \ No newline at end of file diff --git a/src/favicon.ico b/src/favicon.ico new file mode 100644 index 0000000..997406a Binary files /dev/null and b/src/favicon.ico differ diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..c688156 --- /dev/null +++ b/src/index.html @@ -0,0 +1,19 @@ + + + + + ExtraNet + + + + + + + + + + + diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..400f4c5 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,14 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +document.getElementById('bootstrapCssUrl').setAttribute('href', `${environment.cdnBaseUrl}Bootstrap/bootstrap.css`); + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); diff --git a/src/polyfills.ts b/src/polyfills.ts new file mode 100644 index 0000000..429bb9e --- /dev/null +++ b/src/polyfills.ts @@ -0,0 +1,53 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes recent versions of Safari, Chrome (including + * Opera), Edge on the desktop, and iOS and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * + */ + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js'; // Included with Angular CLI. + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/src/scss/_badge.scss b/src/scss/_badge.scss new file mode 100644 index 0000000..d568b96 --- /dev/null +++ b/src/scss/_badge.scss @@ -0,0 +1,63 @@ +.listBox{ + overflow: auto !important; +} + .p-listbox { + border: 0 !important; + margin-bottom: 20px; +} + + .p-listbox-list { + display: flex !important; + padding: 0 !important; +} + .p-listbox .p-listbox-list .p-listbox-item.p-highlight { + color: var(--primary-theme) !important; + background: rgb(255, 206, 54) !important; +} + + + .p-listbox:not(.p-disabled) + .p-listbox-item:not(.p-highlight):not(.p-disabled):hover { + color: var(--secondary-theme) !important; + background: var(--primary-theme) !important; + // border: 2px solid var(--secondary-theme) !important; +} + + .p-listbox .p-listbox-list .p-listbox-item:focus { + box-shadow: none !important; +} + + .p-listbox-item { + border: 1px solid var(--primary-theme) !important; + border-radius: 5px !important; + padding: 5px 15px !important; + margin-right: 10px !important; +} + +@media screen and (max-width: 960px) { + .p-listbox-list { + flex-wrap: wrap; + } + .ListBox { + .p-listbox .p-listbox-list .p-listbox-item { + width: 100% !important; + padding: 1px 27px !important; + justify-content: center; + } + .p-listbox-list-wrapper { + padding-bottom: 20px; + } + + } + .p-listbox .p-listbox-list .p-listbox-item { + width: 100px !important; + height: 30px !important; + justify-content: center !important; + } + .p-listbox-list li { + margin-bottom: 10px !important; + } + .p-listbox .p-listbox-list .p-listbox-item { + padding: 5px 12px !important; + } +} diff --git a/src/scss/_buttons.scss b/src/scss/_buttons.scss new file mode 100644 index 0000000..2595e76 --- /dev/null +++ b/src/scss/_buttons.scss @@ -0,0 +1,125 @@ +.p-button:focus { + box-shadow: none !important; +} + +.btn-primary { + color: #ffffff !important; + background: var(--primary-theme) !important; + border: 1px solid var(--primary-theme) !important; +} + +.btn-secondary { + color: var(--primary-theme) !important; + background-color: #ffffff !important; + border: 1px solid var(--primary-theme) !important; +} + +.btn-secondary:hover { + background: #eceefa !important; +} + +.btn-back { + cursor: pointer; + display: inline-flex; + align-items: center; + margin: 0 0 8px; + + svg { + height: 17px; + } + + span { + font-size: 18px; + font-weight: 600; + } +} + +.btn-copy { + display: block; + background-color: var(--secondary-light); + color: var(--primary-theme); + width: 24px; + padding: 5px; + border-radius: 5px; + margin: 0 auto; + margin-top: 10px; +} + +.btn-arrowForward { + background-color: #e6e6e6; + padding: 6px 10px; + align-self: self-end; +} + +.btn-icon { + cursor: pointer; + color: var(--primary-theme); + border: 0 !important; + + .p-button { + background-color: #f2f3f8 !important; + color: var(--primary-theme); + border: 0 !important; + } + + .p-button:enabled:hover { + background-color: #f2f3f8 !important; + color: var(--primary-theme) !important; + border: 0 !important; + } +} + +.btn-icon:hover { + background-color: #f2f3f8 !important; + color: var(--primary-theme) !important; + border: 0 !important; +} + +.p-checkbox-focused { + box-shadow: none !important; +} + + +.mat-radio-button.mat-primary.mat-radio-checked .mat-radio-outer-circle { + border-color: var(--primary-theme) !important; + border-width: 5px !important; +} + +.mat-radio-button.mat-primary .mat-radio-inner-circle { + background-color: #ffffff !important; +} + +.mat-radio-button.mat-primary .mat-radio-inner-circle, + +.mat-radio-button.mat-primary .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple), + +.mat-radio-button.mat-primary.mat-radio-checked .mat-radio-persistent-ripple, +.mat-radio-button.mat-primary:active .mat-radio-persistent-ripple { + background-color: #ffffff; +} + +.ng-btnDanger { + background-color: #f32121; + color: #fff; + padding: 2px 10px; + height: 30px; + font-size: 12px; + border: 1px solid #f32121; + border-radius: 4px; +} + +.btn-duplicate { + height: 30px; + font-size: 12px; + padding: 2px 10px; + border-radius: 4px; +} + +.overflow-auto { + overflow: auto; +} + +.app-AddMore { + padding-top: 20px; + text-align: center; +} \ No newline at end of file diff --git a/src/scss/_calendar.scss b/src/scss/_calendar.scss new file mode 100644 index 0000000..d5aaa14 --- /dev/null +++ b/src/scss/_calendar.scss @@ -0,0 +1,238 @@ +// grid calendar +.calGrid { + display: grid; + grid-template-columns: 86% auto; + gap: 10px; + } + + .p-datepicker-other-month { + opacity: 0; +} + + .p-calendar .p-datepicker { + padding: 0px; +} + + .p-calendar { + width: 100% !important; +} + + .p-calendar .p-inputtext{ + padding: 8px; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 14px; + outline: none; + width: 100% !important; + height: 40px; + color: var(--text-color); +} + .p-calendar .p-datepicker { + left: 0px !important; +} + .p-button.p-button-icon-only { + width: 40px; + height: 40px; + padding: 0.35rem 0; +} + .p-calendar-w-btn .p-datepicker-trigger { + border-left: 0 !important; + border-top-right-radius: 4px !important; + border-bottom-right-radius: 4px !important; +} +.dateForHighlight .p-datepicker table td span { + border-radius: 75%; + background-color: rgba(28, 143, 181, 0.45); +} +.dateForHighlight .p-datepicker table td span.p-disabled { + background-color: transparent; +} +.dateForHighlight .p-datepicker table td.p-datepicker-today > span { + background-color: #ced4da; +} + .p-calendar-w-btn .p-inputtext { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + .p-icon-wrapper { + content: "\ebcc"; + color: #7b7272; + font-size: 1.25rem !important; + font-family: 'Material Icons'; +} + .p-button { + background-color: #f2f3f8; + border: 1px solid #ccc; +} + .p-button:enabled:hover { + background: #f2f3f8; + color: unset; + border-color: #ccc; +} + .p-button.p-button-text:enabled:hover { + color: #fff; + background: var(--primary-theme); +} + .p-datepicker-buttonbar .p-button:first-child { + display: none; +} + .p-datepicker .p-datepicker-buttonbar { + margin-top: 10px; + justify-content: end !important; + border-top: 1px solid #ccc; + padding: 10px; +} + .p-datepicker .p-datepicker-buttonbar .p-button { + padding: 8px 19px; + border: 0; + border-radius: 4px; + background: var(--primary-theme); + color: #fff; +} + .p-datepicker-buttonbar .p-button-label { + font-size: 12px; +} + .p-datepicker-header .p-datepicker-prev-icon, + .p-datepicker-header .p-datepicker-next-icon { + color: #000; + font-size: 14px; +} + .p-datepicker { + font-size: 15px !important; + border-radius: 4px; + background-color: #fff; +} + + .p-datepicker table th { + padding: 10px 0px; +} + + .p-datepicker table td { + padding: 0; +} + +.p-datepicker-year { + padding: 0px 6px; +} + + .p-datepicker .p-datepicker-header { + padding: 5px; + padding-bottom: 0; +} + + .p-datepicker-year { + padding: 0px 5px; +} + + .p-datepicker-header .p-datepicker-title { + font-weight: bolder; +} + + .p-datepicker .p-datepicker-header .p-datepicker-prev:focus, + .p-datepicker .p-datepicker-header .p-datepicker-next:focus { + box-shadow: unset !important; +} + + .p-datepicker-calendar thead { + border-bottom: 1px solid rgb(238, 238, 238); +} + + .p-datepicker-calendar thead tr th span { + font-size: 13px; + font-weight: 400; +} + + .p-datepicker table td span { + display: block; + cursor: pointer; + text-align: center; + width: 35px !important; + height: 35px !important; + line-height: 35px !important; + font-size: 12px; +} + + .p-datepicker table td > span.p-highlight { + color: #fff !important; + background-color: var(--primary-theme) !important; +} + + .p-disabled, + .p-component:disabled { + opacity: 0.3 !important; +} + +// full calender + .fc-header-toolbar { + .fc-toolbar-chunk:last-of-type { + display: none !important; + } +} + .fc .fc-button-group { + position: inherit !important; +} + .fc .fc-toolbar { + justify-content: center !important; +} + .fc .fc-toolbar.fc-header-toolbar { + background: var(--primary-theme); + color: #fff; + padding: 10px; + position: relative !important; + margin: 0 !important; +} + .fc-today-button { + display: none !important; +} + .fc-prev-button { + position: absolute !important; + left: 15px !important; + color: #f7f8fa !important; + border: 0 !important; + bottom: 11px !important; + background: var(--primary-theme) !important; +} + .fc-next-button { + position: absolute !important; + right: 15px !important; + background: var(--primary-theme) !important; + border: 0 !important; + color: #ffffff !important; + bottom: 11px !important; +} + .fc.fc-theme-standard .fc-toolbar .fc-button:focus { + box-shadow: none !important; + outline: none !important; +} + .fc-scrollgrid-sync-inner { + padding: 10px !important; +} +// full calender +@media screen and (max-width: 960px) { + .p-datepicker table td span { + border-radius: 0px !important; + } + .p-datepicker table td { + width: 14.28%; + } + .p-datepicker table td span { + width: 100% !important; + } + .p-datepicker-group-container .p-datepicker-group:first-child .p-datepicker-calendar tbody { + border-right: 0; + } + .p-datepicker-multiple-month .p-datepicker-group-container { + display: block !important; + } + .p-datepicker { + position: fixed !important; + top: 0px !important; + display: block !important; + height: 100%; + overflow: auto; + padding: 0; + padding: 56px 0px !important; + padding-top: 0 !important; + border-radius: 0; + } +} diff --git a/src/scss/_checkBox.scss b/src/scss/_checkBox.scss new file mode 100644 index 0000000..2727603 --- /dev/null +++ b/src/scss/_checkBox.scss @@ -0,0 +1,47 @@ +.mdc-checkbox { + padding: 0 !important; +} +.mdc-checkbox__background { + color: #495057; + top: 0 !important; + left: 0 !important; + width: 20px !important; + height: 20px !important; + background: #ffffff; + border: 1px solid #ced4da !important; + transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s; + border-radius: var(--border-radius) !important; +} +.mdc-checkbox:hover .mdc-checkbox__ripple, +.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple { + background-color: transparent !important; +} +.mat-mdc-checkbox-ripple { + display: none; +} +.mat-mdc-checkbox .mat-internal-form-field { + gap: 5px; + color: unset !important; + letter-spacing: unset !important; + font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important; +} +.mat-mdc-checkbox .mdc-form-field .mdc-label { + font-size: 14px; + margin-top: 2px; +} +.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background, +.p-checkbox .p-checkbox-box.p-highlight { + background: var(--primary-theme) !important; + border-radius: var(--border-radius); +} +.mat-mdc-checkbox .mdc-checkbox__background svg { + height: 14px; + align-self: center; +} +.mat-mdc-checkbox .mdc-form-field label { + margin-bottom: 0 !important; +} +.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple { + opacity: unset !important; + background-color: unset !important; +} \ No newline at end of file diff --git a/src/scss/_comCalender.scss b/src/scss/_comCalender.scss new file mode 100644 index 0000000..3c6d589 --- /dev/null +++ b/src/scss/_comCalender.scss @@ -0,0 +1,92 @@ +.common_calendar { + .p-calendar { + display: initial !important; + width: 100%; + } + .p-datepicker-title{ + background: var(--primary-theme); + color: #fff !important; + padding: 6px 12px; + border-radius: 5px; + } + .p-datepicker-month{ + padding-right: 20px !important; + border-right: 2px solid var(--secondary-theme); + border-radius: 0; + color: #ffffff !important; + } + .p-datepicker-year { + padding-left: 12px !important; + color: #ffffff !important; + } + .p-datepicker table td > span { + width: 100% !important; + height: 100% !important; + border-radius: 0 !important; + display: block !important; + text-align: end; + padding: 11px !important; + } + .p-ink { + display: none; + } + .p-calendar .p-datepicker{ + width: 100% !important; + } + .p-datepicker table { + border: 1px solid #d3d3d3 !important; + } + .p-datepicker table td > span.p-highlight { + background-color: transparent !important; + } + .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover { + background-color: transparent !important; + } + .p-datepicker table td { + padding: 0 !important; + border: 1px solid #d6d6d6 !important; + } + .p-datepicker table th { + padding: 0.5rem; + border: 1px solid #d6d6d6; + padding-top: 20px; + padding-bottom: 20px; + } + .fs-30 { + font-size: 30px; + } + .w-59 { + width: 59%; + } + + .justify-center { + justify-content: center; + } + .calenderAdd .material-icons{ + font-size: 18px; + } + .calenderAdd .formLabel{ + font-size: 12px !important; + } + .spanLabel{ + width: 42%; + } + .w-77{ + width: 77%; + } +} +@media screen and (max-width:960px) { + .common_calendar .p-datepicker-inline{ + overflow-x: hidden !important; + } + .common_calendar .p-datepicker-calendar-container{ + overflow: auto; + } + .common_calendar .p-datepicker-header{ + border: 1px solid #e6e6e6 !important; + } + .common_calendar .p-calendar .p-datepicker{ + padding: 0 !important; + border: none !important; + } +} \ No newline at end of file diff --git a/src/scss/_common.scss b/src/scss/_common.scss new file mode 100644 index 0000000..24b8e14 --- /dev/null +++ b/src/scss/_common.scss @@ -0,0 +1,1744 @@ +// For Spacing +$spaceamounts: ( + 0, + 5, + 10, + 15, + 20, + 21, + 25, + 30, + 35, + 40, + 45, + 50, + 60, + 75, + 100 +); +$sides: ( + top, + bottom, + left, + right +); + +@each $space in $spaceamounts { + @each $side in $sides { + .m#{str-slice($side, 0, 1)}-#{$space} { + margin-#{$side}: #{$space}px !important; + } + + .p#{str-slice($side, 0, 1)}-#{$space} { + padding-#{$side}: #{$space}px !important; + } + } +} + +.ErrorWrapper .ng-select-container, +.ErrorWrapper .p-calendar .p-inputtext, +.ErrorWrapper .p-datepicker-trigger { + border: 1px solid red !important; +} + +.ErrorWrapper .p-datepicker-trigger { + border-left: none !important; +} + +.p-10 { + padding: 10px; +} + +.p-20 { + padding: 20px; +} + +.pb-10 { + padding-bottom: 10px; +} + +.m-10 { + margin: 10px; +} + +.m-15 { + margin: 0 15px !important; +} + +.mr-10 { + margin-right: 10px !important; +} + +.mt-10 { + margin-top: 10px !important; +} + +.mt-20 { + margin-top: 20px !important; +} + +.mt-2 { + margin-top: 2px !important; +} + +// For Flex +@mixin flex-aj($align: unset, $justify: unset) { + display: flex; + align-items: $align; + justify-content: $justify; +} + +.d-flex { + display: flex; +} + +.align-end { + align-items: end; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between !important; +} + +.flex-between { + display: flex; + justify-content: space-between; +} + +.justify-flex { + display: flex; + justify-content: end !important; +} + +.flex-center { + display: flex; + align-items: center; +} + +.gap-10 { + gap: 10px; +} + +.align-center { + display: flex; + align-items: center !important; +} + +.flex-end { + display: flex; + align-items: end; +} + +.self-end { + align-self: flex-end; +} + +.self-center { + align-self: center; +} + +.ng-dropdown-header { + display: none !important; +} + +.AddChildOption { + border: 1px solid #dee2e6; + padding: 20px 20px 0; + margin-bottom: 20px; +} + +.btn-remove { + color: #fff !important; + background: red !important; + border: 1px red !important; + box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12); + height: 30px; + font-size: 12px; + padding: 2px 10px; + border-radius: 4px; +} + +@mixin grid-gap($x: 0, $y: unset) { + display: grid; + + @if $y !=unset { + grid-gap: $x $y; + } + + @else { + grid-gap: $x; + } +} + +.app-subGrid2 { + grid-template-columns: repeat(2, 1fr); + @include grid-gap(10px); +} + +.d-block { + display: block; +} + +.align-start { + align-items: flex-start !important; +} + +.text-center { + text-align: center; +} + +.text-end { + text-align: end; +} + +.text-left { + text-align: left !important; +} + +.text-right { + text-align: right; +} + +// table status +.status-red { + background: #ffcdd2 !important; + color: #c63737 !important; + font-size: 12px; + padding: 2px 8px; + border-radius: 5px; +} + +.status-green { + background: #c8e6c9 !important; + color: #256029 !important; + font-size: 12px; + padding: 2px 8px; + border-radius: 5px; +} + +// For Width +.w-5 { + width: 5%; +} + +.w-10 { + width: 10% !important; +} + +.w-15 { + width: 15% !important; +} + +.w-20 { + width: 20% !important; +} + +.w-25 { + width: 25% !important; +} + +.w-30 { + width: 30% !important; +} + +.w-40 { + width: 40% !important; +} + +.w-50 { + width: 50% !important; +} + +.w-60 { + width: 60% !important; +} + +.w-75 { + width: 75% !important; +} + +.w-85 { + width: 85% !important; +} + +.w-100 { + width: 100% !important; +} + +.min-width100 { + width: 70px !important; +} + +.min-width200 { + width: 200px !important; +} + +.wPx-150 { + width: 150px; +} + +.h-100 { + height: 100% !important; +} + +.f-20 { + font-size: 20px; +} + +.fw-600 { + font-weight: 600; +} + +.fw-400 { + font-weight: 400; +} + +.mat-mdc-menu-panel .p-fileupload .p-fileupload-buttonbar .p-button { + margin-right: 0; + background-color: transparent; + border: 0; + padding: 0; + width: 100%; + text-align: left; +} + +.mat-mdc-menu-panel .p-fileupload .p-fileupload-content { + padding-top: 0 !important; +} + +.mat-mdc-menu-panel .p-button-icon { + display: none; +} + +.mat-mdc-menu-panel .p-button-label { + color: #212121; + font-size: 14px; +} + +.bulkUpload .p-button-label { + font-family: sans-serif; +} + +.mat-mdc-menu-panel .mat-mdc-menu-item-text a { + color: #212121; +} + +// checkbox +@media screen and (max-width: 768px) { + .p-20 { + padding: 15px; + } + + .ng-dropdown-header { + display: block !important; + } + + .p-dialog { + width: 100% !important; + } + + .temp_mobileBack { + display: block !important; + background: var(--primary-theme) !important; + color: #fff; + box-shadow: 0 2px 5px #0000001a; + width: 100%; + } + + .mobileFixedHeader-P, + .temp_mobileHead { + display: flex !important; + align-items: center; + justify-content: space-between !important; + height: 56px; + padding: 0 15px; + } + + .temp_mobileBackButton { + height: 32px; + width: 32px; + display: flex; + align-items: center; + justify-content: center; + background: #fff !important; + color: #fff; + border: 0; + border-radius: 50%; + margin: 0 !important; + } + + .temp_mobileBackButton .material-icons { + color: #000 !important; + font-size: 21px; + margin: 0 !important; + } + + .p-toast-top-right { + width: 94% !important; + } + + .temp_mobileTitle h4 { + margin: 0; + font-size: 18px; + font-weight: 400; + } + + .app-BkGrid2 { + display: flex; + flex-direction: column; + gap: 10px; + } + + .bookingMngmnt_gridWrap { + display: block; + } +} + +.astrick { + color: red; + position: absolute; + font-size: 14px; + margin-left: 3px; +} + +.commonSection { + overflow: auto; + border: 1px solid #dee2e6 !important; +} + +.commonSubSection { + padding: 20px; +} + +// .p-dialog Css // +.p-dialog { + max-height: unset !important; + margin-bottom: 20px !important; +} + +.p-dialog-content { + overflow-y: unset !important; +} + +.p-dialog-mask.p-component-overlay { + overflow-x: hidden !important; + overflow-y: auto !important; +} + +.p-dialog .p-dialog-header { + color: #fff; + background: var(--primary-theme); +} + +.p-dialog .p-dialog-header, +.p-dialog .p-dialog-footer { + padding: 1.2rem; +} + +.p-dialog .p-dialog-content { + padding: 1.5rem 1.2rem; +} + +.p-dialog .p-dialog-footer { + border-top: 1px solid #e6e6e6; +} + +.p-dialog .p-dialog-header .p-dialog-title { + font-weight: 400; + font-size: 18px; +} + +.p-dialog .p-dialog-header .p-icon-wrapper { + color: #fff; + justify-content: end; +} + +.p-dialog .p-dialog-header .p-dialog-header-close { + border: 0; + color: #fff; + background: transparent; + justify-content: flex-end; +} + +.p-dialog .p-dialog-header .p-dialog-header-icon:enabled:hover { + background: transparent; +} + +.p-dialog .p-dialog-header .p-dialog-header-icon:focus { + box-shadow: none; +} + +.p-dialog .p-dialog-header .p-dialog-header-close-icon { + font-size: 1.2rem; +} + +.SSExpireWarning .p-dialog .p-dialog-content { + padding: 40px; + border-radius: 8px; +} + +.SSExpire-Modal { + text-align: center; +} + +.ExpireHeader { + font-size: 20px; + font-weight: 500; + text-align: center; + margin: 15px 0; +} + +.btnExtend { + display: flex; + justify-content: center; + margin-top: 20px; +} + +.btnExtend .btn { + min-width: 170px; +} + +.passSuggest .PswdSuccess:before { + background-color: #3ed23e !important; +} + +.PswdSuccess::before { + background-color: #3ed23e !important; +} + +.PswdFail::before { + background: #ccc !important; +} + +.PswdSuccess::marker { + color: #3ed23e !important; +} + +// New Css // +.ng-card { + display: flex; + -webkit-box-flex: 1; + flex-grow: 1; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + flex-direction: column; + box-shadow: 0px 0px 13px 0px rgb(82 63 105 / 5%); + background-color: #ffffff; + margin-bottom: 20px; + border-radius: 4px; +} + +.ng-cardHead { + display: flex; + align-items: center; + justify-content: space-between; + position: relative; + padding: 12px 20px; + border-bottom: 1px solid #ebedf2; + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} + +.ng-cardLabel { + display: flex; + align-items: center; +} + +.ng-cardTitle { + margin: 0; + padding: 0; + color: var(--color-body-text); + font-size: 18px; + font-weight: 500 !important; + line-height: 36px; +} + +.ng-searchBody { + padding: 20px 20px; + border-radius: 4px; +} + +.ng-searchFooter { + padding: 0 20px 20px; + align-items: center; +} + +.ng-Cardfooter { + padding: 20px; + border-top: 1px solid #e6e6e6; + background-color: #fff; +} + +.dataTable { + padding: 20px; + border-top: 1px solid #ebedf2; + background-color: #ffffff; + position: relative; +} + +.btn-grey { + color: #3a3a3a !important; + background-color: #f2f3f8 !important; + border: 1px solid #e9ecef !important; + min-width: 40px !important; + padding: 6px 12px; +} + +.ng-backtext { + font-size: 18px; + color: #48465b; + font-weight: 500; + vertical-align: text-top; +} + +.ng-backsvg { + height: 18px !important; + overflow: hidden; + vertical-align: text-bottom; +} + +.ng-backbtn a { + display: inline-flex; + align-items: center; + text-decoration: none !important; +} + +.temp_mobileBack, +.temp_mobiletopBack { + display: none; +} + +.form-control:focus { + border-color: #ced4da; + outline: 0; + box-shadow: unset; +} + +input:focus-visible { + outline-offset: unset; + outline: transparent; +} + +// Booking Css // +.app-BkGrid2 { + grid-template-columns: 1fr 1fr; + display: grid; + grid-gap: 20px; +} + +.bookingBorderCard { + border: 1px solid #bfbfbf; + height: fit-content; +} + +.listView:not(:last-child) { + border-bottom: 1px solid #bfbfbf; +} + +.border-b { + border-bottom: 1px solid #e6e6e6; +} + +.treeTableLabel { + text-align: left; +} + +.listView { + display: flex; + justify-content: flex-start; + padding: 8px; + align-items: center; +} + +.listView h5 { + font-weight: 500; + font-size: 14px !important; + margin: 0; +} + +.app-text { + font-size: 14px; + color: var(--color-body-text); + margin: 0; +} + +.bookingListHotel { + margin: 0 !important; + font-size: 14px; + font-weight: 500; + color: #004a92 !important; + text-decoration: underline !important; + font-weight: 600 !important; + cursor: pointer; +} + +// Booking Css End // +// Tabs Css // +.p-tabview .p-tabview-nav { + padding: 20px; + background-color: #fff; +} + +.p-tabview .p-tabview-nav li { + margin-right: 10px !important; + border-radius: 4px; +} + +.p-tabview .p-tabview-nav li .p-tabview-nav-link { + border: 2px solid #005eb8; + border-color: #005eb8 !important; + padding: 14px 18px !important; + border-radius: 4px !important; + color: var(--black) !important; + border: 1px solid #005eb8 !important; + width: 100%; + height: 100%; +} + +.p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link { + background-color: var(--primary-theme) !important; + border-color: var(--primary-theme) !important; + color: #fff !important; + padding: 14px 18px !important; + border-radius: 4px !important; + width: 100%; + height: 100%; +} + +.p-tabview-title { + font-size: 14px; +} + +.bookingMngmnt_gridWrap { + display: grid; + grid-template-columns: 1fr 1fr auto; + grid-gap: 20px; +} + +.bookingMngmnt_gridWrap .bookingMngmnt_border, +.bookingMngmnt_gridWrapBorder .app-comCol:nth-child(odd) { + border-right: 1px solid #bfbfbf; +} + +.app-mainGrid2 { + grid-template-columns: repeat(2, 1fr); + display: grid; + grid-gap: 20px; +} + +.app-mainGrid3 { + grid-template-columns: repeat(3, 1fr); + display: grid; + grid-gap: 20px; +} + +.app-comCol { + display: flex; + align-items: start !important; + flex-direction: column; + padding: 6px 0; +} + +.app-bgtext { + font-size: 14px; + font-weight: 500; + margin-top: 0; + margin-bottom: 0; +} + +.bookinglink span { + margin: 0 !important; + font-size: 0.844rem; + font-weight: 500; + color: #004a92 !important; + text-decoration: underline !important; + font-weight: 600 !important; + cursor: pointer; +} + +// Tabs End // +// End // +.MainDivBtn-2 a { + text-decoration: underline; + font-size: 0.8rem; +} + +.MainDivBtn-2 { + display: flex; + align-items: center; +} + +.customSticky .sticky { + position: sticky; + background: white; + font-weight: 500; +} + +.customSticky .sticky { + left: 0px; + z-index: 2; +} + +.sectionCpyOn { + display: grid; + grid-template-columns: 85% 15%; +} + +.sectionCpyOnUI { + display: flex; + align-items: start; +} + +.back-to-top-btn { + margin-left: 20px; + white-space: nowrap; +} + +.app-modalHead { + font-size: 18px; + font-weight: 600; +} + +.book-TableData { + font-size: 14px; +} + +// overview +.overview-Hotelcard { + display: grid; + gap: 20px; + grid-template-columns: 300px auto; + + img { + width: 100%; + height: 250px; + border-radius: 6px; + object-fit: cover; + } +} + +.overview-Hotelheading { + font-size: 18px; + font-weight: 600; + margin: 15px 0 0 +} + +.hotel-rating { + color: #ffca36; + margin: 5px 0; + + .material-icons { + font-size: 18px; + } +} + +.hotel-address { + font-size: 16px; + font-weight: 400; + margin: 0; +} + +.formInputBorder .formInput { + border: 0; + background-color: transparent; +} + +.formInputBorder .formInput:hover { + box-shadow: unset; +} + +.tableWrapper ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option { + text-align: left !important; +} + +.rowColorGreen { + background-color: #11995f; + color: white; + + .material-icons { + color: white; + } +} + +.rowColorRed { + background-color: #c44b5a; + + .material-icons { + color: white; + } +} + +.rowColorRed ::ng-deep.formInput { + color: white; +} + +.rowColorRed ::ng-deep.formInput { + color: white; +} + +.rowColorGreen, +.rowColorBlue, +::ng-deep .formInputBorder .formInput { + color: white; +} + +.rowColorBlue input { + color: #ffffff; +} + +.rowColorBlue .formInput[readonly] { + background-color: transparent; +} + +.rowColorBlue .formInput { + padding-left: 12px !important; +} + +.rowColorWhite .formInput { + color: black; +} + +.rowColorgray div .text-center { + color: white; +} + +.table-Btnflex { + display: flex; + justify-content: flex-end; + gap: 15px; + padding: 15px; +} + +.table-Btnflex button { + border: 1px solid #636665; + border-radius: 50%; + background-color: transparent; + padding: 3px; + height: 35px; + width: 35px; +} + +.table-Btnflex .material-icons { + font-size: 25px; +} + +.tableDate { + display: flex; + align-items: center; + flex-direction: column; +} + +.weekData { + font-size: 14px; + color: #fff; + background-color: #0d5fb6; + padding: 1px 8px; + width: 50px; + border-radius: 4px; +} + +.numData { + font-size: 22px; + font-weight: 400; +} + +.monthData { + font-size: 14px; + color: #acacac; +} + +.formBorderSpace { + border: 0; + height: 40px; +} + +.tableWrapper ::ng-deep .ng-select .ng-select-container { + color: white !important; + background-color: transparent !important; + border: 0 !important; +} + +.tableWrapper ::ng-deep .ng-select .ng-arrow-wrapper::after { + content: ""; + display: none; +} + +.overview-hover .btn-hover svg { + display: none; + position: absolute; + right: -8px; +} + +.overview-hover .btn-hover { + display: flex !important; + align-items: center; + justify-content: flex-start; + width: 15px; + background-color: transparent; + border: 0; + padding: 0; + cursor: pointer; + position: relative; +} + +.overview-hover { + position: relative; +} + +.btn-hover p { + margin: 0; + text-align: center; + color: white; + font-size: 14px; +} + +.hoverDropDown.show { + display: block !important; + position: absolute; + top: 100%; + background: #fff; + z-index: 100; + left: 0; +} + +.hoverDropDown.show button { + border: 2px solid #e6e6e6; + background-color: transparent; + padding: 10px; + width: 135px; + height: 46px; +} + +.hoverDropDown { + display: none; +} + +.overview-hover:hover .btn-hover svg { + display: block; +} + +::ng-deep .ng-select .ng-arrow-wrapper::after:hover { + font-family: "Material Icons"; + content: "\e5d4"; + font-weight: normal; + font-style: normal; + display: block !important; + font-size: 30px; +} + +.pointer { + cursor: pointer; +} + +.rowColorBlue { + background-color: #2c50b6; + color: white; +} + +.rowColorgray { + background-color: #C7C7C5; + color: black; +} + +.contractCard { + text-align: left; + padding: 5px 10px; +} + +.wPx-300 { + width: 295px !important; + padding-top: 10px; +} + +.wPx-300:nth-child(2) { + text-align: start; + margin-left: 25px; +} + +.min-width-97 { + min-width: 97px; +} + +.formBorderSpace:not(:first-child) .wPx-300 { + width: 200px !important; +} + +.expandAdd { + display: flex; + align-items: center; + margin: 3px 0 0; + gap: 8px; + cursor: pointer; + font-size: 12px; +} + +.tableWrapper th { + background-color: #f2f3f8; +} + +.tableWrapper .formInput { + // height: 0; +} + +.box-wrapper { + border: 1px solid #e6e6e6; + border-collapse: collapse; + border-radius: 5px; + margin: 20px 0; +} + +.box-wrapper ::ng-deep .card { + border-radius: 0 0 0.25rem 0.25rem !important; + border: 0 !important; +} + +.box-header { + padding: 10px 15px; + background-color: #f7f8fa; + border-bottom: 1px solid #e6e6e6; + ; + border-radius: 5px 5px 0 0; + font-size: 18px; + font-weight: 600; +} + +.overview-Pricingcalendar { + border: 1px solid #e6e6e6; + border-collapse: collapse; + border-radius: 5px; + margin: 20px 0; +} + +.card { + padding: 20px; + background-color: #fff; + overflow: auto; +} + +.arrow_wrap { + display: flex; + flex-direction: column; + justify-content: center; +} + +.arrow_wrap.material-icons { + line-height: 10px; + font-size: 20px; +} + +.arrow_wrap .material-icons { + line-height: 10px; + font-size: 20px; +} + +.border-wrap { + border: 0 !important; +} + +.bL-0 { + border-left: 0 !important; +} + +.bR-0 { + border-right: 0 !important; +} + +.room-wrap { + font-weight: 500; +} + +.sub-header { + text-align: start; + margin-left: 10px; +} + +input[type=number]::-webkit-outer-spin-button, +input[type=number]::-webkit-inner-spin-button { + -moz-appearance: textfield; + /* Ensure Firefox displays the arrows */ +} + +.soldOut { + display: flex; + white-space: nowrap; + align-items: center; + + .min-width100 { + color: #fff; + } +} + +.collapse-wrap { + width: 210px; +} + +.sticky { + position: sticky; + background: white; + left: 0px; + z-index: 2; +} + +@media screen and (max-width: 768px) { + .overview-Hotelcard { + display: block; + } + +} + +// end + +// header +.headerWrapper { + background: #fff; + border-bottom: 1px solid #eff0f6; + max-width: 100%; + padding: 10px 40px; + z-index: 999; + min-height: 70px; + position: relative; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} + +.headerWrapper .h-100 { + height: 100%; +} + +.ng-aside-brand.ng-asidebar-active ::ng-deep .ng-asideToggle span svg { + transform: scaleX(1); +} + +.ng-aside-brand ::ng-deep .ng-asideToggle span svg { + transform: scaleX(-1); +} + +.logout_svg_d-f { + display: flex; + align-items: center; + grid-gap: 5px; +} + +.logout_svg_d-f p, +::ng-deep .mat-menu-item p { + font-size: 14px; + font-weight: 500; +} + +::ng-deep .mat-menu-item { + display: flex !important; + align-items: center; + grid-gap: 5px; +} + +.profile-svg { + background-color: var(--primary-theme); + display: flex; + align-items: center; + justify-content: center; + height: 35px; + border-radius: 50%; + width: 35px; +} + +@media screen and (max-width: 960px) { + .headerWrapper { + width: 100%; + justify-content: space-between; + padding: 0 16px; + } + + .headerWrapper img { + width: 180px; + object-fit: contain; + } + + .User_loginDetailMob .btn-icon { + display: block; + border-radius: 5px; + border: 0px solid #bfbfbf !important; + background: none !important; + } + + .User_DetalWrapper { + -webkit-transition: all 0.3s ease; + transition: all 0.3s ease; + top: 70px; + position: fixed; + right: 15px; + -webkit-box-pack: end; + -ms-flex-pack: end; + z-index: 1; + } + + .User_DetalWrapper .logout_DropdownLinks { + border: 1px solid #dbcdcd; + background: white; + border-radius: 8px; + -webkit-box-shadow: 0px 1px 9px -3px rgba(0, 0, 0, 0.1); + box-shadow: 0px 1px 9px -3px rgba(0, 0, 0, 0.1); + } + + .logout_svg_d-f { + border-bottom: 1px solid #bfbfbf; + } + + .MenuBtn { + display: flex; + align-items: center; + background: transparent; + border: transparent; + } + + .MenuBtn span { + font-size: 26px; + line-height: unset !important; + } +} + +.UserDetail button.mat-menu-item { + background: #76bcfa !important; +} + +.mat-menu-panel { + min-height: unset !important; +} + +.UserDetail .kt-header__topbar-welcome { + font-size: 12.6px; + font-weight: 500; + letter-spacing: 0.3px; +} + +.ng-header-button { + padding: 0 8px; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-item-align: center; + align-self: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + height: 38px; + cursor: pointer; + border-radius: 4px; +} + +.UserDetail .menu-dropdown { + display: flex; + align-items: center; + gap: 3px; + + span { + display: flex; + letter-spacing: normal; + } +} + +.links_Item:first-child { + border-bottom: 1px solid #edf1f3; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +.links_Item { + color: black; + font-size: 14px; + display: grid; + align-items: center; + grid-template-columns: 20px auto; + grid-gap: 3px; + // border-bottom-right-radius: 8px; + // border-bottom-left-radius: 8px; + cursor: pointer; + padding: .8rem; + + span { + display: flex; + } + + .material-icons { + font-size: 18px; + } +} + +.ErrorWrapper .ng-dropdown-panel.ng-select-bottom { + margin-top: 0 !important; +} + + +.links_Item:hover { + color: black; + background-color: var(--secondary-light); +} + +.LastLogin_links_Item { + gap: 3px; + display: flex; + white-space: nowrap; + + .material-icons { + font-size: 18px; + } +} + +::ng-deep .mat-mdc-menu-panel { + overflow: hidden !important; + border-radius: 8px !important; +} + +.mat-mdc-menu-content { + padding: 0 !important; +} + +.header-bar.logo { + opacity: 0; +} + +.header-bar { + opacity: 1; +} + +.header-bar { + cursor: pointer; + display: flex; + justify-content: center; +} + +.header-bar img { + max-width: 170px; + object-fit: contain; + max-height: 130px; +} + +// End +// footer +.ng-footer { + padding: 15px; + background: #ffffff; + max-width: 100%; +} + +.ng-footerBody { + display: flex; + justify-content: space-between; + align-content: center; +} + +.ng-footerCopy { + margin: 0px; +} + +.ng-footerItems { + list-style: none; + display: flex; + padding: 0; + margin: 0; +} + +.ng-footerItems li { + padding-right: 10px; +} + +//end +//verify email +.custom-container { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + font-family: "Segoe UI", sans-serif; +} + +.custom-card { + width: 400px; + background-color: #ffffff; + box-shadow: 0 0 10px #33333330; + padding: 40px 20px; + padding-bottom: 15px; + border-radius: 8px; +} + +.custom-card.cardDenied { + border-bottom: 5px #ed5565 solid; +} + +.custom-card.cardExpired { + border-bottom: 5px #ff5252 solid; +} + +.custom-card.cardDeactive { + border-bottom: 5px #4bae4f solid; +} + +.card-content { + display: flex; + align-items: center; + flex-direction: column; + text-align: center; +} + +img { + border-style: none; +} + +.thanks-text { + margin-top: 5px; + margin-bottom: 0; + +} + +.approve-text { + margin-bottom: 10px; + margin-top: 0; +} + +.thanks-text, +.approve-text { + font-size: 1.5rem; + font-weight: 500; +} + +.card-content p { + font-weight: 500; + color: var(--color-body-text); + font-size: 14px; +} + +@media screen and (max-width: 960px) { + .custom-card { + width: 350px; + height: 280px; + padding: 20px; + display: flex; + align-items: center; + justify-content: center; + } + + .thanks-text, + .approve-text { + font-size: 20px; + } + + .card-content svg, + .card-content img { + margin-bottom: 15px; + } + + +} + +//end +//unauthorized +.error-404 { + background-color: #fff; + height: 100%; +} + +.errorWrap { + display: flex; + align-items: center; + justify-content: center; + height: 80vh; +} + +.errorContent { + text-align: center; +} + +.errorContent h1 { + font-size: 8rem; + font-weight: bolder; + color: #0c6cbf; +} + +.errorContent h3 { + margin: 0 auto; + font-weight: bolder; + width: 76%; +} + +.errorContent h5 { + margin-top: 15px; + color: #878787; + font-weight: 400; +} + +@media (max-width: 960px) { + .errorWrap { + flex-direction: column; + } + + .errorSvG svg { + width: 100%; + height: 245px; + } + + .errorContent h1 { + font-size: 7rem; + } + + .errorContent h3 { + font-size: 22px; + width: 93%; + } + .m-mb15 { + margin-bottom: 15px; + } + + .d-flex-col { + flex-direction: column; + gap: 10px; + } + + .f-width { + width: 100% !important; + } + .text-left { + text-align: left !important; + } +} + +//end +//loader +// .progress-loader { +// height: 100%; +// } + +.loading-spinner { + background-color: rgb(0 0 0 / 44%); + position: fixed; + width: 100%; + top: 0px; + left: 0px; + height: 100vh; + align-items: center; + justify-content: center; + display: grid; + z-index: 999999; +} + +.loading-spinner img { + align-self: flex-end; + z-index: 999; +} + +.loading-message { + text-align: center; + align-self: start; + color: white; +} + +/** +* ============================================== +* Dot Pulse +* ============================================== +*/ +.dot-pulse { + position: relative; + left: -9999px; + width: 10px; + height: 10px; + border-radius: 5px; + background-color: #fff; + color: white; + box-shadow: 9999px 0 0 -5px #10263d; + animation: dotPulse 1.5s infinite linear; + animation-delay: .25s; +} + +.dot-pulse::before, +.dot-pulse::after { + content: ''; + display: inline-block; + position: absolute; + top: 0; + width: 10px; + height: 10px; + border-radius: 5px; + background-color: #fff; + color: white; +} + +.dot-pulse::before { + box-shadow: 9984px 0 0 -5px #fff; + animation: dotPulseBefore 1.5s infinite linear; + animation-delay: 0s; +} + +.dot-pulse::after { + box-shadow: 10014px 0 0 -5px #fff; + animation: dotPulseAfter 1.5s infinite linear; + animation-delay: .5s; +} + +@keyframes dotPulseBefore { + 0% { + box-shadow: 9984px 0 0 -5px #fff; + } + + 30% { + box-shadow: 9984px 0 0 2px #fff; + } + + 60%, + 100% { + box-shadow: 9984px 0 0 -5px #fff; + } +} + +@keyframes dotPulse { + 0% { + box-shadow: 9999px 0 0 -5px #fff; + } + + 30% { + box-shadow: 9999px 0 0 2px #fff; + } + + 60%, + 100% { + box-shadow: 9999px 0 0 -5px #fff; + } +} + +@keyframes dotPulseAfter { + 0% { + box-shadow: 10014px 0 0 -5px #fff; + } + + 30% { + box-shadow: 10014px 0 0 2px #fff; + } + + 60%, + 100% { + box-shadow: 10014px 0 0 -5px #fff; + } +} + +.outboundCard { + border: 1px solid #cccccc; + border-radius: 4px; + padding: 15px; + margin-bottom: 20px; +} + +.outboundCardDuplicate { + display: flex; + justify-content: flex-end; + margin-bottom: 15px; + gap: 10px; +} + +//end \ No newline at end of file diff --git a/src/scss/_dataTable.scss b/src/scss/_dataTable.scss new file mode 100644 index 0000000..cce51ec --- /dev/null +++ b/src/scss/_dataTable.scss @@ -0,0 +1,379 @@ +.card { + padding: 20px; + background-color: #fff; + border: 0; + overflow: auto; +} + +.p-paginator .p-dropdown { + margin: 0; +} + +.p-datatable { + + .p-datatable-header, + .p-paginator, + .p-toolbar { + padding: 0; + border: 0; + background-color: #ffffff; + padding-top: 25px !important; + } + + .p-datatable-thead>tr>th { + text-align: center; + font-size: 14px; + position: relative; + color: #fff !important; + background: var(--primary-theme) !important; + + &:focus { + box-shadow: none !important; + } + + .p-sort-icon { + .p-sortable-column-icon { + height: 10px; + color: #fff !important; + } + } + } + + .p-datatable-tbody>tr>td { + font-size: 14px; + text-align: center; + padding: 1rem .5rem; + } + + .p-paginator-current { + margin-right: auto; + } +} + +// table status +.product-badge { + border-radius: 4px; + padding: 2px 8px; + font-weight: 600; + font-size: 12px; +} + +.product-badge.status-instock { + background: #c8e6c9; + color: #256029; +} + +.product-badge.status-lowstock { + background: #feedaf; + color: #8a5340; +} + +.product-badge.status-outofstock { + background: #ffcdd2; + color: #c63737; +} + +.text-success { + color: #62bc55; +} + +.text-danger { + color: red; +} + +// table paginator +.p-paginator .p-inputwrapper { + position: absolute; + left: 0; + top: 0; +} + +.p-paginator { + + .p-paginator-last, + .p-paginator-next, + .p-paginator-first, + .p-paginator-prev { + background-color: #ebe9f2; + min-width: 30px !important; + height: 30px !important; + } + + .p-paginator-current { + padding: 0; + } +} + +.actionButton { + .mat-icon-button { + border: 1px solid #c1c1c1; + border-radius: 5px; + } + + .mat-icon-button:hover { + background-color: #f2f3f8 !important; + color: var(--primary-theme); + border: 0 !important; + } + + .mat-icon-button { + width: 35px !important; + height: 30px !important; + line-height: 23px !important; + } + + .material-icons { + font-size: 22px !important; + } +} + +.p-datatable.p-datatable-hoverable-rows .p-datatable-tbody>tr:not(.p-highlight):hover { + background: none !important; + color: inherit !important; +} + +.p-datatable .p-datatable-tbody>tr:focus { + outline: none !important; +} + +.p-dropdown-clear-icon { + display: none !important; +} + +.p-paginator { + & .p-paginator-page { + min-width: 30px !important; + height: 30px !important; + + &.p-highlight { + background: var(--primary-theme) !important; + border-color: var(--primary-theme) !important; + color: var(--surface-section) !important; + } + + &:focus { + box-shadow: none; + } + } +} + +.product-badge.status-active { + background: #e8fff3 !important; + color: #50cd89 !important; + padding: 4px 8px !important; +} + +.product-badge.status-inactive { + background: #ffebeb; + color: #f1416c; +} + +.p-paginator .p-dropdown .p-inputtext { + border: 0 !important; +} + +.p-toolbar .p-toolbar-group-right { + margin-left: auto; +} + +.p-datatable-responsive-scroll>.p-datatable-wrapper { + // min-width: 90pc; +} + +/* Track */ +::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 10px; +} + +/* Handle */ +::-webkit-scrollbar-thumb { + background: var(--primary-theme); + border-radius: 10px; +} + +/* Handle on hover */ +// ::-webkit-scrollbar-thumb:hover { +// background: var(--primary-theme); +// } +@media screen and (max-width: 768px) { + .card { + padding: 15px; + } + + .p-toolbar-group-right { + width: 100%; + display: block !important; + margin-top: 20px; + } + + .p-datatable-wrapper { + overflow: auto; + } + + .p-paginator-current { + width: 100%; + justify-content: start !important; + } + + .p-input-icon-left { + display: flex !important; + } + + .p-inputtext { + width: 100% !important; + } + + .p-datatable-table { + min-width: 50pc !important; + } +} + +.ResultNotFound { + height: 42px; +} + +.ResultNotFound td { + position: absolute !important; + width: 100%; + text-align: center; +} + +.p-datatable-wrapper { + margin-top: 20px; + padding-bottom: 10px; +} + +.p-datatable-wrapper::-webkit-scrollbar-thumb { + background: var(--primary-theme); +} + +::-webkit-scrollbar-thumb { + background: var(--primary-theme); + border-radius: 10px; +} + +.p-datatable-wrapper::-webkit-scrollbar-track { + background: #f1f1f1; +} + +::-webkit-scrollbar-track { + background: #f1f1f1; +} + +.scroll-host::-webkit-scrollbar { + width: 7px; +} + +.scroll-host::-webkit-scrollbar-thumb { + height: 20px; + background: var(--primary-theme); +} + +.scroll-host::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 0; +} + +.p-datatable-wrapper::-webkit-scrollbar { + height: 10px; + width: 10px; +} + +// update cancel policy +.formInputBorder .formInput:hover { + box-shadow: unset; +} + +.wPx-200 { + width: 130px !important; +} + +.wPx-90 { + max-width: 90px !important; +} + +.customSticky .sticky, +.customSticky .sticky2 { + position: sticky; + background: white; + font-weight: 500; +} + +.customSticky .sticky { + left: 0px; +} + +.customSticky .sticky2 { + left: 97px; + z-index: 2; +} + +.commonSection { + width: 90%; +} + +.sectionCpyOn { + display: grid; + grid-template-columns: 78% 20%; + gap: 15px; +} + +.tableWrapper ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option { + text-align: left !important; +} + +@media screen and (max-width: 960px) { + .sectionCpyOn { + display: flex; + flex-direction: column-reverse; + gap: 10px; + } +} + +// end +// update allocation +.formInputBorder .formInput:hover { + box-shadow: unset; +} + +.wPx-200 { + width: 150px !important; + margin: auto; +} + +.commonSection { + width: 90%; +} + +.sectionCpyOn { + display: grid; + grid-template-columns: 80% 20%; + gap: 10px; +} + +.tableWrapper ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option { + text-align: left !important; +} + +.rowColorGreen { + background-color: #4caf50; + color: white; +} + +.rowColorRed { + background-color: #d14d4d; + color: white; +} + +.rowColorGreen input, +.rowColorRed input { + color: white !important; +} + +.rowColorGreen .formInput[readonly], +.rowColorRed .formInput[readonly] { + color: black !important; +} + +// end \ No newline at end of file diff --git a/src/scss/_dropzone.scss b/src/scss/_dropzone.scss new file mode 100644 index 0000000..cb088ab --- /dev/null +++ b/src/scss/_dropzone.scss @@ -0,0 +1,368 @@ +.customDropzone .p-fileupload-files .ng-star-inserted:nth-child(1) { + display: flex; + align-items: center; +} + +.customDropzone .p-fileupload-row>div:last-child button { + top: 5px !important; + right: 6px; +} + +// dropzone +.customDropzoneSingal .p-progressbar { + display: none; +} + +.customDropzoneSingal .p-fileupload-row>div:nth-child(2), +.customDropzoneSingal .p-fileupload-row>div:nth-child(3) { + display: none !important; +} + +.customDropzoneSingal .p-fileupload-row { + position: relative; +} + +.customDropzoneSingal .p-fileupload-row>div:first-child { + height: 120px; + width: 120px; + flex: none; +} + +.customMultiDropzone .p-fileupload-content { + display: none; +} + +.customDropzone .p-fileupload .p-fileupload-row>div { + padding: 1rem 0 !important; +} + +.customDropzoneSingal .p-fileupload-row>div:first-child img { + height: 110px; + width: 110px; + border-radius: 8px; +} + +.customDropzoneSingal .p-fileupload-row>div:last-child button { + position: absolute; + // left: 110px; + width: 20px; + height: 20px; + top: 25px; + right: 22px; + border-radius: 50%; +} + +.customDropzoneSingal .p-fileupload-content { + padding: 0 !important; + border: 0 !important; +} + +.customDropzoneSingal .p-fileupload .p-fileupload-buttonbar { + background: transparent; + border: 1px solid transparent; + padding: 0; + // padding-top: 20px; +} + +.customDropzoneSingal .p-fileupload-row>div:last-child button .p-button-icon { + font-size: 12px; +} + +.customDropzoneSingal .p-fileupload-files .ng-star-inserted { + padding-top: 9px; + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; +} + +.p-fileupload .p-fileupload-row>div img { + width: 120px !important; +} + +.customDropzone .p-progressbar { + display: none; +} + +.customDropzone .p-fileupload-row>div:nth-child(2), +.customDropzone .p-fileupload-row>div:nth-child(3) { + display: none !important; +} + +.customDropzone .p-fileupload-row { + position: relative; +} + +.customDropzone .p-fileupload-row>div:first-child { + height: 120px; + width: 120px; + flex: none; +} + +.customDropzone .p-fileupload-row>div:first-child img { + height: 110px; + width: 110px; + border-radius: 8px; +} + +.customDropzone .p-fileupload-row>div:last-child button { + position: absolute; + // left: 110px; + width: 20px; + height: 20px; + top: 25px; + border-radius: 50%; +} + +.customDropzone .p-fileupload-content { + padding: 0 !important; + border: 0 !important; +} + +// .customDropzone .p-fileupload-content .p-element { +// // display: none; +// } +.customDropzone .p-fileupload .p-fileupload-buttonbar { + background: transparent; + border: 1px solid transparent; + padding: 0; + // padding-top: 20px; +} + +.customDropzone .p-fileupload-row>div:last-child button .p-button-icon { + font-size: 12px; +} + +// .customDropzone .p-fileupload-files .ng-star-inserted {} +.customDropzone .ng-star { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; +} + +.p-fileupload .p-fileupload-content { + border: 0; + padding: 0; +} + +.p-fileupload .p-fileupload-buttonbar { + background-color: unset; + padding: 0; + border: 0; +} + +.customDropzone .p-fileupload .p-fileupload-buttonbar, +.p-fileupload .p-fileupload-content { + background: transparent !important; + padding: 0 !important; + padding-top: 0.5rem !important; + border: 0 !important; +} + +.customDropzone .p-fileupload-row { + position: relative; + margin-top: 5px; + gap: 10px; +} + +.customDropzone .p-fileupload-row>div:first-child { + width: 110px !important; + flex: none !important; + padding: 0 !important; + margin: 0 !important; + margin-right: 10px !important; +} + +.customDropzone .p-fileupload-row>div:first-child img { + height: 100px !important; + width: 110px !important; + border-radius: 8px !important; + border: 1px solid #cccccc !important; + margin-right: 5px !important; + object-fit: fill !important; + object-position: top !important; +} + +.customDropzone .p-button { + background-color: #f2f3f8 !important; + border: 1px solid #ccc !important; +} + +.customDropzone .p-button-label { + font-size: 16px; + line-height: 1.3; +} + +.customDropzone .pi.pi-plus { + font-size: 0.8rem; +} + +.customDropzone .p-button.p-fileupload-choose { + border: none; + padding: 0.5rem 0.6rem; + height: 40px !important; + background: var(--primary-theme) !important; +} + +.customDropzone .p-fileupload-row>div:last-child button .p-button-icon { + font-size: 12px; + color: #000; + position: absolute; + left: 3px; + top: 3px; +} + +.customDropzone .p-fileupload-choose.p-button:focus { + box-shadow: none; +} + +.customDropzone .ng-label { + margin-bottom: 2px; +} + +.customDropzone .p-fileupload-row>div:first-child { + min-height: 55px !important; + margin: 0 !important; +} + +.customDropzone .p-fileupload-row>div:last-child button { + left: 39px !important; + width: 16px !important; + height: 10px !important; +} + +.customDropzone .p-fileupload-row>div:last-child button { + position: absolute !important; + left: 90px !important; + width: 20px !important; + height: 20px !important; + top: 0 !important; + border-top-right-radius: 7px !important; +} + +.customDropzone .p-fileupload-content { + padding: 0 !important; + border: 0 !important; +} + +.customDropzone .singleImage .p-fileupload-row>div:first-child { + padding: 0 !important; +} + +.customDropzone .p-fileupload .p-fileupload-row>div { + padding: 0px !important; + margin: 1rem 0 !important; +} + +.customDropzone .p-fileupload-row>div:nth-child(2), +.customDropzone .p-fileupload-row>div:nth-child(3), +.customDropzone .p-fileupload-buttonbar .p-button:last-child, +.customMultiDropzone .p-fileupload-files>.ng-star-inserted, +.customDropzone .p-progressbar { + display: none !important; +} +.customDropzone.customUpload .p-fileupload-buttonbar .p-button:last-child { + display: unset !important; +} +.customDropzone { + .p-icon-wrapper { + color: #fff; + font-size: 12px !important; + } + .p-icon-wrapper svg { + height: 14px; + width: 14px; + } +} +.customDropzone .p-fileupload .p-fileupload-content { + background: transparent; + padding: 0; + border: none; + color: inherit; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.customDropzone .fileDropzone { + height: 120px !important; + width: 120px !important; + flex: none; + padding: 0.5rem 0 !important; +} + +.customDropzone .fileDropzone .p-fileupload-files { + overflow: auto; +} + +/* Note */ +.customDropzone .shortNote { + font-size: 12px; + display: inline-block; + margin-top: 5px; + color: #212529; +} + +.customDropzone .shortNote span, +.AgencyshortNote span { + font-weight: 700; +} + +.customDropzone .AgencyshortNote { + font-size: 12px; + display: inline-block; + margin-top: 5px; + color: #212529; +} + +.customDropzone .uploadDoc { + display: flex; + align-items: end; + width: 50%; +} + +.customDropzone .uploadDoc .ng-Label { + font-size: 16px; +} + +/* Theme Setting Dropzone */ +.customDropzone .theme-fileUpload .p-fileupload .p-fileupload-content { + background: transparent; + padding: 0; + border: none; + color: inherit; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.customDropzone .theme-fileUpload .p-fileupload-files { + border: 1px solid #dee2e6; + text-align: center; + margin-top: 10px; + border-radius: 4px; +} +.customUpload { + .p-button { + background-color: var(--primary-theme); + } + .p-icon-wrapper { + color: #fff; + font-size: 12px !important; + } + .p-icon-wrapper svg { + height: 14px; + width: 14px; + } +} +.room_Amenities { + display: flex; + align-items: center; +} + +.w-40 { + width: 40%; +} + +.w-60 { + width: 60%; +} + +.room_AmenitiesBox { + white-space: nowrap; +} \ No newline at end of file diff --git a/src/scss/_input.scss b/src/scss/_input.scss new file mode 100644 index 0000000..98bc168 --- /dev/null +++ b/src/scss/_input.scss @@ -0,0 +1,111 @@ +.formLabel { + display: block; + font-size: 14px; + margin-bottom: 5px; + text-align: start; + white-space: nowrap; +} +.ng-label { + display: block; + font-size: 15px; +} +.formInput.loginPassword{ + padding: 1rem 2.3rem; +} +.formInput { + padding: 8px 10px; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 14px; + outline: none; + width: 100%; + height: 40px; + color: var(--text-color); + font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} +.p-inputtext:enabled:focus { + outline: 0 none; + outline-offset: 0; + box-shadow: unset !important; +} + +.p-inputtext:enabled:hover, +.p-inputtext:enabled:focus, +.p-inputtext { + border: 1px solid #ccc; +} +textarea.formInput { + width: 100% ; + height: auto; +} +.formInput:hover { + box-shadow: 0 1px 0 rgb(0 0 0 / 6%); +} +.formCheck { + font-size: 14px; +} +.phoneBox { + display: grid; + grid-template-columns: 35% 65%; +} +.phoneBox .ng-select.ng-select-single .ng-select-container { + border-radius: 4px 0 0 4px !important; + border-right: 0 !important; +} +.phoneBox .formPhone { + border-radius: 0 4px 4px 0 !important; +} +.errorInput .ng-select-container { + border: 1px solid red !important; +} +.errorInput .ng-select-container { + border: 1px solid red !important; +} +.formInput.errorInput { + border: 1px solid red !important; +} + .p-toolbar-group-right { + .p-input-icon-left>.p-inputtext { + padding-left: 2rem !important; + } +} + .p-inputtext { + padding: 6.5px 10px !important; +} + +// ng select +.ng-clear-wrapper { + display: none !important; +} +// placeholder styles +::placeholder { + color: #999; + font-size: 14px; +} +:-ms-input-placeholder { + color: #999; + /* Internet Explorer 10-11 */ + font-size: 14px; +} +::-ms-input-placeholder { + color: #999; + /* Microsoft Edge */ + font-size: 14px; +} + .ng-select.ng-select-focused:not(.ng-select-opened) .ng-select-container { + box-shadow: none !important; +} +.border-left { + border-radius: 5px 0px 0px 5px !important; +} +.border-right { + border-radius: 0px 5px 5px 0px !important; +} + .ng-value-container input { + font-size: 14px !important; +} +.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{ + white-space: nowrap; + overflow: hidden; + width: 85%; +} \ No newline at end of file diff --git a/src/scss/_login.scss b/src/scss/_login.scss new file mode 100644 index 0000000..c5820fb --- /dev/null +++ b/src/scss/_login.scss @@ -0,0 +1,340 @@ +.app-loginWrap, +.app-ForgotWrap { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-size: cover !important; + background: url(https://aosedge.b-cdn.net/Static/bannerimage2.jpg); + background-repeat: no-repeat; + background-position: center; +} +.app-loginBody { + display: flex; + align-items: center; + justify-content: space-between; + height: 100%; + width: 100%; + position: relative; +} +.overlay { + background-color: #00000054; + position: fixed; + top: 0; + bottom: 0; + width: 100%; + height: 100%; + right: 0; +} +.app-loginContent { + width: 450px; + padding: 40px 40px; + background-color: #ffffff; + border-radius: 8px; +} +.login-textWrap { + color: #fff; + max-width: 380px; +} +.login-head { + font-size: 35px; + margin-bottom: 0; + font-weight: 600; +} +.loginHead { + margin-bottom: 25px; +} +.loginHead h3, +.temp_loginPassHeading { + font-size: 24px; + font-weight: 700; + margin-bottom: 0px; + margin-top: 0; +} +.loginHead p { + margin: 3px 0 0; + text-align: left; + font-size: 16px; + font-weight: 400; +} +.login-text { + font-size: 16px; +} +.temp_loginOtpTitle { + font-size: 16px; + font-weight: 500; + margin-bottom: 0; +} +.input-wrap { + position: relative; +} +.loginF_icons { + position: absolute; + left: 13px; + z-index: 999; + height: 100%; +} +.eyeICon { + top: 0; + right: 0; + bottom: 0; + margin: 10px; + position: absolute; + color: #6c757d; + cursor: pointer; + display: flex; + align-items: center; +} +.input-wrap .formInput { + width: 100%; + height: 42.4px; + outline: none; + font-size: 16px; + padding: 1rem 2.3rem; + border-radius: var(--border-radius); + -webkit-background-clip: text !important; +} +.forgetPass { + margin: 0 !important; + font-size: 0.844rem; + font-weight: 500; + color: #004a92 !important; + text-decoration: none !important; + font-weight: 600 !important; + cursor: pointer; +} +.app-loginLogo { + margin-bottom: 30px; +} +.app-loginLogo img { + max-width: 150px; +} +.loginNote h4 { + font-size: 14px; + font-weight: 500; + text-align: center; + margin-top: 30px; + margin-bottom: 0; + line-height: 1.5; +} +.loginNote .contactUs { + color: #004a92; + font-weight: 500; + cursor: pointer; +} +.app-loginContent .ng-backbtn { + margin-bottom: 1rem; + cursor: pointer; +} +.ng-backbtn a { + display: inline-flex; + margin: 2px 0; + align-items: center; + text-decoration: none !important; +} +.app-loginContent .ng-backbtn .ng-backsvg { + height: 14px !important; + margin-right: 4px; + margin-top: 2px; +} +.app-loginContent .ng-backtext { + font-size: 16px !important; + font-weight: 400; +} +.loginFooter { + margin-top: 30px; +} +.loginFooter .btn, +.verifyBtn .btn, +.profileReset_pwdBtn .btn { + height: 46px; + cursor: pointer; + border-radius: var(--border-radius); +} +.app-loginOtpWrap .codeText { + font-size: 14px; + font-weight: 500; + color: var(--color-body-text); +} +.codeText span:first-child { + font-size: 14px; + font-weight: 400; +} +.temp_loginResendOtp { + text-align: left; + margin: 15px 0; +} +.app-loginOtpWrap .ng-otp-input-wrapper { + border: 1px solid #cccccc; + border-radius: 8px; + display: flex; + padding: 0 10px; + justify-content: center; +} +.app-loginOtpWrap .ng-otp-input-wrapper .otp-input { + width: 28px; + height: 48px; + user-select: none; + font-size: 18px !important; + border: 0 !important; + font-weight: 500; + color: var(--color-body-text); + margin: 0 !important; + padding-bottom: 5px; +} +.app-loginOtpWrap .ng-otp-input-wrapper .otp-input:focus-visible { + outline: 0; + border: 0 !important; +} +.resendOTP { + margin: 10px 0; + font-size: 14px; + font-weight: 500; +} +@media screen and (max-width: 960px) { + .login-textWrap { + display: none; + } + .app-loginContent { + width: 100%; + padding: 30px 20px; + } + .app-loginBody { + padding: 0 15px; + max-width: 100%; + min-height: 100vh; + } +} +@media screen and (min-width: 1301px) { + .app-loginBody { + max-width: 75%; + min-height: 100vh; + } +} +@media screen and (min-width: 960px) and (max-width: 1300px) { + .app-loginBody { + max-width: 80%; + min-height: 100vh; + } +} +//forget your pass +.app-ForgotWrap { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-size: cover; + background-repeat: no-repeat; + background-position: center; + } + + .profileReset_pwdWrapper { + max-width: 440px; + border-radius: var(--border-radius); + box-shadow: #63636333 0 2px 8px; + background-color: #fff; + margin: 5rem auto; + padding: 2.5rem; + padding-top: 1.8rem; + } + + .loginTxt { + font-size: 14px; + } + + .resetHead h4 { + font-size: 24px; + font-weight: 700; + margin: 0 0 15px 0; + } + + .conditiontrue_wrapper { + display: grid; + grid-template-columns: 1fr 1fr; + } + + .conditiontrue_wrapper ul { + padding-left: 0 !important; + list-style: none; + } + + .PswdCriteria { + display: flex; + align-items: center; + font-size: 14px; + } + + .conditiontrue_wrapper li::before { + border-radius: var(--border-radius); + background: #ccc; + content: ""; + display: inline-block; + width: 6px; + height: 6px; + margin-right: 10px; + } + + .profileReset_pwdBtn { + padding-top: 14px; + } + + .profileReset_pwdBtn .btn { + height: 46px; + border-radius: var(--border-radius); + } + + .formControlWrapper { + position: relative; + } + .custom-card { + width: 400px; + background-color: #ffffff; + box-shadow: 0 0 10px #33333330; + padding: 40px 20px; + padding-bottom: 15px; + border-radius: 8px; + } + .custom-card.cardDenied { + border-bottom: 5px #ed5565 solid; + } + .card-content { + display: flex; + align-items: center; + flex-direction: column; + text-align: center; + } + .loginNote{ + margin: 5px 0 0 0; + font-size: 18px; + font-weight: 500; + } + .contactUs{ + margin: 15px 0 0 0; + font-size: 14px; + font-weight: 500; + } + @media screen and (max-width: 960px) { + .profileReset_pwdWrapper { + width: 350px; + padding: 20px; + } + } + + .passSuggest .PswdSuccess:before { + background-color: #3ed23e !important; + } + + .PswdSuccess::before { + background-color: #3ed23e !important; + } + + .PswdFail::before { + background: #ccc !important; + } + + .PswdSuccess::marker { + color: #3ed23e !important; + } + //end \ No newline at end of file diff --git a/src/scss/_rowCol.scss b/src/scss/_rowCol.scss new file mode 100644 index 0000000..0612657 --- /dev/null +++ b/src/scss/_rowCol.scss @@ -0,0 +1,749 @@ +.row { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -15px; + margin-left: -15px; + } + + .no-gutters { + margin-right: 0; + margin-left: 0; + } + + .no-gutters > .col, + .no-gutters > [class*="col-"] { + padding-right: 0; + padding-left: 0; + } + + .col, + .col-1, + .col-10, + .col-11, + .col-12, + .col-2, + .col-3, + .col-4, + .col-5, + .col-6, + .col-7, + .col-8, + .col-9, + .col-auto, + .col-lg, + .col-lg-1, + .col-lg-10, + .col-lg-11, + .col-lg-12, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-auto, + .col-md, + .col-md-1, + .col-md-10, + .col-md-11, + .col-md-12, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-auto, + .col-sm, + .col-sm-1, + .col-sm-10, + .col-sm-11, + .col-sm-12, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-auto, + .col-xl, + .col-xl-1, + .col-xl-10, + .col-xl-11, + .col-xl-12, + .col-xl-2, + .col-xl-3, + .col-xl-4, + .col-xl-5, + .col-xl-6, + .col-xl-7, + .col-xl-8, + .col-xl-9, + .col-xl-auto { + position: relative; + width: 100%; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; + } + + .col { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + + .col-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + + .col-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + + .col-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + + .col-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + + .col-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + + .col-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + + .col-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + + .col-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + + .col-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + + .col-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + + .col-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + + .col-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + + .col-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + .offset-1 { + margin-left: 8.333333%; + } + + .offset-2 { + margin-left: 16.666667%; + } + + .offset-3 { + margin-left: 25%; + } + + .offset-4 { + margin-left: 33.333333%; + } + + .offset-5 { + margin-left: 41.666667%; + } + + .offset-6 { + margin-left: 50%; + } + + .offset-7 { + margin-left: 58.333333%; + } + + .offset-8 { + margin-left: 66.666667%; + } + + .offset-9 { + margin-left: 75%; + } + + .offset-10 { + margin-left: 83.333333%; + } + + .offset-11 { + margin-left: 91.666667%; + } + + @media (min-width: 576px) { + .col-sm { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-sm-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + .col-sm-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-sm-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-sm-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-sm-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-sm-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-sm-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-sm-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + .col-sm-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + .col-sm-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-sm-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + .col-sm-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + .col-sm-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + + .offset-sm-0 { + margin-left: 0; + } + .offset-sm-1 { + margin-left: 8.333333%; + } + .offset-sm-2 { + margin-left: 16.666667%; + } + .offset-sm-3 { + margin-left: 25%; + } + .offset-sm-4 { + margin-left: 33.333333%; + } + .offset-sm-5 { + margin-left: 41.666667%; + } + .offset-sm-6 { + margin-left: 50%; + } + .offset-sm-7 { + margin-left: 58.333333%; + } + .offset-sm-8 { + margin-left: 66.666667%; + } + .offset-sm-9 { + margin-left: 75%; + } + .offset-sm-10 { + margin-left: 83.333333%; + } + .offset-sm-11 { + margin-left: 91.666667%; + } + } + + @media (min-width: 1024px) { + .col-md { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-md-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + .col-md-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-md-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-md-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-md-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-md-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-md-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-md-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + .col-md-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + .col-md-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-md-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + .col-md-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + .col-md-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + + .offset-md-0 { + margin-left: 0; + } + .offset-md-1 { + margin-left: 8.333333%; + } + .offset-md-2 { + margin-left: 16.666667%; + } + .offset-md-3 { + margin-left: 25%; + } + .offset-md-4 { + margin-left: 33.333333%; + } + .offset-md-5 { + margin-left: 41.666667%; + } + .offset-md-6 { + margin-left: 50%; + } + .offset-md-7 { + margin-left: 58.333333%; + } + .offset-md-8 { + margin-left: 66.666667%; + } + .offset-md-9 { + margin-left: 75%; + } + .offset-md-10 { + margin-left: 83.333333%; + } + .offset-md-11 { + margin-left: 91.666667%; + } + } + + @media (min-width: 992px) { + .col-lg { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-lg-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + .col-lg-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-lg-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-lg-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-lg-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-lg-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-lg-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-lg-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + .col-lg-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + .col-lg-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-lg-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + .col-lg-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + .col-lg-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + + .offset-lg-0 { + margin-left: 0; + } + .offset-lg-1 { + margin-left: 8.333333%; + } + .offset-lg-2 { + margin-left: 16.666667%; + } + .offset-lg-3 { + margin-left: 25%; + } + .offset-lg-4 { + margin-left: 33.333333%; + } + .offset-lg-5 { + margin-left: 41.666667%; + } + .offset-lg-6 { + margin-left: 50%; + } + .offset-lg-7 { + margin-left: 58.333333%; + } + .offset-lg-8 { + margin-left: 66.666667%; + } + .offset-lg-9 { + margin-left: 75%; + } + .offset-lg-10 { + margin-left: 83.333333%; + } + .offset-lg-11 { + margin-left: 91.666667%; + } + } + + @media (min-width: 1200px) { + .col-xl { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-xl-auto { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + .col-xl-1 { + -webkit-box-flex: 0; + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-xl-2 { + -webkit-box-flex: 0; + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-xl-3 { + -webkit-box-flex: 0; + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-xl-4 { + -webkit-box-flex: 0; + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-xl-5 { + -webkit-box-flex: 0; + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-xl-6 { + -webkit-box-flex: 0; + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-xl-7 { + -webkit-box-flex: 0; + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + .col-xl-8 { + -webkit-box-flex: 0; + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + .col-xl-9 { + -webkit-box-flex: 0; + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-xl-10 { + -webkit-box-flex: 0; + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + .col-xl-11 { + -webkit-box-flex: 0; + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + .col-xl-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + + .offset-xl-0 { + margin-left: 0; + } + .offset-xl-1 { + margin-left: 8.333333%; + } + .offset-xl-2 { + margin-left: 16.666667%; + } + .offset-xl-3 { + margin-left: 25%; + } + .offset-xl-4 { + margin-left: 33.333333%; + } + .offset-xl-5 { + margin-left: 41.666667%; + } + .offset-xl-6 { + margin-left: 50%; + } + .offset-xl-7 { + margin-left: 58.333333%; + } + .offset-xl-8 { + margin-left: 66.666667%; + } + .offset-xl-9 { + margin-left: 75%; + } + .offset-xl-10 { + margin-left: 83.333333%; + } + .offset-xl-11 { + margin-left: 91.666667%; + } + } \ No newline at end of file diff --git a/src/scss/_select.scss b/src/scss/_select.scss new file mode 100644 index 0000000..cae149a --- /dev/null +++ b/src/scss/_select.scss @@ -0,0 +1,148 @@ +.select-mobileHeader { + display: none; +} +.select-search { + padding: 5px 0; + position: relative; + .material-icons { + display: none; + } + input { + position: relative !important; + padding: 10px; + border: 1px #eee solid !important; + border-radius: 4px !important; + width: 100%; + outline: none; + } +} +.ng-hideHead .ng-dropdown-header { + display: none; +} + +@media screen and (max-width: 768px) { + .select-mobileHeader { + display: flex !important; + background: var(--primary-theme); + color: #fff; + box-shadow: 0px 0.2rem 0.5rem 0 rgb(0 0 0 / 10%); + position: fixed; + top: 0; + width: 100%; + height: 56px; + z-index: 1; + align-items: center; + } + .select-mobileBack { + height: 45px; + width: 46px; + display: flex; + align-items: center; + justify-content: center; + background: var(--primary-theme); + color: #fff; + border: 0; + .material-icons { + color: #fff !important; + margin: 0rem !important; + } + } + .ng-dropdown-panel .ng-dropdown-header { + display: block; + } + .ng-hideHead .ng-dropdown-header { + display: block; + } + .select-search { + padding: 15px; + .material-icons { + display: block; + position: absolute !important; + top: 23px !important; + left: 25px !important; + background: transparent !important; + color: #9e9e9e !important; + margin: 0 !important; + padding: 0 !important; + z-index: 2 !important; + width: 29px !important; + } + input { + padding-left: 45px !important; + } + } + .select-mobileTitle { + font-size: 16px !important; + font-weight: 600; + letter-spacing: 0.2px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + .ng-dropdown-panel { + display: block; + position: fixed !important; + background-color: #fff; + border: 0 !important; + height: 100%; + width: 100% !important; + right: 0 !important; + left: 0 !important; + top: 0 !important; + } + .ng-dropdown-panel .ng-dropdown-header { + padding: 0 !important; + } + .ng-dropdown-panel-items { + max-height: 100% !important; + } + + .ng-dropdown-panel.ng-select-top + .ng-dropdown-panel-items + .ng-option { + padding: 10px 12px; + } +} + .ng-select, + .ng-option { + font-size: 14px !important; +} + .ng-select.ng-select-multiple + .ng-select-container + .ng-value-container + .ng-value + .ng-value-icon.left { + border-left: 1px solid #b8dbff !important; + border-right: none !important; +} + .ng-value { + display: flex; + align-items: center; + flex-direction: row-reverse; + padding-bottom: 3px; +} + .ng-select-focused { + box-shadow: none !important; +} + .ng-select .ng-select-container { + color: var(--text-color); + min-height: 38px !important; +} +.ng-select.ng-select-single .ng-select-container { + min-height: 40px !important; +} + .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder, + .ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input { + top: 8px !important; +} + .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder { + padding-bottom: 0; +} + + .ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value { + padding-top: 2px; + display: block; +} + .ng-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{ + box-shadow: none !important; +} diff --git a/src/scss/_sidebar.scss b/src/scss/_sidebar.scss new file mode 100644 index 0000000..a98e4e0 --- /dev/null +++ b/src/scss/_sidebar.scss @@ -0,0 +1,274 @@ +.aside { + background-color: #fff; + height: 100vh; +} +.ng-brand-logo { + cursor: pointer; + display: flex; + justify-content: center; + width: 85%; + h2 { + margin: 0; + color: var(--primary-theme); + } +} +.ng-asidebar-inactive .ng-asideToggle { + position: absolute; + height: 100%; + width: 100%; + display: flex; + align-items: center; + justify-content: center; +} +.ng-asidebar-inactive .aside-logo { + opacity: 0; + visibility: hidden; +} +.ng-aside-brand { + min-height: 70px; + display: flex; + align-items: center; + width: 80px; + padding: 10px 15px; + border-bottom: 1px solid #eff0f6; + transition: all 0.6s ease; +} +.ng-brand-logo img { + max-width: 150px; + object-fit: contain; + max-height: 100px; +} +.ng-aside-brand.ng-asidebar-active .ng-asideToggle span svg { + transform: scaleX(1); +} +.ng-aside-brand .ng-asideToggle span svg { + transform: scaleX(-1); +} +.ng-aside-brand { + justify-content: center; +} +.ng-aside-brand.ng-asidebar-active { + justify-content: space-between; + width: 100%; +} +.app-asidebar { + position: fixed; + top: 0; + bottom: 0; + left: 0; + z-index: 98; + background-color: #fff; + transition: all 0.6s ease; +} +@media screen and (max-width: 960px) { + .ng-aside-brand { + position: absolute; + left: 23px; + top: 0; + } + .app-asidebar { + position: absolute; + width: 100%; + } +} +.Overlay { + display: none; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); +} +//base component +.app-main { + height: 100%; +} +.app-mainContent { + padding: 25px; + background-color: #f2f3f8; +} +.app-mainBody { + height: 100%; + padding-left: 265px; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; +} +.app-extra-space { + -webkit-box-flex: 1; + -ms-flex: 1 0 auto; + flex: 1 0 auto; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + max-width: 100%; + background-color: #f2f3f8; +} +.app-header { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 999; + transition: all 0.6s ease; +} +.app-asidebar { + position: fixed; + top: 0; + bottom: 0; + z-index: 98; + max-width: 100%; + -webkit-transition: all 0.3s ease; + transition: all 0.6s ease; + width: 80px; +} +.ng-app-main-active .app-asidebar { + width: 280px; +} +.app-header { + left: 80px; +} +.ng-app-main-active .app-header { + left: 280px; +} +.app-mainBody { + padding-left: 80px; +} +.ng-app-main-active .app-mainBody { + padding-left: 280px; +} +@media screen and (max-width: 960px) { + .app-main.ng-app-main-active .app-asidebar { + width: 100%; + } + .app-main .app-asidebar { + width: 0; + } + .app-asidebar { + top: 60px; + } + .ng-app-main-active .app-mainBody { + padding: 0; + } + .app-header { + z-index: 2; + } + .app-mainBody { + padding: 0; + } + .app-header { + left: 0 !important; + } + .ng-app-main-active .app-header { + left: 0 !important; + } + .app-mainContent { + padding: 0; + padding-top: 30px !important; + padding-bottom: 30px !important; + } + .ng-AsideBar.DvSide .menu > li a { + display: none; + } +} + +//end +ul.menu, +.submenu { + list-style-type: none; + padding: 0; + margin: 0; +} +.submenu2 { + padding-left: 27px; +} +.ng-AsideBar .menu .p-panelmenu-panel a { + gap: 10px; + display: flex; + min-height: 46px; + padding: 9px 15px; + align-items: center; + text-decoration: none; + cursor: pointer; +} +.ng-AsideBar .menu > li a .pi-chevron-up, +.ng-AsideBar .menu > li a .pi-chevron-down { + right: 13px; + color: #717b90; + display: block; + font-size: 10px; + position: absolute; + display: flex; + align-items: center; +} +.submenu > li a { + min-height: unset !important; + span { + color: #717b90; + font-size: 15px !important; + font-weight: 400 !important; + padding-right: 20px; + text-transform: capitalize !important; + } +} +.submenu>li { + position: relative; +} +.submenu>li::before { + content: ""; + position: absolute; + top: 16px; + bottom: 0; + left: 9px; + background-color: #717b90; + width: 5px; + z-index: 1; + height: 5px; + border-radius: 50%; +} +.ng-AsideBar .menu:first-child .parent-menu-active a { + color: #fff; + background: var(--primary-theme); +} +.SidebarMenulink::before{ + background-color: var(--primary-theme) !important; +} +.SidebarMenulink a span { + color: var(--primary-theme) !important; +} +.ng-AsideBar .menu:first-child a { + font-size: 15px; + font-weight: 500; + color: #717b90; + text-transform: capitalize !important; +} +.ng-AsideBar .parent-menu-active .submenu li a { + background: transparent !important; + margin-bottom: 0 !important; +} +.ng-AsideBar .menu:first-child .parent-menu-active a .pi-chevron-up { + color: #fff; +} +.ng-AsideBar.DvSide { + .menu > li a { + padding: 12px; + justify-content: center; + span,i { + display: none; + } + } + .submenu { + display: none; + } +} +.ng-AsideBar .parent-menu-active a .asidebarIcons { + filter: invert(1) grayscale(1) brightness(3); +} \ No newline at end of file diff --git a/src/scss/_table.scss b/src/scss/_table.scss new file mode 100644 index 0000000..b9984c3 --- /dev/null +++ b/src/scss/_table.scss @@ -0,0 +1,93 @@ +.tableWrapper { + padding-bottom: 15px; + overflow: auto; + table { + width: 100%; + } + table, + th, + td { + border: 1px solid #e6e6e6; + border-collapse: collapse; + padding: 10px; + text-align: center; + font-size: 14px; + } + th { + font-weight: 500; + } +} + +.actionButtonSticky .p-datatable .p-datatable-thead > tr > th:last-child, +.actionButtonSticky .p-datatable .p-datatable-tbody > tr > td:last-child { + position: sticky; + right: 0; +} +.treeTableUser .p-treetable .p-treetable-tbody>tr, .treeTableUser .p-treetable .p-treetable-thead>tr { + display: grid; + grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr; +} +.actionButtonSticky .p-datatable .p-datatable-tbody > tr > td:last-child { + background-color: white !important; +} + +.app-tableBtn { + width: 15%; + padding: 20px; + padding-top: 0; +} +@media screen and (max-width: 960px) { + .tableText { + width: 153px !important; + } + .inputWrapper { + width: 200px !important; + } + .tableRadioBtn { + width: 140px !important; + } + .tableDropDown { + width: 140px !important; + } + .tableWrapper { + table{ + min-width: 50pc !important; + } + } +} +@media screen and (max-width: 960px) { + .app-tableBtn .btn-primary { + width: 118px; + } +} +.tableWrapper tr { + white-space: nowrap; +} +.flightTableWrapper { + display: flex; + align-items: center; + overflow: auto; +} +.Bk_Mg-Tbl thead th, +.Bk_Mg-Tbl thead td { + font-size: 14px; + font-weight: 500; + border-bottom-width: 1px; + padding: 10px; + text-align: center; + vertical-align: middle; +} +.Bk_Mg-Tbl tbody td { + padding: 10px; + color: #212529; + font-size: 14px; + text-align: center; + border-collapse: collapse; +} +.Bk_Mg-Tbl .thead-light th, +.Notes_Table .p-datatable .p-datatable-thead>tr>th { + color: #595d6e !important; + background-color: #ecedf2 !important; + border-color: #d3d3d3 !important; + white-space: nowrap !important; +} \ No newline at end of file diff --git a/src/scss/_tabs.scss b/src/scss/_tabs.scss new file mode 100644 index 0000000..ce51089 --- /dev/null +++ b/src/scss/_tabs.scss @@ -0,0 +1,438 @@ +.p-tabview .p-tabview-nav { + display: grid !important; + grid-template-columns: repeat(7, 1fr); + grid-gap: 10px; +} + +.p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link { + background: var(--primary-theme); + border-color: var(--primary-theme); + color: #ffffff; + padding: 10px; + justify-content: center; +} + +.p-tabview .p-tabview-nav li .p-tabview-nav-link { + border: none; + border: 1px solid var(--primary-theme); + border-radius: 5px; + padding: 10px; + justify-content: center; +} + +.p-tabview-nav { + padding: 20px !important; + border-radius: 5px; +} + +.p-tabview .p-tabview-nav li .p-tabview-nav-link:not(.p-disabled):focus { + box-shadow: none; +} + +.p-tabview-panels { + padding: 0 !important; + border-radius: 4px; +} + +.ng-tab .p-tabview .p-tabview-panels { + padding: 20px !important; +} + +.app-SubSedTabs { + .p-tabview-nav { + padding: 0 !important; + padding-bottom: 20px !important; + border-radius: 0; + border-bottom: 0 !important; + } + + .p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link { + border-radius: 5px 5px 0px 0px; + padding: 15px; + } + + .p-tabview .p-tabview-nav li.p-highlight { + position: relative; + } + + .p-tabview .p-tabview-nav { + grid-gap: 0 !important; + } + + .p-tabview .p-tabview-nav li.p-highlight::after { + content: ""; + position: absolute; + bottom: unset; + left: 45%; + width: 0; + height: 0; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-top: 15px solid var(--primary-theme); + } + + .p-tabview .p-tabview-nav li .p-tabview-nav-link { + border: none !important; + padding: 15px; + } +} + +@media screen and (max-width: 768px) { + :host { + .p-tabview-nav-content { + margin: 0px; + margin-top: 10px; + height: 62px; + } + + .p-tabview-nav { + padding: 10px !important; + padding-bottom: 15px !important; + border-radius: 0 !important; + } + + .mat-tab-label { + width: 100%; + } + + .mat-tab-label-container { + overflow: auto; + } + + .mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination { + display: none; + } + + .mat-tab-label { + opacity: 2 !important; + width: 100%; + } + + ::-webkit-scrollbar { + width: 0px; + background: transparent; + } + } + + .p-tabview .p-tabview-nav { + overflow: auto; + padding: 0 !important; + padding-bottom: 5px !important; + } + + .p-tabview-nav-content { + padding: 20px; + background-color: #fff; + } + + .app-SubSedTabs { + .p-tabview-nav { + padding: 0 !important; + padding-bottom: 30px !important; + border-bottom: 1px solid #dcdada !important; + border-radius: 0; + } + + .p-tabview .p-tabview-nav { + display: grid !important; + grid-template-columns: 1fr 1fr !important; + grid-gap: 0 !important; + } + } +} + +.app-SubTabs ::ng-deep .p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link, +.app-SubTabs ::ng-deep .p-tabview-nav { + border-radius: 0; +} + +.app-SubTabs ::ng-deep.p-tabview-nav::-webkit-scrollbar { + display: none; +} + +.app-SubTabs ::ng-deep.p-tabview .p-tabview-nav li .p-tabview-nav-link { + border-radius: 0.5rem !important; +} + +.app-SubTabs .p-tabview .p-tabview-nav { + border-radius: 0; +} + +.infoSeason { + position: relative; +} + +.infoSeason .material-icons { + top: 25px; + right: -55px; + font-size: 30px; + position: absolute; + cursor: pointer; +} + +.rangeDate { + margin-bottom: 10px; + + p { + margin: 10px 0; + font-size: 14px; + margin-bottom: 3px; + } +} + +.grid-column-end { + grid-column-end: 6; +} + +.app-SubTabs ::ng-deep.p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link, +.app-SubTabs ::ng-deep.p-tabview .p-tabview-nav li .p-tabview-nav-link { + padding: 0 !important; + height: auto; +} + +.app-SubTabs ::ng-deep.p-tabview .p-tabview-nav .p-tabview-nav-link .error-tab.ErrorWrapper { + border: 1px solid red; +} + +.app-SubTabs ::ng-deep.p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link .error-tab.ErrorWrapper { + border: 0 !important; +} + +.error-tab { + text-align: center; + border: 1px solid var(--primary-theme); + border-radius: 0.4rem; + padding: 15px !important; + text-align: center; + width: 300px; +} + +.app-SubTabs .p-tabview .p-tabview-nav li .p-tabview-nav-link { + padding: 0 !important; + border: unset !important; + height: unset; +} + +.app-SubTabs ::ng-deep .p-tabview .p-tabview-nav { + grid-gap: 0.7rem !important; + padding-left: 0.7rem !important; + overflow: auto; +} + +.app-SubTabs ::ng-deep.p-tabview .p-tabview-nav li.p-highlight::after { + bottom: unset; + left: 45%; +} + +.can_policyIcon { + display: flex; + align-items: center; +} + +.cancel_policy ::ng-deep .formLabel { + display: flex !important; + align-items: center; +} + +.cancel_policy .material-icons { + font-size: 20px; + position: absolute; +} + +@media screen and (max-width: 768px) { + .app-SubTabs ::ng-deep.p-tabview-nav-content { + height: auto; + margin-top: 0; + } +} + +.app-Grid3-5 { + grid-column-end: 5; + grid-column-start: 3; +} + +.subHeading { + font-size: 16px; + font-weight: 500; + margin-bottom: 10px; +} + +.tableMainWrap { + padding-bottom: 15px; + overflow: auto; +} + +.tableMainWrap th { + font-weight: 500; +} + +.tableMainWrap table, +.tableMainWrap th, +.tableMainWrap td { + border: 1px solid #e6e6e6; + border-collapse: collapse; + padding: 10px; + text-align: center; + font-size: 14px; +} +.w-100{ + width: 100%; +} +.text-left{ + text-align: left; +} +.border-0 { + border: 0 !important; +} +.border-top-0 { + border-top: 0 !important; +} +.border-left-0 { + border-left: 0 !important; +} +.border-right-0 { + border-right: 0 !important; +} +.border-bottom-0 { + border-bottom: 0 !important; +} +.border-bottom{ + border-bottom: 1px solid #e6e6e6; +} +.noBorderLastChild th:last-child, .noBorderLastChild td:last-child{ + border-right: 0 !important; +} +.border-right-2 { + border-right: 2px solid #e6e6e6 !important; +} +.customSticky .sticky { + position: sticky; + left: 0px; + background: white; + font-weight: 500; +} + +// .formInputBorder .formInput { +// border: 0; +// height: unset; +// padding: 0; +// } + +.formInputBorder .formInput:hover { + box-shadow: unset; +} + +.readonlyInput { + background-color: transparent !important; +} + +.sectionCpyOnUI { + display: flex; + justify-content: flex-start; + align-items: start; +} + +.flightTableWrapper { + display: flex; + align-items: center; +} + +.commonSection { + overflow: auto; + border: 0; +} + +.no-data-found { + margin: 0 20px 20px; + padding: 20px; + text-align: center; + background-color: var(--secondary-light); + border-radius: 8px; + font-size: 16px; + font-weight: 500; +} + +@media screen and (max-width: 960px) { + .sectionCpyOnUI { + flex-direction: column; + gap: 10px; + overflow: auto; + + .back-to-top-btn { + margin-left: 0 !important; + } + } + + .sectionCpyOnUI .commonSection { + width: 100%; + } +} + +.hotel-tab .p-tabview-nav { + list-style: none; + margin: 0; + padding: 0; +} + +.hotel-tab .p-tabview .p-tabview-nav li .p-tabview-nav-link { + justify-content: center; + width: 100%; + display: flex !important; + padding: 10px !important; + +} + +.hotel-tab .p-tabview .p-tabview-nav li .p-tabview-nav-link.active { + background-color: var(--primary-theme) !important; + color: #ffffff !important; +} + +.hotel-tab .p-tabview-nav li { + cursor: pointer; +} + +.hotel-tab .menubtn { + border: 1px solid var(--primary-theme); + border-radius: 5px; + padding: 10px; + justify-content: center; + width: 100%; + display: flex; + background: #ffffff; + color: #6c757d; + font-weight: 600; +} + +.hotel-tab .tab { + display: none; +} + +.hotel-tab .tab.active { + display: block; +} + +.hotel-tab ::ng-deep .mat-menu-panel { + min-width: 185px !important; +} + +button.mat-menu-item.active { + background-color: var(--primary-theme) !important; + color: #ffffff; +} + +.hotel-tab ::ng-deep .p-tabview-nav-content .p-tabview-nav li a span { + white-space: nowrap; +} + +.hotel-tab ::-webkit-scrollbar-thumb { + display: none; +} + +.mat-mdc-menu-item:not([disabled]).active { + background-color: var(--primary-theme) !important; + color: #ffffff; +} + +.hotel-tab .mat-mdc-menu-item { + padding: 0 1.8rem; +} \ No newline at end of file diff --git a/src/scss/default.scss b/src/scss/default.scss new file mode 100644 index 0000000..c56000b --- /dev/null +++ b/src/scss/default.scss @@ -0,0 +1,162 @@ +@import "./badge"; +@import "./calendar"; +@import "./checkBox"; +@import "./comCalender"; +@import "./common"; +@import "./dataTable"; +@import "./dropzone"; +@import "./input"; +@import "./login"; +@import "./select"; +@import "./buttons"; +@import "./table"; +@import "./rowCol"; +@import "./tabs"; +@import "./rowCol"; +@import "./sidebar"; + +.mdc-checkbox .mdc-checkbox__native-control{ + display: none !important; + } + .treeSubCheckbox { + display: flex; + align-items: end; + line-height: 1; + gap: 13px; + } + ::ng-deep .p-checkbox .p-checkbox-box{ + border: 1px solid #ced4da !important; + } + .searchInput { + ::ng-deep .ng-dropdown-header { + padding: 0 !important; + } +} + +::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-highlight:hover { + border-color: var(--primary-theme) !important; + background: var(--primary-theme) !important; + color: #ffffff !important; +} + +::ng-deep .p-checkbox .p-checkbox-box.p-highlight { + border-color: var(--primary-theme) !important; + background: var(--primary-theme) !important; +} +.eyeICon { + top: 0; + right: 0; + bottom: 0; + margin: 10px; + position: absolute; + color: #6c757d; + cursor: pointer; + display: flex; + align-items: center; +} +.passSuggest { + display: grid; + grid-template-columns: 1fr 1fr; + white-space: nowrap; + margin: 0; + padding-left: 15px; + margin-bottom: 15px; +} +.borderBottom { + border-bottom: 0 !important; + padding-bottom: 0 !important; +} +.showSelected { + display: flex; + align-items: center; + gap: 10px; + justify-content: flex-end; +} +.selectedShow { + display: flex; + align-items: center; + gap: 5px; +} +.hotelSelectionTable .p-dialog-mask { + background-color: rgba(0, 0, 0, 0.4) !important; +} +.hotelSelectionTable .tableWrapper { + padding-bottom: 0 !important; +} +.hotelSelectionTable .p-dialog .p-dialog-content { + padding: 2rem; + min-width: 800px; +} +.hotelSelectionT .p-toolbar-group-right { + display: flex; + align-items: center; + gap: 10px; +} +.generalSetting_Card { + border: 1px solid #dee2e6 !important; + padding: 20px; +} +.passSuggestDescription li, +.passSuggest li { + font-size: 11px; +} +.passSuggest .PswdSuccess:before { + background-color: #3ed23e !important; +} +.PswdSuccess::before { + background-color: #3ed23e !important; +} +.PswdFail::before { + background: #ccc !important; +} +.PswdSuccess::marker { + color: #3ed23e !important; +} +.infoSeason { + position: relative; +} +.infoSeason .material-icons.infoIcon { + top: 25px; + right: -55px; + font-size: 30px; + position: absolute; + cursor: pointer; +} +.date_rangeBtn{ + margin-top: 22px; +} +.phoneCodeWrapper { + display: grid; + grid-template-columns: 32% 68%; + position: relative; +} +.phoneCodeWrapper .ng-select.ng-select-single .ng-select-container { + border-radius: 4px 0 0 4px !important; + border-right: 0 !important; +} +.phoneCodeWrapper .MobileInputTxt { + border-radius: 0 4px 4px 0 !important; +} +.phoneCodeWrapper .MbTxt_radius { + border-radius: 4px 0 0 4px !important; + border-right: 0; +} +a { + color: var(--primary-theme); +} +.rate-tabs .p-tabview .p-tabview-nav { + overflow: auto; + } + .selectWrapper{ + position: absolute; + right: 0; + a{ + color: var(--primary-theme); + } + } +@media screen and (max-width: 960px) { + .infoSeason .material-icons.infoIcon{ + top: 65px; + right: unset; + } +} \ No newline at end of file diff --git a/src/styles.scss b/src/styles.scss new file mode 100644 index 0000000..186ceed --- /dev/null +++ b/src/styles.scss @@ -0,0 +1,231 @@ +@import "~@ng-select/ng-select/themes/default.theme.css"; +html, +body { + margin: 0; + padding: 0; + height: 100%; + box-sizing: border-box; + background-color: #f2f3f8; + color: var(--text-color); +} + +body { + font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, + "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} +:root { + --primary-theme: #003143; + --secondary-light: #dbebfb; + --text-color: #48465b; + --error-border: #fa0808; + --error-color: #fa0808; + --error-backgound: #fa0808; +} +.asidebarIcons { + height: 25px !important; + width: 25px !important; +} + +.Services { + background-image: url("https://aosedge.b-cdn.net/assets/ExAsideIcons/services.svg") !important; +} + +.UserConfig { + background-image: url("https://aosedge.b-cdn.net/assets/ExAsideIcons/organization.svg") !important; +} + +.BookingManagement { + background-image: url("https://aosedge.b-cdn.net/assets/ExAsideIcons/crm.svg") !important; +} + +.disabled { + pointer-events: none; + cursor: default; +} + +.errorspan { + color: var(--error-color); + font-size: 14px; +} + + +.readonlyInput { + font-size: 14px !important; + background: #f2f3f8 !important; +} + +.booking-history-status-fail { + background: #fce7e9; + color: #e24c4b !important; + border-radius: 4px; + font-weight: 600; + font-size: 12px; + padding: 4px 8px !important; +} + +.booking-history-status-success { + background: #e8fff3 !important; + color: #50cd89 !important; + border-radius: 4px; + font-weight: 600; + font-size: 12px; + padding: 4px 8px !important; +} + +.booking-history-status { + color: black; + padding: 4px 12px; + border-radius: 20px; +} +.btn { + min-width: 64px; + padding: 0 16px; + text-align: center; + min-height: 40px; + font-size: 16px; + border-radius: var(--border-radius); +} + +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +input[type="number"] { + -moz-appearance: textfield; +} + +::ng-deep .ng-dropdown-header { + display: none !important; +} +::ng-deep .p-fileupload .p-fileupload-buttonbar .p-fileupload-choose{ + background-color: var(--primary-theme) !important; +} +.treeTableUser .p-datatable-wrapper .p-datatable-thead tr { + display: grid; + grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr 1fr; + padding: 0 5px; +} +.treeTableUser .p-treetable .p-treetable-thead > tr > th { + text-align: left; + padding: 1rem; + font-size: 14px; + font-weight: 600; + color: #495057; + background: #f8f9fa; + transition: box-shadow .2s; +} +.px-0 { + padding-left: 0; + padding-right: 0; +} +.formInput[readonly] { + background-color: #e9ecef; + opacity: 1; +} +.phoneCodeWrapper { + display: grid; + grid-template-columns: 30% 70%; +} +.text-nowrap { + white-space: nowrap; +} +.resultNotFound { + height: 42px; +} +.resultNotFound td { + position: absolute !important; + width: 100% !important; + text-align: center !important; +} +.passwordCriteria { + display: grid; + grid-template-columns: 1fr 1fr; + padding-left: 17px; +} +.passwordCriteria li { + font-size: 12px; +} +.status { + border-radius: 4px; + padding: 2px 8px; + font-weight: 500; + font-size: 12px; + text-align: center; +} +.status-success { + background: #e8f6e6; + color: #62bc55; +} +.status-failed { + background: #fce7e9; + color: #e24c4b; +} +.ng-asideToggle { + cursor: pointer; +} +.mat-mdc-menu-item-text { + font-size: 14px !important; +} +.app-SubTabs.rate-tabs .p-tabview .p-tabview-panels { + background: transparent; +} +.formControlWrapper { + position: relative; + margin-bottom: 20px; +} +.p-toast-message-error .p-toast-message-icon .p-icon-wrapper { + width: 25px; + height: 25px; + color: #73000c; + margin-top: 6px; +} +.p-toast-message-success .p-toast-message-icon .p-icon-wrapper { + width: 23px; + height: 23px; + color: #224a23; + margin-top: 4px; +} +.p-toast-message-error .p-toast .p-toast-message .p-toast-message-content .p-toast-message-text { + margin: 0 0 0 0.8rem !important; +} +.p-toast-message-success.p-toast .p-toast-message .p-toast-message-content .p-toast-message-text { + margin: 0 0 0 0.8rem !important; +} +.p-toast-message-error .p-toast-icon-close .p-icon-wrapper { + color: #73000c; + margin-top: 10px; +} +.p-toast-message-success .p-toast-icon-close .p-icon-wrapper { + color: #224a23; + margin-top: 10px; +} +.p-toast .p-toast-message .p-toast-icon-close:hover { + background: transparent !important; +} + +@media screen and (max-width: 960px) { + ::ng-deep .ng-dropdown-header { + display: block !important; + } + + ::ng-deep .ng-dropdown-panel.ng-select-top { + width: 100% !important; + } +} +@media screen and (min-width: 1301px) { + .app-loginBody { + max-width: 75%; + min-height: 100vh; + } +} +.ErrorWrapper .formInput, .ErrorWrapper .ng-select-container, .error-tab.ErrorWrapper{ + border: 1px solid var(--error-border) !important; + border-radius: 4px !important; +} + +::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input{ + font-size: 14px !important; +} \ No newline at end of file diff --git a/src/test.ts b/src/test.ts new file mode 100644 index 0000000..598d11e --- /dev/null +++ b/src/test.ts @@ -0,0 +1,26 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: { + context(path: string, deep?: boolean, filter?: RegExp): { + keys(): string[]; + (id: string): T; + }; +}; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting(), +); + +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/tsconfig.app.json b/tsconfig.app.json new file mode 100644 index 0000000..82d91dc --- /dev/null +++ b/tsconfig.app.json @@ -0,0 +1,15 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..93bc333 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,35 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": false, + "noImplicitOverride": false, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "skipLibCheck": true, + "target": "ES2022", + "module": "ES2022", + "lib": [ + "ES2022", + "Es2022.String", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true, + "strictNullChecks": false, + } +} diff --git a/tsconfig.spec.json b/tsconfig.spec.json new file mode 100644 index 0000000..092345b --- /dev/null +++ b/tsconfig.spec.json @@ -0,0 +1,18 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "files": [ + "src/test.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/uat.Dockerfile b/uat.Dockerfile new file mode 100644 index 0000000..26ba8dd --- /dev/null +++ b/uat.Dockerfile @@ -0,0 +1,16 @@ +FROM node:20.11.1 as builder + +WORKDIR /usr/src/app +COPY . /usr/src/app + +RUN npm install && npm run build-uat + +FROM nginx:1.14.2-alpine + +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=builder /usr/src/app/dist/ExtraNet /usr/share/nginx/html + +EXPOSE 80 +EXPOSE 443 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file