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IAKD,WAAW;QACX,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACrB,CAAC;IAID,YAAY;QACZ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,EAAU,CAAC;QACf,IAAI,CAAC,GAAW,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAExC,IAAG,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAC;YACzB,EAAE,GAAG,WAAW,CAAC;SAChB;QAED,IAAG,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAC;YAC5B,EAAE,GAAG,YAAY,CAAC;SACjB;QAED,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,EAAC,IAAI,CAAC,CAAC;IAE/B,CAAC;CACA;;YAzGQ,8EAAc;YADd,qFAAiB;;AASb,WAAW;IALvB,wDAAS,CAAC;QACT,QAAQ,EAAE,aAAa;QACvB,oEAAkC;;KAEnC,CAAC;GACW,WAAW,CAiGvB;AAjGuB","sources":["./src/app/ratecon/ratecon-routing.module.ts","./src/app/ratecon/ratecon.module.ts","./src/app/ratecon/ratecon.page.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { RateconPage } from './ratecon.page';\n\nconst routes: Routes = [\n {\n path: '',\n component: RateconPage\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class RateconPageRoutingModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { IonicModule } from '@ionic/angular';\n\nimport { RateconPageRoutingModule } from './ratecon-routing.module';\n\nimport { RateconPage } from './ratecon.page';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n IonicModule,\n RateconPageRoutingModule\n ],\n declarations: [RateconPage]\n})\nexport class RateconPageModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { AppserviceService } from '../_service/appservice/appservice.service';\nimport { ApiLinkService } from '../_service/api-link/api-link.service';\n\n\n@Component({\n selector: 'app-ratecon',\n templateUrl: './ratecon.page.html',\n styleUrls: ['./ratecon.page.scss'],\n})\nexport class RateconPage implements OnInit {\n isPrint: boolean = false;\n pTimer: number;\n\n \n\n\nconstructor(public apiLink: ApiLinkService,\n public appService: AppserviceService\n) { }\n\n ngOnInit() {\n }\n\n\n\n\nionViewWillEnter(){\n\n}\n\n\nionViewDidEnter(){ \nlet p = this.appService.searchlistRC[0].printed;\nif(p === ''){\n alert(\"This rate confirmation will change\\nto * Contracted * status ONLY\\nafter you click the print button,\"\n + \"\\nwhich appears after the signatory\\nsections are completed by both parties.\")\n} \n \n}\n\n\n\n\nasync printRateCon(){\nlet obj:any = this.appService.defsPost;\nlet objx: any[] = this.appService.searchlistRC[0];\n\n Object.keys(obj).forEach(col => {\n if (col === \"modified\") {\n obj[col] = \"No\";\n return;\n }\n\n Object.keys(objx).filter(xCol => {\n if (xCol === col)\n obj[col] = objx[xCol];\n });\n })\n\n if(obj.printed === '' && this.appService.isLoggedIn === 'Carrier'){\n obj.freightitemStatus = 'Contracted';\n obj.printed = new Date().toISOString();\n console.log(obj)\n let p\n p = await this.appService.doServerPost(obj,\"r\");\n\n if(p){\n this.appService.updateItems('i',null,null,null);\n } \n }\n \n\nthis.isPrint = true; \nawait new Promise (resolve => setTimeout(resolve,300));\n\ndocument.title = \"\";// \"LOAD NUMBER \" + i;\nwindow.print(); \n// disengage with button \n}\n\n\n\n\nviewRateCon(){\nthis.isPrint = false; \n}\n\n\n\ncloseRateCon(){\nthis.isPrint = false; \n\nlet pg: string;\nlet u: string = this.appService.prevUrl;\n\nif(u.includes(\"history\")){\npg = \"frhistory\";\n} \n\nif(u.includes(\"items_page\")){\npg = \"items_page\";\n} \n\nthis.appService.goTab(pg,null); \n\n}\n}\n"],"names":[],"sourceRoot":"webpack:///"}