diff --git a/src/app/core/services/static-data.service.ts b/src/app/core/services/static-data.service.ts index 292829a..ee8f690 100644 --- a/src/app/core/services/static-data.service.ts +++ b/src/app/core/services/static-data.service.ts @@ -10,11 +10,18 @@ import { GeneralList } from '../interfaces/general-list.interface'; }) export class StaticDataService { + /** + * Site Title + */ siteTitle: string = " - Synergy.gr | Εμπορική Κοινότητα Συνεργατικών"; + public get getSiteTitle(): string { + return this.siteTitle; + }; + /** - * Payments List - */ + * Payments List + */ paymentsList: PaymentList[] = [ { bic: 'ETHNGRAA', @@ -66,6 +73,10 @@ export class StaticDataService { } ]; + public get getPaymentsList(): PaymentList[] { + return this.paymentsList; + }; + /** * Sectors List */ @@ -104,6 +115,10 @@ export class StaticDataService { } ]; + public get getSectorsList(): GeneralList[] { + return this.sectorsList; + }; + /** * Contacts List */ @@ -163,10 +178,20 @@ export class StaticDataService { }, ]; + public get getContactsList(): ContactList[] { + return this.contactsList; + }; + /** - * Form Validators - */ + * Form Validators + */ validators = { + user: { + email: { + minLength: 4, + maxLength: 256 + } + }, contact: { sender: { minLength: 4, @@ -179,26 +204,13 @@ export class StaticDataService { } }; - public get getSiteTitle(): string { - return this.siteTitle; - }; - - public get getPaymentsList(): PaymentList[] { - return this.paymentsList; - }; - - public get getSectorsList(): GeneralList[] { - return this.sectorsList; - }; - - public get getContactsList(): ContactList[] { - return this.contactsList; - }; - public get getValidators() { return this.validators; } + /** + * Carousel Owl Options + */ owlOptions = { loop: true, mouseDrag: true, diff --git a/src/app/views/pages/offer-archive/offer-archive.component.html b/src/app/views/pages/offer-archive/offer-archive.component.html index d601216..4f71a37 100644 --- a/src/app/views/pages/offer-archive/offer-archive.component.html +++ b/src/app/views/pages/offer-archive/offer-archive.component.html @@ -15,15 +15,18 @@

{{ 'PAGE_TITLES.offers-title' | translate }}

+ + + - - - - + - + + - + - - - + \ No newline at end of file diff --git a/src/app/views/pages/offer-archive/offer-archive.component.ts b/src/app/views/pages/offer-archive/offer-archive.component.ts index 0abf383..17f4a6b 100644 --- a/src/app/views/pages/offer-archive/offer-archive.component.ts +++ b/src/app/views/pages/offer-archive/offer-archive.component.ts @@ -1,21 +1,33 @@ import { Component, OnInit, OnDestroy, ChangeDetectorRef, Input } from '@angular/core'; +import { Router } from '@angular/router'; + import { Subject } from 'rxjs'; import { tap, takeUntil, finalize } from 'rxjs/operators'; -import { Router } from '@angular/router'; -import { OpenDataService } from '../../../core/services/open-data.service'; +/** + * Models & Interfaces + */ import { Offer } from '../../../core/models/offer.model'; +/** + * Services + */ +import { OpenDataService } from '../../../core/services/open-data.service'; + @Component({ selector: 'app-offer-archive', templateUrl: './offer-archive.component.html', styleUrls: ['./offer-archive.component.scss'] }) -export class OfferArchiveComponent implements OnInit { +export class OfferArchiveComponent implements OnInit, OnDestroy { + + public offers: Offer[]; + p: number = 1; - loading: boolean = false; + private unsubscribe: Subject; - offers: Offer[]; + loading: boolean = false; + constructor( private cdRef: ChangeDetectorRef, private openDataService: OpenDataService, diff --git a/src/app/views/widgets/support-window/support-window.component.html b/src/app/views/widgets/support-window/support-window.component.html index e0f61e8..46a6c0d 100644 --- a/src/app/views/widgets/support-window/support-window.component.html +++ b/src/app/views/widgets/support-window/support-window.component.html @@ -15,10 +15,10 @@ {{ 'AUTH.VALIDATION.INVALID_FIELD' | translate }} - {{ 'AUTH.VALIDATION.MIN_LENGTH_FIELD' | translate }} 3 + {{ 'AUTH.VALIDATION.MIN_LENGTH_FIELD' | translate }}: {{validator.email.minLength}} - {{ 'AUTH.VALIDATION.MAX_LENGTH_FIELD' | translate }} 320 + {{ 'AUTH.VALIDATION.MAX_LENGTH_FIELD' | translate }}: {{validator.email.maxLength}} diff --git a/src/app/views/widgets/support-window/support-window.component.ts b/src/app/views/widgets/support-window/support-window.component.ts index 4a28be9..24fa144 100644 --- a/src/app/views/widgets/support-window/support-window.component.ts +++ b/src/app/views/widgets/support-window/support-window.component.ts @@ -46,6 +46,8 @@ export class SupportWindowComponent { campaign_id: string; registrationForm: FormGroup; supportingForm: FormGroup; + validator: any; + private routeSubscription: any; loading: boolean = false; private unsubscribe: Subject; @@ -59,6 +61,7 @@ export class SupportWindowComponent { private openDataService: OpenDataService, private staticDataService: StaticDataService, ) { + this.validator = this.staticDataService.getValidators.user; this.paymentsList = this.staticDataService.getPaymentsList; this.unsubscribe = new Subject(); } @@ -94,8 +97,8 @@ export class SupportWindowComponent { email: ['', Validators.compose([ Validators.required, Validators.email, - Validators.minLength(3), - Validators.maxLength(320) + Validators.minLength(this.validator.email.minLength), + Validators.maxLength(this.validator.email.maxLength) ]) ], }); diff --git a/src/environments/environment.ts b/src/environments/environment.ts index d24a09f..38922da 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,8 +4,8 @@ export const environment = { production: false, - apiUrl: 'http://localhost:3000', - // apiUrl: 'https://api.synergatika.gr', + // apiUrl: 'http://localhost:3000', + apiUrl: 'https://api.synergatika.gr', // apiUrl: 'http://192.168.1.160:3000', // apiUrl: 'http://192.168.1.9:3000', appUrl: 'https://app.synergatika.gr',