From b1d3e1a72e76215985276bfb343e5a53ee596a4a Mon Sep 17 00:00:00 2001 From: Mustafa Mat Date: Tue, 24 Oct 2023 20:16:54 +0200 Subject: [PATCH] Updated structures and locales --- _templates/product.json | 34 ++++++++++- _templates/shipment.json | 19 +++--- pwa/package.json | 2 +- .../app/pages/collection/collection.page.html | 32 +++++----- .../app/pages/collection/collection.page.ts | 22 ++++--- pwa/src/app/pages/crud/crud.page.html | 61 +++++++++---------- pwa/src/app/pages/crud/crud.page.ts | 7 ++- pwa/src/assets/css/shared.scss | 1 + pwa/src/assets/i18n/de.json | 11 ++++ pwa/src/assets/i18n/tr.json | 11 ++++ 10 files changed, 127 insertions(+), 73 deletions(-) diff --git a/_templates/product.json b/_templates/product.json index 8c497dbf..b99cdfec 100644 --- a/_templates/product.json +++ b/_templates/product.json @@ -67,6 +67,14 @@ "XSP", "OTH" ] + }, + "prd_cpu": { + "bsonType": "string", + "title": "CPU", + "description": "CPU", + "minLength": 0, + "maxLength": 16, + "pattern": "^[A-Za-z0-9]{0,16}$" } }, "required": ["prd_no", "prd_description", "prd_group"], @@ -76,10 +84,32 @@ "_modified_at": -1 }, "parents": [], - "actions": [], + "actions": [ + { + "id": "cpu", + "title": "CPU Assign", + "enabled": true, + "match": [], + "set": [ + { + "key": "prd_cpu", + "value": null + } + ], + "one_click": true, + "icon": "hardware-chip-sharp", + "uniqueness": false, + "unique": [], + "_tags": ["#Managers", "#Administrators", "#Technoplatz"] + } + ], "links": [], "triggers": [], "views": {}, "fetchers": [], - "import": {} + "import": { + "enabled": true, + "upsertable": true, + "upsertables": ["prd_cpu"] + } } diff --git a/_templates/shipment.json b/_templates/shipment.json index 9bb30181..e7be78da 100644 --- a/_templates/shipment.json +++ b/_templates/shipment.json @@ -15,6 +15,7 @@ "bsonType": "string", "title": "Account No", "description": "Account No", + "placeholder": "Please select an account", "minLength": 10, "maxLength": 11, "pattern": "^[A-Z0-9-]{10,11}$", @@ -23,22 +24,21 @@ "shp_date": { "bsonType": "date", "title": "Ship Date", - "description": "Shipment Date", + "description": "Shipment date", "dateOnly": false }, "shp_carrier_name": { "bsonType": "string", "title": "Carrier Name", "description": "Carrier name or driver name surname", - "placeholder": "Carrier or driver Name", + "placeholder": "Carrier company or driver name", "minLength": 2, "maxLength": 32 }, "shp_carrier_id": { "bsonType": "string", "title": "Carrier Tax/ID No", - "description": "Carrier tax no or driver id", - "placeholder": "Carrier Tax/Id No", + "description": "Carrier tax no or driver ID", "minLength": 10, "maxLength": 12, "pattern": "^[0-9]{10,12}$" @@ -47,7 +47,6 @@ "bsonType": "string", "title": "Vehicle Plate", "description": "Vehicle plate number", - "placeholder": "Vehicle plate number", "minLength": 6, "maxLength": 16, "pattern": "^[A-Za-z0-9 ]{6,16}$", @@ -56,8 +55,7 @@ "shp_notes": { "bsonType": "string", "title": "Shipment Notes", - "description": "Shipment notes to carrier or customer", - "placeholder": "Shipment Notes", + "description": "Shipment notes", "minLength": 0, "maxLength": 512 }, @@ -65,7 +63,7 @@ "bsonType": "string", "title": "Waybill No", "description": "Waybill serial number", - "placeholder": "Waybill No", + "placeholder": "Automatically assigned", "pattern": "^[A-Z0-9-]{16,18}$", "minLength": 0, "maxLength": 18, @@ -74,14 +72,15 @@ "shp_wayb_date": { "bsonType": "date", "title": "Waybill Date", - "description": "Waybill generated date", + "description": "Waybill issue date", + "placeholder": "Automatically assigned", "readonly": true }, "shp_wayb_ettn": { "bsonType": "string", "title": "Waybill ETTN", "description": "Waybill ETTN", - "placeholder": "ETTN", + "placeholder": "Automatically assigned", "pattern": "^[a-z0-9-]{32,40}$", "minLength": 32, "maxLength": 40, diff --git a/pwa/package.json b/pwa/package.json index b75100af..e049f380 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "technoplatz-bi-pwa", - "version": "4.6.1", + "version": "4.6.2", "author": "Mustafa Mat, Technoplatz IT Solutions GmbH", "homepage": "https://bi.technoplatz.com", "scripts": { diff --git a/pwa/src/app/pages/collection/collection.page.html b/pwa/src/app/pages/collection/collection.page.html index 31d817ea..c128173e 100644 --- a/pwa/src/app/pages/collection/collection.page.html +++ b/pwa/src/app/pages/collection/collection.page.html @@ -181,46 +181,46 @@

{{ subheader | titlecase | translate }} 


+ (click)="set_search_item(item.key, 'contains')"> {{ 'in' | translate }} + (click)="set_search_item(item.key, 'eq')"> = + (click)="set_search_item(item.key, 'ne')"> ≠ + (click)="set_search_item(item.key, 'gte')"> ≥ + (click)="set_search_item(item.key, 'lte')"> ≤ + (click)="set_search_item(item.key, 'null')"> ◻ + (click)="set_search_item(item.key, 'nnull')"> ◼
+ (click)="set_search_item(item.key, 'true')"> {{ 'True' | translate }} + (click)="set_search_item(item.key, 'false')"> {{ 'False' | translate }}
- @@ -238,27 +238,27 @@

{{ subheader | titlecase | translate }} 

{{ 'Approved' | translate }}
- {{ '_approved' }} + {{'_approved'}} {{ 'Created At' | translate }}
- {{ '_created_at' }} + {{'_created_at'}} {{ 'Created By' | translate }}
- {{ '_created_by' }} + {{'_created_by'}} {{ 'Modified At' | translate }}
- {{ '_modified_at' }} + {{'_modified_at'}} {{ 'Modified By' | translate }}
- {{ '_modified_by' }} + {{'_modified_by'}} {{ 'Record ID' | translate }}
- {{ '_id' }} + {{'_id'}} { this.flashcards_ = res ? res.filter((obj: any) => obj.collection === this.id && obj.view.flashcard === true) : []; @@ -369,11 +371,13 @@ export class CollectionPage implements OnInit { this.refresh_data(0); } - set_search(k: string) { - this.searched[k].setmode = false; - let i = 0; + set_search(k_: string) { + setTimeout(() => { + this.searchfocus?.setFocus(); + }, 1000); + this.searched[k_].setmode = false; for (let key_ in this.structure_.properties) { - this.searched[key_].actived = k === key_ ? true : false; + this.searched[key_].actived = k_ === key_ ? true : false; } } @@ -484,8 +488,8 @@ export class CollectionPage implements OnInit { } } - set_searchItemOp(k: string, op: string) { - this.searched[k].op = op; + set_search_item(key_: string, op: string) { + this.searched[key_].op = op; } json_editor_init() { diff --git a/pwa/src/app/pages/crud/crud.page.html b/pwa/src/app/pages/crud/crud.page.html index 26489468..180519f9 100644 --- a/pwa/src/app/pages/crud/crud.page.html +++ b/pwa/src/app/pages/crud/crud.page.html @@ -64,8 +64,7 @@ {{ 'Cancel' | translate }} - + {{ 'Delete' | translate }}  @@ -142,25 +141,23 @@
-
{{ 'Link to' | translate }} {{ link_?.collection }} {{ 'collection' | translate }}
- - + + {{ 'Running' | translate }}... - {{ link_?.get }} + {{ 'Get Automatically' | translate }} +
- - {{ 'Items to be linked' | translate }}: - + {{ 'Get automatically, enter manually or Paste' | translate + }}. + autofocus="true" maxlength="512" counterFormatter="customCounterFormatter" [(ngModel)]="link_text">
- {{ 'The maximum number of' | translate }} {{ link_?.get }} {{ 'allowed is 100' }}. + {{ 'The maximum number of lines allowed is' | translate }} {{ link_limit_ }}.
@@ -170,9 +167,6 @@
{{ 'Please click RUN button' | translate }}.
  • {{ 'Please enter the required fields' | translate }} - - -
  • @@ -185,10 +179,10 @@
    {{ 'Please click RUN button' | translate }}.
    class="ion-no-padding ion-margin-bottom crud-form-list" [class]="visible">
    - - {{ item.btntext ? item.btntext : - item.collection | translate }} + + {{ translate.instant(item.btntext ? item.btntext : + item.collection) }} 
    @@ -199,7 +193,7 @@
    {{ 'Please click RUN button' | translate }}.
    field.parents.collection | translate }} - {{ field.title | translate }} + {{ field.title | translate }}: @@ -215,7 +209,7 @@
    {{ 'Please click RUN button' | translate }}.
    {{ 'Please click RUN button' | translate }}. [disabled]="field.disabled" [readonly]="field.readonly" auto-grow="true" [maxlength]="field.maxLength" [minlength]="field.minLength" autocorrect="off" - [placeholder]="field.placeholder ? field.placeholder : field.description ? field.description : ''" + [placeholder]="(field.placeholder ? field.placeholder : field.description ? field.description : '') | translate" [formControlName]="field.name" [name]="field.name" [id]="field.name" [required]="field.required" spellcheck="false" debounce="500"> @@ -241,7 +235,7 @@
    {{ 'Please click RUN button' | translate }}.
    {{ 'Please click RUN button' | translate }}.
    + [placeholder]="field.placeholder ? field.placeholder : field.description ? field.description : '' | translate">
    @@ -272,7 +266,7 @@
    {{ 'Please click RUN button' | translate }}.
    + [disabled]="field?.readonly || field?.disabled"> @@ -294,7 +288,8 @@
    {{ 'Please click RUN button' | translate }}.
    + class="ion-no-padding datetime-button-nov" + [disabled]="field?.readonly || field?.disabled"> @@ -302,7 +297,7 @@
    {{ 'Please click RUN button' | translate }}.
    {{ 'Please click RUN button' | translate }}. {{ 'Please click RUN button' | translate }}. - {{ 'ID' }} + {{ 'ID' | translate }}: - {{ 'Created At' }} + {{ 'Created At' | translate }}: - {{ 'Created By' | translate }} + {{ 'Created By' | translate }}: - {{ 'Modified At' }} + {{ 'Modified At' | translate }}: - {{ 'Modified By' | translate }} + {{ 'Modified By' | translate }}: diff --git a/pwa/src/app/pages/crud/crud.page.ts b/pwa/src/app/pages/crud/crud.page.ts index 59799c48..e33a4fc8 100644 --- a/pwa/src/app/pages/crud/crud.page.ts +++ b/pwa/src/app/pages/crud/crud.page.ts @@ -33,6 +33,7 @@ https://www.gnu.org/licenses. import { Component, OnInit, HostListener, Input, ViewChild } from "@angular/core"; import { UntypedFormBuilder, UntypedFormGroup } from "@angular/forms"; import { AlertController } from "@ionic/angular"; +import { TranslateService } from "@ngx-translate/core"; import { Storage } from "@ionic/storage"; import { Miscellaneous } from "../../classes/misc"; import { Crud } from "./../../classes/crud"; @@ -98,6 +99,7 @@ export class CrudPage implements OnInit { public linked_: any = []; public date_format: string = "DD.MM.YYYY HH:mm"; public locale_: string = "en-US"; + public link_limit_: number = 100; private counters: any = {}; private filter: any = []; private actions: any = []; @@ -132,7 +134,8 @@ export class CrudPage implements OnInit { public misc: Miscellaneous, private storage: Storage, private crud: Crud, - private alert: AlertController + private alert: AlertController, + public translate: TranslateService ) { this.crudForm = this.formBuilder.group({}, {}); this.misc.localization.subscribe((l_: any) => { @@ -494,7 +497,7 @@ export class CrudPage implements OnInit { sort: this.link_projection_, group: true, page: 1, - limit: 100 + limit: this.link_limit_ }).then((res: any) => { const data_ = res.data; if (data_) { diff --git a/pwa/src/assets/css/shared.scss b/pwa/src/assets/css/shared.scss index 3c79027b..f0010910 100644 --- a/pwa/src/assets/css/shared.scss +++ b/pwa/src/assets/css/shared.scss @@ -572,6 +572,7 @@ ion-note { form ion-item ion-label { color: var(--ion-color-primary) !important; + font-weight: 600; } .saas-company { diff --git a/pwa/src/assets/i18n/de.json b/pwa/src/assets/i18n/de.json index a05ac645..4c8160ef 100644 --- a/pwa/src/assets/i18n/de.json +++ b/pwa/src/assets/i18n/de.json @@ -25,6 +25,7 @@ "Approve": "Konfirmierung", "Arrived at Customs": "Angekommen beim Zoll", "Attached DNs": "Angehängte DNs", + "Automatically assigned": "Automatisch zugewiesen", "Back": "Zurück", "Back-To List": "Zurück zur-Liste", "Backups": "Backups", @@ -32,9 +33,13 @@ "Business E-mail": "Geschäfts-E-Mail", "By creating an account, you accept the terms and conditions": "Mit der Einrichtung eines Kontos akzeptieren Sie die Bedingungen und Konditionen", "COLLECTIONS": "DATENSAMMLUNGEN", + "CPU Assign": "CPU-Zuweisung", "Cancel": "Abbrechen", "Carrier Name": "Name des Transportunternehmens", "Carrier Tax/ID No": "Spediteur Steuer/ID-Nr.", + "Carrier Tax/ID number": "Spediteur Steuer/ID-Nr.", + "Carrier company or driver name": "Name des Transportunternehmens oder des Fahrers", + "Carrier tax no or driver ID": "Steuer/ID-Nr. des Transportunternehmens oder des Fahrers", "Chart": "Diagramm", "Charts": "Diagramm", "China": "China", @@ -80,6 +85,8 @@ "Firewall": "Firewall", "Flashcards": "Flashcards", "Generate": "Erzeugen", + "Get Automatically": "Automatisch erhalten", + "Get automatically, enter manually or Paste": "Automatisch holen, manuell eingeben oder einfügen", "Hungary": "Ungarn", "INVALID": "UNGÜLTIG", "INVALID FORM FIELDS": "UNGÜLTIGE FORMULARFELDER", @@ -127,6 +134,7 @@ "Please Wait": "Bitte warten", "Please click RUN button": "Bitte klicken Sie auf die Schaltfläche RUN", "Please enter the required fields": "Bitte geben Sie die erforderlichen Felder ein", + "Please select an account": "Bitte wählen Sie ein Konto", "Please wait while the data is retrieved": "Bitte warten Sie, während die Daten abgerufen werden", "Powered by": "Leistungsstarke Technologien", "Privacy Policy": "Datenschutzbestimmungen", @@ -170,6 +178,7 @@ "Shipment": "Sendung", "Shipment No": "Sendungsnummer", "Shipment Notes": "Sendungsnotizen", + "Shipment notes": "Sendungsnotizen", "Show": "Anzeigen", "Show All": "Alle anzeigen", "Show QR": "QR-Code anzeigen", @@ -187,6 +196,7 @@ "Test": "Test", "Thank you": "Dankeschön", "The first": "Der erste", + "The maximum number of lines allowed is": "Die maximal zulässige Anzahl von Zeilen beträgt", "Theme": "Thema", "Theme Color": "Themenfarbe", "Title": "Titel", @@ -198,6 +208,7 @@ "User Password": "Benutzerkennwort", "Users": "Benutzer", "Vehicle Plate": "Fahrzeugkennzeichen", + "Vehicle plate number": "Kennzeichen des Fahrzeugs", "Verify": "Überprüfen", "Version": "Version", "Visualization": "Visualisierung", diff --git a/pwa/src/assets/i18n/tr.json b/pwa/src/assets/i18n/tr.json index 5ff258f6..ea31dd17 100644 --- a/pwa/src/assets/i18n/tr.json +++ b/pwa/src/assets/i18n/tr.json @@ -25,6 +25,7 @@ "Approve": "Onayla", "Arrived at Customs": "Gümrüğe Geldi", "Attached DNs": "Ekli DN'ler", + "Automatically assigned": "Otomatik atanır", "Back": "Geri", "Back-To List": "Listeye Dön", "Backups": "Yedekler", @@ -32,9 +33,13 @@ "Business E-mail": "İş E-postası", "By creating an account, you accept the terms and conditions": "Hesap oluşturarak hüküm ve koşulları kabul etmiş olursunuz", "COLLECTIONS": "VERİ KOLEKSİYONLARI", + "CPU Assign": "CPU Ata", "Cancel": "İptal", "Carrier Name": "Taşıyıcı Firma", "Carrier Tax/ID No": "Taşıyıcı Vergi No", + "Carrier Tax/ID number": "Taşıyıcı vergi no", + "Carrier company or driver name": "Taşıyıcı şirket ya da şöför adı", + "Carrier tax no or driver ID": "Taşıyıcı şirket ya da şöför vergi no", "Chart": "Grafik", "Charts": "Grafik", "China": "Çin", @@ -80,6 +85,8 @@ "Firewall": "Güvenlik Duvarı", "Flashcards": "Bilgi Kartı", "Generate": "Oluştur", + "Get Automatically": "Otomatik Getir", + "Get automatically, enter manually or Paste": "Satırları otomatik getirin, elle ekleyin ya da Yapıştırın", "Hungary": "Macaristan", "INVALID": "GEÇERSİZ", "INVALID FORM FIELDS": "GEÇERSİZ FORM ALANLARI", @@ -127,6 +134,7 @@ "Please Wait": "Lütfen Bekleyin", "Please click RUN button": "Lütfen çalıştırma butonuna basın", "Please enter the required fields": "Lütfen gerekli alanları giriniz", + "Please select an account": "Lütfen bir müşteri seçiniz", "Please wait while the data is retrieved": "Veriler alınırken lütfen bekleyin", "Powered By": "Güçlendiren Teknolojiler", "Privacy Policy": "Gizlilik Politikası", @@ -171,6 +179,7 @@ "Shipment": "Sevkiyat", "Shipment No": "Sevk No", "Shipment Notes": "Sevk Notları", + "Shipment notes": "Sevk notları", "Show": "Göster", "Show All": "Tümünü Göster", "Show QR": "QR Kodunu Göster", @@ -188,6 +197,7 @@ "Test": "Test", "Thank you": "Teşekkürler", "The first": "İlk", + "The maximum number of lines allowed is": "İzin verilen max. satır sayısı", "Theme": "Tema", "Theme Color": "Tema Rengi", "Title": "Başlık", @@ -199,6 +209,7 @@ "User Password": "Kullanıcı Şifresi", "Users": "Kullanıcılar", "Vehicle Plate": "Araç Plakası", + "Vehicle plate number": "Araç plakası", "Verify": "Doğrula", "Version": "Versiyon", "Visualization": "Görselleştirme",