diff --git a/.deploy/admin-web-angular/Dockerfile b/.deploy/admin-web-angular/Dockerfile new file mode 100644 index 000000000..d7f3788b6 --- /dev/null +++ b/.deploy/admin-web-angular/Dockerfile @@ -0,0 +1,59 @@ +FROM node:alpine AS development + +RUN apk update \ + && apk add libexecinfo libexecinfo-dev \ + && npm i -g npm \ + && apk --no-cache add --virtual builds-deps build-base \ + snappy g++ snappy-dev gcc libgcc libstdc++ linux-headers autoconf automake make nasm python git \ + && npm install --quiet node-gyp -g \ + && npm config set python /usr/bin/python \ + && npm install yarn -g --force + +RUN mkdir /srv/ever && chown node:node /srv/ever + +USER node + +WORKDIR /srv/ever + +COPY --chown=node:node package.json yarn.lock lerna.json package.workspaces.json ./ +COPY --chown=node:node packages/admin-web-angular/package.json ./packages/admin-web-angular/package.json +COPY --chown=node:node .snyk ./.snyk +COPY --chown=node:node packages/common ./packages/common +COPY --chown=node:node packages/common-angular ./packages/common-angular + +RUN yarn install + +FROM node:alpine AS production + +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.6.0/wait /wait + +RUN npm install cross-env -g \ + && npm install pm2 -g --unsafe-perm \ + && chmod +x /wait + +RUN mkdir /srv/ever && chown node:node /srv/ever +RUN mkdir -p /srv/ever/packages/admin-web-angular && chown node:node /srv/ever/packages/admin-web-angular +RUN mkdir -p /srv/ever/packages/common && chown node:node /srv/ever/packages/common +RUN mkdir -p /srv/ever/packages/common-angular && chown node:node /srv/ever/packages/common-angular + +USER node + +WORKDIR /srv/ever + +ARG NODE_OPTIONS="--max-old-space-size=2048" +ENV NODE_OPTIONS $NODE_OPTIONS +ENV NODE_ENV production + +COPY --from=development --chown=node:node /srv/ever/node_modules ./node_modules +COPY --from=development --chown=node:node /srv/ever/packages/common/node_modules ./packages/common/node_modules +COPY --from=development --chown=node:node /srv/ever/packages/common-angular/node_modules ./packages/common-angular/node_modules +COPY --from=development --chown=node:node /srv/ever/packages/admin-web-angular/node_modules ./packages/admin-web-angular/node_modules +COPY --chown=node:node package.json yarn.lock lerna.json package.workspaces.json tsconfig.base.json ./ +COPY --chown=node:node packages/common ./packages/common +COPY --chown=node:node packages/common-angular ./packages/common-angular +COPY --chown=node:node packages/admin-web-angular ./packages/admin-web-angular + +EXPOSE 5500 5501 5050 5555 + +CMD /wait \ + && yarn run:admin \ No newline at end of file diff --git a/.deploy/backend/api/Dockerfile b/.deploy/backend/api/Dockerfile deleted file mode 100644 index cb93eaae4..000000000 --- a/.deploy/backend/api/Dockerfile +++ /dev/null @@ -1,56 +0,0 @@ -# API - -FROM node:alpine AS development - -RUN apk update \ - && apk add libexecinfo libexecinfo-dev \ - && npm i -g npm \ - && apk --no-cache add --virtual builds-deps build-base \ - snappy g++ snappy-dev gcc libgcc libstdc++ linux-headers autoconf automake make nasm python git \ - && npm install --quiet node-gyp -g \ - && npm config set python /usr/bin/python \ - && npm install yarn -g - -RUN mkdir /srv/ever && chown node:node /srv/ever - -USER node - -WORKDIR /srv/ever - -COPY --chown=node:node package.json yarn.lock ./ -COPY --chown=node:node backend/api/package.json ./backend/api/package.json -COPY --chown=node:node .snyk ./.snyk -COPY --chown=node:node backend/api/.snyk ./backend/api/.snyk - -RUN yarn install - -RUN yarn --cwd ./backend/api install - -FROM node:alpine AS production - -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.6.0/wait /wait - -RUN npm install cross-env -g \ - && npm install pm2 -g --unsafe-perm \ - && chmod +x /wait - -RUN mkdir /srv/ever && chown node:node /srv/ever -RUN mkdir -p /srv/ever/backend/api/build && chown node:node /srv/ever/backend/api/build - -USER node - -WORKDIR /srv/ever - -ARG NODE_OPTIONS="--max-old-space-size=2048" -ENV NODE_OPTIONS $NODE_OPTIONS -ENV NODE_ENV production - -COPY --from=development --chown=root:root /srv/ever/node_modules ./node_modules -COPY --from=development --chown=root:root /srv/ever/backend/api/node_modules ./backend/api/node_modules - -COPY . . - -EXPOSE 5500 5501 5050 5555 - -CMD /wait \ - && cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=2048 yarn --cwd ./backend/api node build/main.js \ No newline at end of file diff --git a/.deploy/core/Dockerfile b/.deploy/core/Dockerfile new file mode 100644 index 000000000..e99eeb328 --- /dev/null +++ b/.deploy/core/Dockerfile @@ -0,0 +1,57 @@ +# API + +FROM node:alpine AS development + +RUN apk update \ + && apk add libexecinfo libexecinfo-dev \ + && npm i -g npm \ + && apk --no-cache add --virtual builds-deps build-base \ + snappy g++ snappy-dev gcc libgcc libstdc++ linux-headers autoconf automake make nasm python git \ + && npm install --quiet node-gyp -g \ + && npm config set python /usr/bin/python \ + && npm install yarn -g --force + +RUN mkdir /srv/ever && chown node:node /srv/ever + +USER node + +WORKDIR /srv/ever + +COPY --chown=node:node package.json yarn.lock lerna.json package.workspaces.json ./ +COPY --chown=node:node packages/core/package.json ./packages/core/package.json +COPY --chown=node:node .snyk ./.snyk +COPY --chown=node:node packages/core/.snyk ./packages/core/.snyk +COPY --chown=node:node packages/common ./packages/common + +RUN yarn install + +FROM node:alpine AS production + +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.6.0/wait /wait + +RUN npm install cross-env -g \ + && npm install pm2 -g --unsafe-perm \ + && chmod +x /wait + +RUN mkdir /srv/ever && chown node:node /srv/ever +RUN mkdir -p /srv/ever/packages/core && chown node:node /srv/ever/packages/core +RUN mkdir -p /srv/ever/packages/common && chown node:node /srv/ever/packages/common + +USER node + +WORKDIR /srv/ever + +ARG NODE_OPTIONS="--max-old-space-size=2048" +ENV NODE_OPTIONS $NODE_OPTIONS +ENV NODE_ENV production + +COPY --from=development --chown=node:node /srv/ever/node_modules ./node_modules +COPY --from=development --chown=node:node /srv/ever/packages/core/node_modules ./packages/core/node_modules +COPY --chown=node:node package.json yarn.lock lerna.json package.workspaces.json tsconfig.base.json ./ +COPY --chown=node:node packages/common ./packages/common +COPY --chown=node:node packages/core ./packages/core + +EXPOSE 5500 5501 5050 5555 + +CMD /wait \ + && yarn --cwd ./packages/common build && yarn run:server \ No newline at end of file diff --git a/.deploy/shop-web-angular/Dockerfile b/.deploy/shop-web-angular/Dockerfile new file mode 100644 index 000000000..756bc2341 --- /dev/null +++ b/.deploy/shop-web-angular/Dockerfile @@ -0,0 +1,59 @@ +FROM node:alpine AS development + +RUN apk update \ + && apk add libexecinfo libexecinfo-dev \ + && npm i -g npm \ + && apk --no-cache add --virtual builds-deps build-base \ + snappy g++ snappy-dev gcc libgcc libstdc++ linux-headers autoconf automake make nasm python git \ + && npm install --quiet node-gyp -g \ + && npm config set python /usr/bin/python \ + && npm install yarn -g --force + +RUN mkdir /srv/ever && chown node:node /srv/ever + +USER node + +WORKDIR /srv/ever + +COPY --chown=node:node package.json yarn.lock lerna.json package.workspaces.json ./ +COPY --chown=node:node packages/shop-web-angular/package.json ./packages/shop-web-angular/package.json +COPY --chown=node:node .snyk ./.snyk +COPY --chown=node:node packages/common ./packages/common +COPY --chown=node:node packages/common-angular ./packages/common-angular + +RUN yarn install + +FROM node:alpine AS production + +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.6.0/wait /wait + +RUN npm install cross-env -g \ + && npm install pm2 -g --unsafe-perm \ + && chmod +x /wait + +RUN mkdir /srv/ever && chown node:node /srv/ever +RUN mkdir -p /srv/ever/packages/shop-web-angular && chown node:node /srv/ever/packages/shop-web-angular +RUN mkdir -p /srv/ever/packages/common && chown node:node /srv/ever/packages/common +RUN mkdir -p /srv/ever/packages/common-angular && chown node:node /srv/ever/packages/common-angular + +USER node + +WORKDIR /srv/ever + +ARG NODE_OPTIONS="--max-old-space-size=2048" +ENV NODE_OPTIONS $NODE_OPTIONS +ENV NODE_ENV production + +COPY --from=development --chown=node:node /srv/ever/node_modules ./node_modules +COPY --from=development --chown=node:node /srv/ever/packages/common/node_modules ./packages/common/node_modules +COPY --from=development --chown=node:node /srv/ever/packages/common-angular/node_modules ./packages/common-angular/node_modules +COPY --from=development --chown=node:node /srv/ever/packages/shop-web-angular/node_modules ./packages/shop-web-angular/node_modules +COPY --chown=node:node package.json yarn.lock lerna.json package.workspaces.json tsconfig.base.json ./ +COPY --chown=node:node packages/common ./packages/common +COPY --chown=node:node packages/common-angular ./packages/common-angular +COPY --chown=node:node packages/shop-web-angular ./packages/shop-web-angular + +EXPOSE 5500 5501 5050 5555 + +CMD /wait \ + && yarn run:shopweb \ No newline at end of file diff --git a/README.md b/README.md index 820441459..70a657b92 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,7 @@ According to [cloc](https://github.com/AlDanial/cloc) project, Ever Platform tod - [Kyle Kitlinski](https://github.com/K-Kit) - [Milena Dimova](https://www.linkedin.com/in/dimova-milena-31010414) (UI/UX Designer) - [Rachit Magon](https://github.com/rmagon) +- [Surya Singh](https://github.com/suryasingh) View full list of our [contributors](https://github.com/ever-co/ever/graphs/contributors). diff --git a/docker-compose.yml b/docker-compose.yml index 4bd22d0cf..2b5b75a96 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,16 +15,17 @@ services: networks: - overlay - api: - container_name: api - image: ever-api:latest + core: + container_name: core + image: ever-core:latest build: context: . - dockerfile: .deploy/backend/api/Dockerfile + dockerfile: .deploy/core/Dockerfile environment: NODE_ENV: production WAIT_HOSTS: mongo:27017 DB_URI: mongodb://mongo/ever_development + TESTING_DB_URI: mongodb://mongo/ever_testing restart: on-failure depends_on: - mongo @@ -33,7 +34,7 @@ services: volumes: - .:/srv/ever - root_node_modules:/srv/ever/node_modules - - api_node_modules:/srv/ever/backend/api/node_modules + - core_node_modules:/srv/ever/packages/core/node_modules ports: - 5500:5500 - 5501:5501 @@ -44,9 +45,10 @@ services: volumes: root_node_modules: - api_node_modules: + core_node_modules: certificates: mongo_data: + admin_web_node_modules: networks: overlay: diff --git a/packages/admin-web-angular/.dockerignore b/packages/admin-web-angular/.dockerignore new file mode 100644 index 000000000..50777cda6 --- /dev/null +++ b/packages/admin-web-angular/.dockerignore @@ -0,0 +1,8 @@ +.git +.gitignore +.gitmodules +README.md +docker +node_modules +tmp + diff --git a/packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.ts b/packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.ts index 0c2a67aa9..e77349963 100644 --- a/packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.ts +++ b/packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.ts @@ -16,9 +16,8 @@ import { IWarehouseCreateObject } from '@modules/server.common/interfaces/IWareh import { map, first } from 'rxjs/operators'; import { CarrierRouter } from '@modules/client.common.angular2/routers/carrier-router.service'; import { IMultiSelectOption } from 'angular-2-dropdown-multiselect'; -import { Observable, concat } from 'rxjs'; +import { Observable, concat, of } from 'rxjs'; import { FormHelpers } from '../../../../forms/helpers'; -import 'rxjs/add/observable/of'; import _ from 'lodash'; import isUrl from 'is-url'; import { TranslateService } from '@ngx-translate/core'; @@ -54,7 +53,7 @@ export class WarehouseManageTabsDetailsComponent uploaderPlaceholder: string; carriersOptions$: Observable = concat( - Observable.of([]), + of([]), this._carrierRouter.getAllActive().pipe( map((carriers) => carriers diff --git a/packages/admin-web-angular/src/app/pages/+warehouses/+warehouse/+warehouse-manage/warehouse-manage.component.ts b/packages/admin-web-angular/src/app/pages/+warehouses/+warehouse/+warehouse-manage/warehouse-manage.component.ts index 6f48004ce..35b3a79d7 100644 --- a/packages/admin-web-angular/src/app/pages/+warehouses/+warehouse/+warehouse-manage/warehouse-manage.component.ts +++ b/packages/admin-web-angular/src/app/pages/+warehouses/+warehouse/+warehouse-manage/warehouse-manage.component.ts @@ -8,7 +8,6 @@ import { LocationFormComponent } from '../../../../@shared/forms/location'; import { WarehouseRouter } from '@modules/client.common.angular2/routers/warehouse-router.service'; import Warehouse from '@modules/server.common/entities/Warehouse'; import { WarehouseManageTabsComponent } from '../../../../@shared/warehouse/forms/warehouse-manage-tabs/warehouse-manage-tabs.component'; -import 'rxjs/add/operator/withLatestFrom'; @Component({ selector: 'ea-warehouse-manage', @@ -37,12 +36,6 @@ export class WarehouseManageComponent implements OnInit { map((p) => p['id']) ); - readonly warehouse$ = this.warehouseId$.pipe( - switchMap((id) => { - return this.warehouseRouter.get(id).pipe(first()); - }) - ); - private _currentWarehouse: Warehouse; constructor( @@ -53,7 +46,17 @@ export class WarehouseManageComponent implements OnInit { ) {} ngOnInit() { - this._loadWarehouse(); + this.loadWarehouse(); + } + + async loadWarehouse() { + const warehouseId = await this.warehouseId$.pipe(first()).toPromise(); + const warehouse = await this.warehouseRouter + .get(warehouseId) + .pipe(first()) + .toPromise(); + this._currentWarehouse = warehouse; + this.warehouseManageTabs.setValue(warehouse); } get validForm() { @@ -106,21 +109,6 @@ export class WarehouseManageComponent implements OnInit { } } - private _loadWarehouse() { - this.warehouse$ - .withLatestFrom(this.warehouseId$) - .subscribe(([warehouse, id]) => { - if (!warehouse) { - this.toasterService.pop( - 'error', - `Warehouse with id ${id} doesn't exist!` - ); - } - this._currentWarehouse = warehouse; - this.warehouseManageTabs.setValue(warehouse); - }); - } - private _showWarehouseUpdateSuccessMessage(warehouse) { this.toasterService.pop( 'success', diff --git a/packages/carrier-mobile-ionic/.dockerignore b/packages/carrier-mobile-ionic/.dockerignore new file mode 100644 index 000000000..50777cda6 --- /dev/null +++ b/packages/carrier-mobile-ionic/.dockerignore @@ -0,0 +1,8 @@ +.git +.gitignore +.gitmodules +README.md +docker +node_modules +tmp + diff --git a/packages/common-angular/.dockerignore b/packages/common-angular/.dockerignore new file mode 100644 index 000000000..50777cda6 --- /dev/null +++ b/packages/common-angular/.dockerignore @@ -0,0 +1,8 @@ +.git +.gitignore +.gitmodules +README.md +docker +node_modules +tmp + diff --git a/packages/common/.dockerignore b/packages/common/.dockerignore new file mode 100644 index 000000000..50777cda6 --- /dev/null +++ b/packages/common/.dockerignore @@ -0,0 +1,8 @@ +.git +.gitignore +.gitmodules +README.md +docker +node_modules +tmp + diff --git a/packages/core/src/app.module.ts b/packages/core/src/app.module.ts index 9989743a1..cc12a6fc5 100644 --- a/packages/core/src/app.module.ts +++ b/packages/core/src/app.module.ts @@ -73,8 +73,7 @@ const entities = ServicesApp.getEntities(); // configure TypeORM Connection which will be possible to use inside NestJS (e.g. resolvers) TypeOrmModule.forRoot({ type: 'mongodb', - host: 'localhost', - database: 'test', + url: env.DB_URI, entities, synchronize: true, useNewUrlParser: true, diff --git a/packages/merchant-tablet-ionic/.dockerignore b/packages/merchant-tablet-ionic/.dockerignore new file mode 100644 index 000000000..50777cda6 --- /dev/null +++ b/packages/merchant-tablet-ionic/.dockerignore @@ -0,0 +1,8 @@ +.git +.gitignore +.gitmodules +README.md +docker +node_modules +tmp + diff --git a/packages/merchant-tablet-ionic/src/@shared/user/mutation/user-mutation.component.html b/packages/merchant-tablet-ionic/src/@shared/user/mutation/user-mutation.component.html index 9a997c94d..e45700158 100644 --- a/packages/merchant-tablet-ionic/src/@shared/user/mutation/user-mutation.component.html +++ b/packages/merchant-tablet-ionic/src/@shared/user/mutation/user-mutation.component.html @@ -5,7 +5,7 @@

(user ? 'Edit customer' : 'CUSTOMERS_VIEW.ADD_CUSTOMER') | translate }}

- diff --git a/packages/merchant-tablet-ionic/src/@shared/user/mutation/user-mutation.component.ts b/packages/merchant-tablet-ionic/src/@shared/user/mutation/user-mutation.component.ts index 19fe20248..5c3746ade 100644 --- a/packages/merchant-tablet-ionic/src/@shared/user/mutation/user-mutation.component.ts +++ b/packages/merchant-tablet-ionic/src/@shared/user/mutation/user-mutation.component.ts @@ -43,6 +43,12 @@ export class UserMutationComponent { @Output() customerIdEmitter = new EventEmitter(); + @Input() + visible: boolean = true; + + @Output() + updateVisible = new EventEmitter(); + mapCoordinatesEmitter = new EventEmitter< google.maps.LatLng | google.maps.LatLngLiteral >(); @@ -79,6 +85,11 @@ export class UserMutationComponent { this.customerIdEmitter.emit(customerId); } + changeState(): void { + this.visible = false; + this.updateVisible.emit(this.visible); + } + async createCustomer() { let userId: string; let message: string; diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/bg-BG.json b/packages/merchant-tablet-ionic/src/assets/i18n/bg-BG.json index a6c1b8622..309cc24d8 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/bg-BG.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/bg-BG.json @@ -75,7 +75,13 @@ "ADDRESS": "Адрес", "LOGO": "Лого" }, + "TRACK_ORDER": "Проследяване на поръчка", "TRACK_CARRIER": "Проследяване на доставчика", + "DELIVERY_TRACKING": "Проследяване на доставките", + "CARRIER": "Доставчик", + "STORE": "Магазин", + "DELIVERY_COUNT": "Брой на доставките:", + "CUSTOMER": "Клиент", "CARRIERS": "Куриери", "ADD_CARRIERS": "Добавяне на превозвачи", "IMAGE": "Изображение", @@ -265,6 +271,7 @@ "NO_PRODUCTS": "Няма продукти" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "Нещо не е наред, не можете да направите поръчка!", "NEW_PRODUCT_TYPE": "Нов тип продукт", "CREATE_NEW_PRODUCT_TYPE": "Създай нов продукт", "TITLE": "Заглавие", diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/bg.json b/packages/merchant-tablet-ionic/src/assets/i18n/bg.json index a6c1b8622..309cc24d8 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/bg.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/bg.json @@ -75,7 +75,13 @@ "ADDRESS": "Адрес", "LOGO": "Лого" }, + "TRACK_ORDER": "Проследяване на поръчка", "TRACK_CARRIER": "Проследяване на доставчика", + "DELIVERY_TRACKING": "Проследяване на доставките", + "CARRIER": "Доставчик", + "STORE": "Магазин", + "DELIVERY_COUNT": "Брой на доставките:", + "CUSTOMER": "Клиент", "CARRIERS": "Куриери", "ADD_CARRIERS": "Добавяне на превозвачи", "IMAGE": "Изображение", @@ -265,6 +271,7 @@ "NO_PRODUCTS": "Няма продукти" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "Нещо не е наред, не можете да направите поръчка!", "NEW_PRODUCT_TYPE": "Нов тип продукт", "CREATE_NEW_PRODUCT_TYPE": "Създай нов продукт", "TITLE": "Заглавие", diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/en-US.json b/packages/merchant-tablet-ionic/src/assets/i18n/en-US.json index df80ca434..ca301233f 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/en-US.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/en-US.json @@ -75,7 +75,13 @@ "ADDRESS": "Address", "LOGO": "Logo" }, + "TRACK_ORDER": "Track order", "TRACK_CARRIER": "Track Carrier", + "DELIVERY_TRACKING": "Delivery Tracking", + "CARRIER": "Carrier", + "STORE": "Store", + "DELIVERY_COUNT": "Delivery count:", + "CUSTOMER": "Customer", "CARRIERS": "Carriers", "ADD_CARRIERS": "Add Carriers", "IMAGE": "Image", @@ -265,6 +271,7 @@ "NO_PRODUCTS": "No Products" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "Something is wrong, unable to place order!", "NEW_PRODUCT_TYPE": "New Product Type", "CREATE_NEW_PRODUCT_TYPE": "Create a new product type", "TITLE": "Title", diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/en.json b/packages/merchant-tablet-ionic/src/assets/i18n/en.json index df80ca434..ca301233f 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/en.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/en.json @@ -75,7 +75,13 @@ "ADDRESS": "Address", "LOGO": "Logo" }, + "TRACK_ORDER": "Track order", "TRACK_CARRIER": "Track Carrier", + "DELIVERY_TRACKING": "Delivery Tracking", + "CARRIER": "Carrier", + "STORE": "Store", + "DELIVERY_COUNT": "Delivery count:", + "CUSTOMER": "Customer", "CARRIERS": "Carriers", "ADD_CARRIERS": "Add Carriers", "IMAGE": "Image", @@ -265,6 +271,7 @@ "NO_PRODUCTS": "No Products" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "Something is wrong, unable to place order!", "NEW_PRODUCT_TYPE": "New Product Type", "CREATE_NEW_PRODUCT_TYPE": "Create a new product type", "TITLE": "Title", diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/es-ES.json b/packages/merchant-tablet-ionic/src/assets/i18n/es-ES.json index 52a4b30af..22a8207ec 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/es-ES.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/es-ES.json @@ -76,7 +76,13 @@ "ADDRESS": "Dirección", "LOGO": "Logo" }, + "TRACK_ORDER": "Orden de pista", "TRACK_CARRIER": "Seguimiento del Repartidor", + "DELIVERY_TRACKING": "Seguimiento de entregas", + "CARRIER": "Portador", + "STORE": "Tienda", + "DELIVERY_COUNT": "Recuento de entrega:", + "CUSTOMER": "Cliente", "CARRIERS": "Repartos", "ADD_CARRIERS": "Agregar Reparto", "IMAGE": "Imágen", @@ -268,6 +274,7 @@ "NO_PRODUCTS": "No hay Productos" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "¡Algo está mal, no se puede hacer el pedido!", "NEW_PRODUCT_TYPE": "Nuevo Tipo de Producto", "CREATE_NEW_PRODUCT_TYPE": "Crear Nuevo Tipo de Producto", "TITLE": "Nombre", @@ -326,7 +333,7 @@ "ZIP": "Código Postal", "STREET_ADDRESS": "Calle", "STREET_ADDRESS_IS_REQUIRED": "Calle requerida", - "HOUSE_No": "Número de Puerta", + "HOUSE_№": "Número de Puerta", "APARTMENT": "Apartamento", "SHOW_COORDINATES": "Mostrar Coordenaas", "LATITUDE": "Latitud", diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/he-IL.json b/packages/merchant-tablet-ionic/src/assets/i18n/he-IL.json index 3dc16d03f..c2f353104 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/he-IL.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/he-IL.json @@ -75,7 +75,13 @@ "ADDRESS": "כתובת", "LOGO": "סֵמֶל" }, + "TRACK_ORDER": "עקוב אחר הסדר", "TRACK_CARRIER": "עקוב אחר ספק", + "DELIVERY_TRACKING": "מעקב משלוחים", + "CARRIER": "מנשא", + "STORE": "חנות", + "DELIVERY_COUNT": "ספירת משלוחים", + "CUSTOMER": "צרכן", "CARRIERS": "ספקים", "ADD_CARRIERS": "הוסף ספקים", "IMAGE": "תמונה", @@ -266,6 +272,7 @@ "NO_PRODUCTS": "אין מוצרים" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "משהו לא בסדר, לא מצליח לבצע סדר!", "NEW_PRODUCT_TYPE": "סוג מוצר חדש", "CREATE_NEW_PRODUCT_TYPE": "צור סוג מוצר חדש", "TITLE": "כותרת", diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/he.json b/packages/merchant-tablet-ionic/src/assets/i18n/he.json index 3dc16d03f..c2f353104 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/he.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/he.json @@ -75,7 +75,13 @@ "ADDRESS": "כתובת", "LOGO": "סֵמֶל" }, + "TRACK_ORDER": "עקוב אחר הסדר", "TRACK_CARRIER": "עקוב אחר ספק", + "DELIVERY_TRACKING": "מעקב משלוחים", + "CARRIER": "מנשא", + "STORE": "חנות", + "DELIVERY_COUNT": "ספירת משלוחים", + "CUSTOMER": "צרכן", "CARRIERS": "ספקים", "ADD_CARRIERS": "הוסף ספקים", "IMAGE": "תמונה", @@ -266,6 +272,7 @@ "NO_PRODUCTS": "אין מוצרים" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "משהו לא בסדר, לא מצליח לבצע סדר!", "NEW_PRODUCT_TYPE": "סוג מוצר חדש", "CREATE_NEW_PRODUCT_TYPE": "צור סוג מוצר חדש", "TITLE": "כותרת", diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/ru-RU.json b/packages/merchant-tablet-ionic/src/assets/i18n/ru-RU.json index da3492fc4..03666d346 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/ru-RU.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/ru-RU.json @@ -75,7 +75,13 @@ "ADDRESS": "Адрес", "LOGO": "Логотип" }, + "TRACK_ORDER": "Отследить заказ", "TRACK_CARRIER": "Отследить перевозчика", + "DELIVERY_TRACKING": "Отслеживание доставки", + "CARRIER": "Перевозчик", + "STORE": "Магазин", + "DELIVERY_COUNT": "Количество доставки:", + "CUSTOMER": "Клиент", "CARRIERS": "Носители", "ADD_CARRIERS": "Добавить носители", "IMAGE": "Образ", @@ -266,6 +272,7 @@ "NO_PRODUCTS": "Нет продуктов" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "Что-то не так, не в состоянии разместить заказ!", "NEW_PRODUCT_TYPE": "Новый тип продукта", "CREATE_NEW_PRODUCT_TYPE": "Создать новый тип продукта", "TITLE": "Заглавие", diff --git a/packages/merchant-tablet-ionic/src/assets/i18n/ru.json b/packages/merchant-tablet-ionic/src/assets/i18n/ru.json index da3492fc4..03666d346 100644 --- a/packages/merchant-tablet-ionic/src/assets/i18n/ru.json +++ b/packages/merchant-tablet-ionic/src/assets/i18n/ru.json @@ -75,7 +75,13 @@ "ADDRESS": "Адрес", "LOGO": "Логотип" }, + "TRACK_ORDER": "Отследить заказ", "TRACK_CARRIER": "Отследить перевозчика", + "DELIVERY_TRACKING": "Отслеживание доставки", + "CARRIER": "Перевозчик", + "STORE": "Магазин", + "DELIVERY_COUNT": "Количество доставки:", + "CUSTOMER": "Клиент", "CARRIERS": "Носители", "ADD_CARRIERS": "Добавить носители", "IMAGE": "Образ", @@ -266,6 +272,7 @@ "NO_PRODUCTS": "Нет продуктов" }, "CREATE_PRODUCTS_POPUP": { + "ERROR_MSG": "Что-то не так, не в состоянии разместить заказ!", "NEW_PRODUCT_TYPE": "Новый тип продукта", "CREATE_NEW_PRODUCT_TYPE": "Создать новый тип продукта", "TITLE": "Заглавие", diff --git a/packages/merchant-tablet-ionic/src/components/order-map-popup/order-map-popup.html b/packages/merchant-tablet-ionic/src/components/order-map-popup/order-map-popup.html index 1cbe61e4e..2a16e6ae2 100644 --- a/packages/merchant-tablet-ionic/src/components/order-map-popup/order-map-popup.html +++ b/packages/merchant-tablet-ionic/src/components/order-map-popup/order-map-popup.html @@ -1,6 +1,8 @@

- Track order + {{ "CARRIERS_VIEW.TRACK_ORDER" | translate }} @@ -9,7 +11,7 @@

- Shop - + {{ "CARRIERS_VIEW.STORE" | translate }} - {{ getfullAddress(warehouse.geoLocation) }} @@ -18,7 +20,7 @@

- Customer - + {{ "CARRIERS_VIEW.CUSTOMER" | translate }} - {{ getfullAddress(order.user.geoLocation) }} @@ -30,7 +32,7 @@

*ngIf="carrierIcon" src="{{ carrierIcon }}" alt="" - /> Carrier - + /> {{ "CARRIERS_VIEW.CARRIER" | translate }} - {{ getfullAddress(order.carrier.geoLocation) }} diff --git a/packages/merchant-tablet-ionic/src/components/order/make-order/make-order.component.ts b/packages/merchant-tablet-ionic/src/components/order/make-order/make-order.component.ts index 38b5a0ff3..b87edba69 100644 --- a/packages/merchant-tablet-ionic/src/components/order/make-order/make-order.component.ts +++ b/packages/merchant-tablet-ionic/src/components/order/make-order/make-order.component.ts @@ -38,6 +38,7 @@ export class MakeOrderComponent implements OnInit, OnDestroy { settingsSmartTable: any; sourceSmartTable = new LocalDataSource(); + errorMsg: string = 'WAREHOUSE_VIEW.CREATE_PRODUCTS_POPUP.ERROR_MSG'; private _orderProducts: IOrderCreateInputProduct[] = []; @@ -86,9 +87,7 @@ export class MakeOrderComponent implements OnInit, OnDestroy { this.orderFinishedEmitter.emit(); }, () => { - this._showNotification( - 'Something is wrong, unable to place order!' - ); + this._showNotification(this.errorMsg); } ); } @@ -105,7 +104,7 @@ export class MakeOrderComponent implements OnInit, OnDestroy { private async _showNotification(message: string) { const alert = await this._alertController.create({ - message, + message: this._translateService.instant(message), buttons: ['OK'], }); await alert.present(); diff --git a/packages/merchant-tablet-ionic/src/components/order/select-add-customer.component.ts b/packages/merchant-tablet-ionic/src/components/order/select-add-customer.component.ts index 0880296c0..90d4cee8a 100644 --- a/packages/merchant-tablet-ionic/src/components/order/select-add-customer.component.ts +++ b/packages/merchant-tablet-ionic/src/components/order/select-add-customer.component.ts @@ -24,6 +24,8 @@ import { TranslateService } from '@ngx-translate/core';
@@ -33,6 +35,8 @@ import { TranslateService } from '@ngx-translate/core'; export class SelectAddCustomerComponent implements OnInit { private ngDestroy$ = new Subject(); + visible: boolean; + @Input() customerOptionSelected: number; @@ -63,6 +67,10 @@ export class SelectAddCustomerComponent implements OnInit { this.broadcastCustomerId(ev.data.id); } + changeState(ev): void { + this.visible = ev; + } + broadcastCustomerId(customerId: string) { this.customerIdEmitter.emit(customerId); } diff --git a/packages/merchant-tablet-ionic/src/pages/+carriers/carrier-track-popup/carrier-track-popup.html b/packages/merchant-tablet-ionic/src/pages/+carriers/carrier-track-popup/carrier-track-popup.html index a92b51abd..88af2f047 100644 --- a/packages/merchant-tablet-ionic/src/pages/+carriers/carrier-track-popup/carrier-track-popup.html +++ b/packages/merchant-tablet-ionic/src/pages/+carriers/carrier-track-popup/carrier-track-popup.html @@ -1,12 +1,12 @@