diff --git a/angular.json b/angular.json index 640b3c0..f87a1e1 100644 --- a/angular.json +++ b/angular.json @@ -51,6 +51,54 @@ "optimization": false, "sourceMap": true }, + "novin": { + "assets": [ + { + "glob": "**/*", + "input": "public-novin" + } + ], + "budgets": [ + { + "maximumError": "3MB", + "maximumWarning": "2MB", + "type": "initial" + }, + { + "maximumError": "8kB", + "maximumWarning": "4kB", + "type": "anyComponentStyle" + } + ], + "fileReplacements": [ + { + "replace": "src/config.ts", + "with": "src/tenants/novin/config.ts" + }, + { + "replace": "src/assets/images/brandingAssets.ts", + "with": "src/tenants/novin/brandingAssets.ts" + }, + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.novin.ts" + }, + { + "replace": "src/app.routes.ts", + "with": "src/tenants/novin/app.routes.ts" + }, + { + "replace": "src/app/branding/branding.config.ts", + "with": "src/tenants/novin/branding.config.ts" + } + ], + "outputHashing": "all", + "outputPath": "dist/novin", + "styles": [ + "src/assets/styles.scss", + "src/assets/psp.scss" + ] + }, "production": { "budgets": [ { @@ -278,6 +326,9 @@ "development": { "buildTarget": "pos.client:build:development" }, + "novin": { + "buildTarget": "pos.client:build:novin" + }, "production": { "buildTarget": "pos.client:build:production" }, diff --git a/docker-compose.yml b/docker-compose.yml index b286152..e4cf9a0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,17 +13,28 @@ services: - "8091:8090" restart: unless-stopped - app_sepehr: + app_novin: build: context: . dockerfile: Dockerfile args: - TENANT: sepehr - DIST_DIR: sepehr + TENANT: novin + DIST_DIR: novin ports: - - "8092:8090" + - "8093:8090" restart: unless-stopped + # app_sepehr: + # build: + # context: . + # dockerfile: Dockerfile + # args: + # TENANT: sepehr + # DIST_DIR: sepehr + + # ports: + # - "8092:8090" + # restart: unless-stopped app_default: build: diff --git a/package.json b/package.json index 8bc8ae4..913ead7 100644 --- a/package.json +++ b/package.json @@ -56,11 +56,13 @@ "private": true, "scripts": { "build": "ng build", + "build:novin": "ng build --configuration novin", "build:sepehr": "ng build --configuration sepehr", "build:tis": "ng build --configuration tis", "ng": "ng", "prestart": "node aspnetcore-https", "start": "run-script-os", + "start:novin": " ng serve --configuration novin", "start:sepehr": " ng serve --configuration sepehr", "start:tis": " ng serve --configuration tis", "test": "ng test", diff --git a/public-novin/branding/logo.png b/public-novin/branding/logo.png new file mode 100644 index 0000000..0eef5d4 Binary files /dev/null and b/public-novin/branding/logo.png differ diff --git a/public-novin/favicon.ico b/public-novin/favicon.ico new file mode 100644 index 0000000..32133ec Binary files /dev/null and b/public-novin/favicon.ico differ diff --git a/public-novin/favicon/apple-touch-icon.png b/public-novin/favicon/apple-touch-icon.png new file mode 100644 index 0000000..2c9b920 Binary files /dev/null and b/public-novin/favicon/apple-touch-icon.png differ diff --git a/public-novin/favicon/favicon-96x96.png b/public-novin/favicon/favicon-96x96.png new file mode 100644 index 0000000..a7cd349 Binary files /dev/null and b/public-novin/favicon/favicon-96x96.png differ diff --git a/public-novin/favicon/favicon.ico b/public-novin/favicon/favicon.ico new file mode 100644 index 0000000..32133ec Binary files /dev/null and b/public-novin/favicon/favicon.ico differ diff --git a/public-novin/favicon/favicon.svg b/public-novin/favicon/favicon.svg new file mode 100644 index 0000000..6e178b8 --- /dev/null +++ b/public-novin/favicon/favicon.svg @@ -0,0 +1 @@ +RealFaviconGeneratorhttps://realfavicongenerator.net \ No newline at end of file diff --git a/public-novin/favicon/site.webmanifest b/public-novin/favicon/site.webmanifest new file mode 100644 index 0000000..0ebc435 --- /dev/null +++ b/public-novin/favicon/site.webmanifest @@ -0,0 +1,36 @@ +{ + "background_color": "#ffffff", + "display": "standalone", + "icons": [ + { + "purpose": "any", + "sizes": "192x192", + "src": "/favicon/web-app-manifest-192x192.png", + "type": "image/png" + }, + { + "purpose": "maskable", + "sizes": "192x192", + "src": "/favicon/web-app-manifest-192x192.png", + "type": "image/png" + }, + { + "purpose": "any", + "sizes": "512x512", + "src": "/favicon/web-app-manifest-512x512.png", + "type": "image/png" + }, + { + "purpose": "maskable", + "sizes": "512x512", + "src": "/favicon/web-app-manifest-512x512.png", + "type": "image/png" + } + ], + "id": "/", + "name": "پرداخت نوین - مدیریت صورت‌حساب‌های مالیاتی", + "scope": "/", + "short_name": "پرداخت نوین", + "start_url": "/", + "theme_color": "#ffffff" +} diff --git a/public-novin/favicon/web-app-manifest-192x192.png b/public-novin/favicon/web-app-manifest-192x192.png new file mode 100644 index 0000000..fe82e37 Binary files /dev/null and b/public-novin/favicon/web-app-manifest-192x192.png differ diff --git a/public-novin/favicon/web-app-manifest-512x512.png b/public-novin/favicon/web-app-manifest-512x512.png new file mode 100644 index 0000000..4ba2bef Binary files /dev/null and b/public-novin/favicon/web-app-manifest-512x512.png differ diff --git a/src/environments/environment.novin.ts b/src/environments/environment.novin.ts new file mode 100644 index 0000000..9a87f89 --- /dev/null +++ b/src/environments/environment.novin.ts @@ -0,0 +1,13 @@ +// TIS tenant environment configuration +export const environment = { + production: true, + apiBaseUrl: 'https://psp-api.shift-am.ir', + // apiBaseUrl: 'http://192.168.128.73:5002', + // apiBaseUrl: 'http://192.168.0.162:5002', + // apiBaseUrl: 'http://localhost:5002', + host: 'localhost', + port: 5011, + enableLogging: false, + enableDebug: false, + enableNativeBridge: true, +}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 61b7975..3e9188a 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -3,7 +3,8 @@ export const environment = { production: false, // apiBaseUrl: 'http://194.59.214.243:5002', // apiBaseUrl: 'http://192.168.128.73:5002', - apiBaseUrl: 'http://localhost:5002', + // apiBaseUrl: 'http://localhost:5002', + apiBaseUrl: 'https://psp-api.shift-am.ir', // host: 'http://194.59.214.243', host: 'localhost', port: 5000, diff --git a/src/tenants/novin/app.routes.ts b/src/tenants/novin/app.routes.ts new file mode 100644 index 0000000..2bbcea0 --- /dev/null +++ b/src/tenants/novin/app.routes.ts @@ -0,0 +1,20 @@ +import { posAuthNamedRoutes } from '@/domains/pos/modules/auth/constants'; +import { POS_ROUTES } from '@/domains/pos/routes'; +import { PUBLIC_SALE_INVOICES_ROUTES } from '@/modules/saleInvoices/constants'; +import { Notfound } from '@/pages/notfound/notfound.component'; +import { Routes } from '@angular/router'; + +export const appRoutes: Routes = [ + { + path: '', + loadComponent: () => + import('@/domains/pos/layouts/layout.component').then((m) => m.PosLayoutComponent), + children: [POS_ROUTES], + }, + { + ...posAuthNamedRoutes.login, + path: 'auth', + }, + ...PUBLIC_SALE_INVOICES_ROUTES, + { path: '**', component: Notfound }, +]; diff --git a/src/tenants/novin/assets/images/login.jpg b/src/tenants/novin/assets/images/login.jpg new file mode 100644 index 0000000..ecfc21f Binary files /dev/null and b/src/tenants/novin/assets/images/login.jpg differ diff --git a/src/tenants/novin/assets/images/logo.png b/src/tenants/novin/assets/images/logo.png new file mode 100644 index 0000000..0eef5d4 Binary files /dev/null and b/src/tenants/novin/assets/images/logo.png differ diff --git a/src/tenants/novin/branding.config.ts b/src/tenants/novin/branding.config.ts new file mode 100644 index 0000000..16f3e00 --- /dev/null +++ b/src/tenants/novin/branding.config.ts @@ -0,0 +1,27 @@ +import { BrandingConfig } from '../default/branding.config'; + +export const brandingConfig: BrandingConfig = { + appTitle: 'پرداحت نوین - مدیریت صورت‌حساب‌های مالیاتی', + manifestPath: '/favicon/site.webmanifest', + themeColor: '#ffffff', + enableInstallPrompt: true, + title: 'پرداحت نوین', + fullTitle: 'پرداحت نوین - مدیریت صورت‌حساب‌های مالیاتی', + support: { + phones: [ + { + title: 'واحد پشتیبانی 1', + phones: ['021-91012345'], + }, + { + title: 'واحد پشتیبانی 2', + phones: ['021-91012346'], + }, + { + title: 'پاسخگویی اضطراری', + phones: ['0912-123-4567'], + }, + ], + workingHours: 'شنبه تا چهارشنبه: 8 صبح تا 5 عصر، پنجشنبه: 8 صبح تا 2 عصر', + }, +}; diff --git a/src/tenants/novin/brandingAssets.ts b/src/tenants/novin/brandingAssets.ts new file mode 100644 index 0000000..68af344 --- /dev/null +++ b/src/tenants/novin/brandingAssets.ts @@ -0,0 +1,7 @@ +import login from 'src/tenants/novin/assets/images/login.jpg'; +import logo from 'src/tenants/novin/assets/images/logo.png'; + +export default { + logo, + login, +}; diff --git a/src/tenants/novin/config.ts b/src/tenants/novin/config.ts new file mode 100644 index 0000000..52a9020 --- /dev/null +++ b/src/tenants/novin/config.ts @@ -0,0 +1,3 @@ +export default { + isPosApplication: true, +};