\n\n\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { TranslateService } from '@ngx-translate/core';\nimport { AppLoaderService } from '../../../../common/app-loader/app-loader.service';\n\n@Component({\n selector: 'app-visa-info-dialog',\n templateUrl: './visa-info-dialog.component.html',\n styleUrls: ['./visa-info-dialog.component.scss']\n})\nexport class VisaInfoDialogComponent implements OnInit {\n public SelectedLanguage: string = \"en\";\n\n constructor(@Inject(MAT_DIALOG_DATA) public data: any,\n\n public dialogRef: MatDialogRef, public translate: TranslateService, private loader: AppLoaderService\n ) {\n if (this.translate.currentLang != undefined) {\n\n this.SelectedLanguage = this.translate.currentLang;\n }\n }\n\n ngOnInit() {\n this.buildItemForm(this.data.id, this.data.code)\n }\n\n public details: string = \"\";\n private datas3: any;\n\n buildItemForm(visaTypeId: number, code: string) {\n if (this.SelectedLanguage == \"en\") {\n this.details = this.data.detailsEn;\n }\n else {\n this.details = this.data.detailsAr;\n\n\n }\n\n\n }\n\n}\n","
{{\"Info.\" | translate }}
\n\n
\n \n
\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { AppLoaderService } from '../../../../common/app-loader/app-loader.service';\r\n\n@Component({\n selector: 'app-info-dialog',\n templateUrl: './info-dialog.component.html',\n styleUrls: ['./info-dialog.component.scss']\n})\nexport class InfoDialogComponent implements OnInit {\n public SelectedLanguage: string = \"en\";\n\n constructor(@Inject(MAT_DIALOG_DATA) public data: any,\n \n public dialogRef: MatDialogRef, public translate: TranslateService, private loader: AppLoaderService\n ) {\n if (this.translate.currentLang != undefined) {\n\n this.SelectedLanguage = this.translate.currentLang;\n }\n }\n\n ngOnInit() {\n this.buildItemForm(this.data.id, this.data.code)\n }\n\n public details: string = \"\";\n private datas3: any;\n\n buildItemForm(visaTypeId: number, code: string) {\n if (this.SelectedLanguage == \"en\") {\n this.details = \"Please specify your arrival point of entry to this destination (airport, port, or border name) or otherwise write not specified if it is not.\";\n }\n else {\n this.details =\"يرجي تحديد نقطة الدخول لهذه الوجهة (المطار أو الميناء أو الحدود البرية) أو يرجى كتابة '' غير محدد'' في حالة عدم وجود نقطة محددة للدخول.\";\n\n\n }\n\n\n }\n\n}\n","
{{\"Info.\" | translate }}
\n\n
\n \n
\n","import { Component, OnInit } from '@angular/core';\r\nimport { NgForm, UntypedFormControl } from '@angular/forms';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { ReplaySubject, Subject } from 'rxjs';\r\nimport { take, takeUntil } from 'rxjs/operators';\r\nimport { DatePipe, formatDate } from '@angular/common';\r\n\r\nimport { JobCategory } from '../../../appshared/masters/job-category/job-category.module';\r\nimport { JobCategoryService } from '../../../appshared/masters/job-category/job-category.service';\r\nimport { VisaTypeModule } from '../../../appshared/visa/visa-type/visa-type.module';\r\nimport { VisaTypeService } from '../../../appshared/visa/visa-type/visa-type.service';\r\nimport { FailedDialogComponent } from '../step1-visa-type/failed-dialog/failed-dialog.component';\r\nimport { VisaCountryService } from '../../../appshared/visa/visa-country/visa-country.service';\r\nimport { VisaCountry, VisaCountryModule } from '../../../appshared/visa/visa-country/visa-country.module';\r\nimport { AppLoaderService } from '../../../common/app-loader/app-loader.service';\r\nimport { SavedOrderService } from '../../../appshared/tools/saved-order/saved-order.service';\r\nimport { InputInfoDialogComponent } from '../step3-personal-details/input-info-dialog/input-info-dialog.component';\r\nimport { InfoDialogComponent } from './info-dialog/info-dialog.component';\r\n\r\n@Component({\r\n selector: 'app-step2-basic-details',\r\n templateUrl: './step2-basic-details.component.html',\r\n styleUrls: ['./step2-basic-details.component.scss'],\r\n providers: [DatePipe]\r\n})\r\nexport class Step2BasicDetailsComponent implements OnInit {\r\n\r\n constructor(public dialog: MatDialog, private serv: VisaTypeService, private router: Router, private route: ActivatedRoute, public translate: TranslateService, private servJobCategory: JobCategoryService, private toastr: ToastrService, private datePipe: DatePipe, public servVisaCountry: VisaCountryService, private loader: AppLoaderService, private ServSavedOrder: SavedOrderService) {\r\n if (this.translate.currentLang != undefined) {\r\n\r\n this.SelectedLanguage = this.translate.currentLang;\r\n }\r\n }\r\n\r\n public dataSource = new MatTableDataSource();\r\n\r\n public SelectedLanguage: string = \"en\";\r\n public SelectedCurrID: number = 1;\r\n private sub: any;\r\n vtid: number = 0;\r\n nid: number = 0;\r\n vid: number = 0;\r\n rid: number = 0;\r\n dates: string = \"\";\r\n\r\n dialingCode: string = \"+968\";\r\n countryName: string = \"\";\r\n stayDays: string = \"\";\r\n fromDate = new Date();\r\n toDate = new Date();\r\n\r\n\r\n warningMessage: string = \"\";\r\n warningAgeMessage: string = \"\";\r\n warningGenderMessage: string = \"\";\r\n\r\n isJob: boolean = false;\r\n data: any = {};\r\n\r\n protected _onDestroy = new Subject();\r\n\r\n ngOnInit(): void {\r\n this.sub = this.route.params.subscribe(params => {\r\n this.vtid = +params['vtid'];\r\n this.nid = +params['nid'];\r\n this.vid = +params['vid'];\r\n this.rid = +params['rid'];\r\n this.dates = params['date'];\r\n this.FillVisaTypes();\r\n this.CheckAgeWarnings();\r\n this.CheckGenderWarnings();\r\n });\r\n\r\n this.jobCategoryFilterCtrl.valueChanges\r\n .pipe(takeUntil(this._onDestroy))\r\n .subscribe(() => {\r\n this.filterjobCategories();\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n this._onDestroy.next();\r\n this._onDestroy.complete();\r\n }\r\n\r\n private datas: any;\r\n FillVisaTypes() {\r\n\r\n this.loader.open();\r\n this.serv.getServiceId(this.vtid)\r\n .subscribe(res => {\r\n this.datas = res as VisaTypeModule[];\r\n\r\n\r\n\r\n this.serv.formData.visaTypeID = this.datas.visaTypeID;\r\n this.serv.formData.nameAr = this.datas.nameAr;\r\n this.serv.formData.nameEn = this.datas.nameEn;\r\n this.serv.formData.notes = this.datas.notes;\r\n this.serv.formData.isVisible = this.datas.isVisible;\r\n this.serv.formData.visaCountryID = this.datas.visaCountryID;\r\n this.serv.formData.isJob = this.datas.isJob;\r\n this.serv.formData.orderPeriod = this.datas.orderPeriod;\r\n this.isJob = this.datas.isJob;\r\n\r\n\r\n this.serv.formData.visaPeriod = this.datas.visaPeriod;\r\n this.serv.formData.visaValidPeriod = this.datas.visaValidPeriod;\r\n\r\n this.stayDays = this.serv.formData.visaPeriod.toString();\r\n\r\n\r\n\r\n const [day, month, year] = this.dates.split('/');\r\n\r\n this.fromDate = new Date(+year, +month - 1, +day);\r\n this.toDate = new Date(this.fromDate.getFullYear(), this.fromDate.getMonth(), this.fromDate.getDate())\r\n \r\n var perd = (this.serv.formData.visaValidPeriod - 1);\r\n this.toDate.setDate(this.toDate.getDate() + perd);\r\n \r\n if (this.SelectedLanguage == \"en\") {\r\n this.warningMessage = \"Your Visa valid from \" + this.datePipe.transform(this.fromDate, 'dd/MM/yyyy') + \" to \" + this.datePipe.transform(this.toDate, 'dd/MM/yyyy') + \". Your stay cannot exceed \" + this.stayDays + \" days.\";\r\n }\r\n else {\r\n this.warningMessage = \"صلاحية التأشيرة من تاريخ \" + this.datePipe.transform(this.fromDate, 'dd/MM/yyyy') + \" إلى تاريخ \" + this.datePipe.transform(this.toDate, 'dd/MM/yyyy') + \". مدة الإقامة لا تتجاز\" + this.stayDays + \" يوم. \";\r\n }\r\n\r\n this.getVisaCountry(this.serv.formData.visaCountryID);\r\n\r\n //if (this.SelectedLanguage == \"en\") {\r\n // this.warningMessage = \"Your Visa valid from \" + formatDate(Date.now(),'dd/MM/yyyy',) + \" to \" + this.datepipe.transform(this.toDate, 'dd/MM/yyyy') +\". Your stay cannot exceed 90 days.\";\r\n //}\r\n //else {\r\n // this.warningMessage = \"صلاحية التأشيرة من تاريخ \" + this.datepipe.transform(this.fromDate, 'dd/MM/yyyy') + \" إلى تاريخ \" + this.datepipe.transform(this.toDate, 'dd/MM/yyyy') + \". مدة الإقامة هي\" + this.stayDays + \" يوم. \";\r\n //}\r\n\r\n\r\n if (this.serv.formData.isJob) {\r\n this.getAlljobCategory();\r\n }\r\n this.loader.close();\r\n },\r\n err => {\r\n this.loader.close(); console.log(err);\r\n });\r\n }\r\n\r\n private CheckAgeWarnings() {\r\n this.serv.getCheckAgeWarnings(this.vtid, this.nid, this.SelectedLanguage)\r\n .subscribe(res => {\r\n this.warningAgeMessage = res;\r\n\r\n },\r\n err => {\r\n });\r\n }\r\n\r\n private CheckGenderWarnings() {\r\n this.serv.getCheckGenderWarnings(this.vtid, this.nid, this.SelectedLanguage)\r\n .subscribe(res => {\r\n this.warningGenderMessage = res;\r\n\r\n },\r\n err => {\r\n });\r\n }\r\n\r\n\r\n // *******************************************************************************************************************************************\r\n\r\n public jobCategories: JobCategory[];\r\n\r\n\r\n\r\n public jobCategoryCtrl: UntypedFormControl = new UntypedFormControl();\r\n public jobCategoryFilterCtrl: UntypedFormControl = new UntypedFormControl();\r\n public filteredJobCategories: ReplaySubject = new ReplaySubject(1);\r\n\r\n protected filterjobCategories() {\r\n if (!this.jobCategories) {\r\n return;\r\n }\r\n // get the search keyword\r\n let search = this.jobCategoryFilterCtrl.value;\r\n if (!search) {\r\n this.filteredJobCategories.next(this.jobCategories.slice());\r\n return;\r\n } else {\r\n search = search.toLowerCase();\r\n }\r\n // filter the nobCategories\r\n this.filteredJobCategories.next(\r\n this.jobCategories.filter(JobCategory => JobCategory.nameEn.toLowerCase().indexOf(search) > -1)\r\n );\r\n }\r\n\r\n\r\n public getAlljobCategory = () => {\r\n\r\n this.servJobCategory.getService()\r\n .subscribe(res => {\r\n //this.nobCategories = res as jobCategoryModule[];\r\n this.jobCategories = res as JobCategory[];\r\n\r\n this.filteredJobCategories.next(this.jobCategories.slice());\r\n\r\n })\r\n }\r\n\r\n\r\n private datas2: any;\r\n getVisaCountry(countryID: number) {\r\n\r\n this.servVisaCountry.getServiceId(countryID)\r\n .subscribe(res => {\r\n this.datas2 = res as VisaCountryModule[];\r\n if (this.SelectedLanguage == \"en\") {\r\n this.countryName = this.datas2.nameEn;\r\n }\r\n else {\r\n this.countryName = this.datas2.nameAr;\r\n }\r\n \r\n })\r\n\r\n // this.countryName\r\n }\r\n\r\n // *******************************************************************************************************************************************\r\n\r\n checkMessage: string = \"\";\r\n onClick(jobCategorySelect, email, confirmEmail, arrivalPort, phoneNo, applicantRequesterName, dialing) {\r\n\r\n\r\n this.scrollToTop();\r\n\r\n if (email == \"\" || confirmEmail == \"\" || arrivalPort == \"\" || phoneNo == \"\" || applicantRequesterName == \"\" || (this.serv.formData.isJob && jobCategorySelect == \"\")) {\r\n this.toastr.error('Please Fill All Data', '');\r\n return;\r\n }\r\n if (!this.validateEmail(email)) {\r\n return;\r\n }\r\n if (email != confirmEmail) {\r\n this.toastr.error('Your Email not matching', '');\r\n return;\r\n }\r\n if (jobCategorySelect == \"\") {\r\n jobCategorySelect = \"0\";\r\n }\r\n\r\n this.loader.open();\r\n this.serv.getInsertOrder(this.vtid, this.vid, this.nid, this.rid, this.dates, this.SelectedLanguage, this.SelectedCurrID, email, arrivalPort, phoneNo, applicantRequesterName, '+' + this.Dialing)\r\n .subscribe(res => {\r\n this.checkMessage = res;\r\n \r\n if (this.isNumeric(this.checkMessage)) {\r\n \r\n\r\n this.toastr.success('Saved Successfully', '');\r\n\r\n\r\n\r\n this.ServSavedOrder.setNewOrder(this.vtid, this.nid, this.vid, this.rid, +this.checkMessage, email, this.dates ,0,'Draft');\r\n\r\n\r\n this.router.navigate(['step3', { vtid: this.vtid, nid: this.nid, rid: this.rid, date: this.dates, vid: this.vid, oid: this.checkMessage, email: email }]);\r\n }\r\n else {\r\n\r\n\r\n let title = 'create';\r\n let dialogRef: MatDialogRef = this.dialog.open(FailedDialogComponent, {\r\n width: '720px',\r\n disableClose: true,\r\n data: { title: title, payload: this.data, messageTXT: this.checkMessage }\r\n })\r\n dialogRef.afterClosed()\r\n .subscribe(res => {\r\n if (!res) {\r\n return;\r\n }\r\n\r\n this.router.navigate(['home']);\r\n\r\n })\r\n }\r\n\r\n this.loader.close();\r\n },\r\n err => {\r\n this.loader.close(); console.log(err);\r\n });\r\n }\r\n isNumeric(value) {\r\n return /^\\d+$/.test(value);\r\n}\r\n\r\n\r\n validateEmail(email) {\r\n var emailTest = true;\r\n if (email != '') {\r\n const re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n console.log(re.test(String(email).toLowerCase()))\r\n emailTest = re.test(String(email).toLowerCase())\r\n if (emailTest != true) {\r\n this.toastr.warning(\"Please enter valid email\")\r\n \r\n }\r\n\r\n }\r\n return emailTest;\r\n }\r\n\r\n scrollToTop() {\r\n window.scroll(0, 0);\r\n document.body.scrollTop = 0;\r\n }\r\n\r\n\r\n viewDialog(stringValue) {\r\n\r\n let title = 'create';\r\n let dialogRef: MatDialogRef = this.dialog.open(InfoDialogComponent, {\r\n width: '720px',\r\n disableClose: true,\r\n data: { title: title, id: this.vid, code: stringValue }\r\n })\r\n dialogRef.afterClosed()\r\n .subscribe(res => {\r\n if (!res) {\r\n return;\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n //////////////////////////////////////////////////////////////////////////\r\n\r\n Dialing: string = \"968\";\r\n telOptions = { initialCountry: 'om', preferredCountries: ['om'] };\r\n phone_number_standard = '';\r\n onCountryChange(event) {\r\n this.Dialing = event.dialCode;\r\n }\r\n\r\n\r\n}\r\n\r\n\r\n","\n\n\n
“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.”
\r\n\r\n
\r\n
James Anderson
\r\n Switzerland\r\n \r\n
\r\n
\r\n\r\n
\r\n
“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.”
\r\n\r\n
\r\n
Lina D'Souza
\r\n Iceland\r\n \r\n
\r\n
\r\n\r\n
\r\n
“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.”
\r\n\r\n
\r\n
David Warner
\r\n Antarctica\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { OrderService } from '../../appshared/orders/order/order.service';\r\n\r\n@Component({\r\n selector: 'app-funfacts',\r\n templateUrl: './funfacts.component.html',\r\n styleUrls: ['./funfacts.component.scss']\r\n})\r\nexport class FunfactsComponent implements OnInit {\r\n\r\n constructor(private service: OrderService) { }\r\n\r\n ngOnInit(): void {\r\n this.getAllService();\r\n }\r\n\r\n public OmanOrders: number = 0;\r\n public InternationalOrders: number = 0;\r\n public CountriesCovered: number = 0;\r\n public YearsExperience: number = 1;\r\n isLoading = true;\r\n public getAllService = () => {\r\n this.isLoading = true;\r\n\r\n this.service.getServiceHome()\r\n .subscribe(res => {\r\n var splitted = res.split(\"-\", 4);\r\n this.OmanOrders = +splitted[0];\r\n this.InternationalOrders = +splitted[1];\r\n this.CountriesCovered = +splitted[2];\r\n this.YearsExperience = +splitted[3];\r\n\r\n this.isLoading = false;\r\n },\r\n (err) => {\r\n this.isLoading = false;\r\n\r\n })\r\n\r\n }\r\n\r\n}\r\n","\r\n