1import{a as ot}from"./chunk-RL23CMKJ.js";import{a as ht}from"./chunk-EI7S76MX.js";import"./chunk-CPBDRKJF.js";import{a as at,b as st}from"./chunk-G24DUSEI.js";import{a as it}from"./chunk-WBKEXQKE.js";import{a as yt}from"./chunk-7RJ7KBOV.js";import{a as tt,b as et}from"./chunk-EOY6SAP7.js";import{J as pt}from"./chunk-YJGV56BU.js";import"./chunk-5LNWRJOG.js";import"./chunk-UX52FRTR.js";import"./chunk-IWYKCUBW.js";import"./chunk-MZ3B3AQU.js";import"./chunk-GJ3HPRCZ.js";import"./chunk-L77O44AU.js";import"./chunk-XZDAMPUP.js";import"./chunk-UWULTQAP.js";import{b as _t,c as ut}from"./chunk-RB2YP5E2.js";import{k as dt,n as mt}from"./chunk-QIIVFJNA.js";import"./chunk-KO7CD6JP.js";import"./chunk-6D27RETG.js";import{C as $,c as G,h as J,m as X}from"./chunk-DJ7NG7WZ.js";import{c as q}from"./chunk-KI4XJKCH.js";import{a as lt,h as gt,j as Ct}from"./chunk-NERRRF6P.js";import{w as nt}from"./chunk-SXBT3OYT.js";import"./chunk-SN3EPBFH.js";import"./chunk-EHPYMWXB.js";import{ea as K}from"./chunk-7ZFPQAIH.js";import{r as Z,za as Q}from"./chunk-7NPDSOWV.js";import"./chunk-R5IULLQ2.js";import{x as j,z as H}from"./chunk-LEKN3M5J.js";import{a as rt,b as ct}from"./chunk-KFHTLBNQ.js";import"./chunk-YV5TISNX.js";import{D as U,w as Y}from"./chunk-IDF3EASQ.js";import"./chunk-WJESYQVL.js";import{$c as B,Aa as z,Bc as y,Cc as i,Dc as n,Ea as W,Ec as f,Gd as w,I as T,Ib as s,Id as b,La as d,Lc as x,Ma as m,Md as R,Sb as N,Uc as v,Wc as l,Zb as I,_c as P,aa as k,ad as O,dc as L,ed as A,jd as r,l as D,ld as F,md as V,pd as g,qd as C,rd as h,sa as S,t as M,uc as _,wc as u,wd as E}from"./chunk-K6IHZUMJ.js";var St=(()=>{class o{constructor(t){this.apiService=t}getConnectionInfo(){return this.apiService.get("dynamicsnav/connection-info")}activate(t){return this.apiService.post("dynamicsnav/activate",{BaseUrl:t.baseUrl,KeyedServiceEntry:t.keyedServiceEntry,AuthorizationUserName:t.authorizationUserName,AuthorizationPassword:t.authorizationPassword,SSLBypassValidation:t.sslBypassValidation})}deactivate(){return this.apiService.post("dynamicsnav/deactivate")}getSettings(){return this.apiService.get("dynamicsnav/settings")}saveAndSetup(t){return this.apiService.post("dynamicsnav/settings",t)}synchronizeCurrencies(){return this.apiService.post("dynamicsnav/synchronize/currencies")}synchronizeExchangeRates(){return this.apiService.post("dynamicsnav/synchronize/exchangerates")}synchronizeChartOfAccounts(){return this.apiService.post("dynamicsnav/synchronize/chartofaccounts")}synchronizeAccounts(){return this.apiService.post("dynamicsnav/synchronize/accounts")}synchronizeProducts(){return this.apiService.post("dynamicsnav/synchronize/products")}synchronizePaymentTerms(){return this.apiService.post("dynamicsnav/synchronize/paymentterms")}synchronizeDimensions(){return this.apiService.post("dynamicsnav/synchronize/dimensions")}static{this.\u0275fac=function(c){return new(c||o)(W(Q))}}static{this.\u0275prov=z({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Vt=["setupDialog"],wt=()=>["/settings/custom-field-lists"],bt=()=>["/settings/custom-fields"];function Nt(o,p){if(o&1){let t=x();i(0,"yon-button",15),v("onClick",function(){d(t);let e=l();return m(e.onSetup())}),r(1,"GET STARTED"),n()}}function At(o,p){if(o&1){let t=x();i(0,"yon-button",16),v("onClick",function(){d(t);let e=l();return m(e.onDeactivate())}),r(1,"DEACTIVATE"),n()}}
1function Et(o,p){o&1&&(i(0,"div")(1,"h5"),r(2,"No connection to Dynamics NAV"),n(),i(3,"p"),r(4," Click the "),i(5,"i"),r(6,"get started"),n(),r(7," button above to set up a link to Dynamic NAV "),n()())}function Dt(o,p){if(o&1&&(i(0,"p"),r(1),w(2,"date"),n()),o&2){let t=l(4);s(),V(" Last run: ",b(2,2,t.settings.lastCurrencySync,"short"),", ",t.settings.lastCurrencySyncCount," entires synched ")}}function Mt(o,p){if(o&1){let t=x();i(0,"div",19),_(1,Dt,3,5,"p"),i(2,"yon-button",25),v("onClick",function(){d(t);let e=l(3);return m(e.onSyncCurrencies())}),r(3," SYNCHRONIZE NOW "),n()()}if(o&2){let t=l(3);s(),u(t.settings.lastCurrencySync?1:-1),s(),y("disabled",t.isSynchronizing)}}function Tt(o,p){if(o&1&&(i(0,"p"),r(1),w(2,"date"),n()),o&2){let t=l(4);s(),V(" Last run: ",b(2,2,t.settings.lastExchangeRateSync,"short"),", ",t.settings.lastExchangeRateSyncCount," entries synched ")}}function kt(o,p){if(o&1){let t=x();i(0,"div",19),_(1,Tt,3,5,"p"),i(2,"yon-button",25),v("onClick",function(){d(t);let e=l(3);return m(e.onSyncExchangeRates())}),r(3," SYNCHRONIZE NOW "),n()()}if(o&2){let t=l(3);s(),u(t.settings.lastExchangeRateSync?1:-1),s(),y("disabled",t.isSynchronizing)}}function zt(o,p){if(o&1&&(i(0,"p"),r(1),w(2,"date"),n()),o&2){let t=l(4);s(),V(" Last run: ",b(2,2,t.settings.lastPaymentTermSync,"short"),", ",t.settings.lastPaymentTermSyncCount," entries synched ")}}function Wt(o,p){if(o&1){let t=x();i(0,"div",19),_(1,zt,3,5,"p"),i(2,"yon-button",25),v("onClick",function(){d(t);let e=l(3);return m(e.onSyncPaymentTerms())}),r(3," SYNCHRONIZE NOW "),n()()}if(o&2){let t=l(3);s(),u(t.settings.lastPaymentTermSync?1:-1),s(),y("disabled",t.isSynchronizing)}}function It(o,p){if(o&1&&(i(0,"p"),r(1),w(2,"date"),n()),o&2){let t=l(4);s(),V(" Last run: ",b(2,2,t.settings.lastChartOfAccountsSync,"short"),", ",t.settings.lastChartOfAccountsSyncCount," entries synched ")}}function Lt(o,p){if(o&1){let t=x();i(0,"div",19),_(1,It,3,5,"p"),i(2,"yon-button",25),v("onClick",function(){d(t);let e=l(3);return m(e.onSyncChartOfAccounts())}),r(3," SYNCHRONIZE NOW "),n()()}if(o&2){let t=l(3);s(),u(t.settings.lastChartOfAccountsSync?1:-1),s(),y("disabled",t.isSynchronizing)}}function Pt(o,p){if(o&1&&(i(0,"p"),r(1),w(2,"date"),n()),o&2){let t=l(4);s(),V(" Last run: ",b(2,2,t.settings.lastProductSync,"short"),", ",t.settings.lastProductSyncCount," entries synched ")}}function Bt(o,p){if(o&1){let t=x();i(0,"div",19),_(1,Pt,3,5,"p"),i(2,"yon-button",25),v("onClick",function(){d(t);let e=l(3);return m(e.onSyncProducts())}),r(3," SYNCHRONIZE NOW "),n()()}if(o&2){let t=l(3);s(),u(t.settings.lastProductSync?1:-1),s(),y("disabled",t.isSynchronizing)}}function Ot(o,p){if(o&1&&(i(0,"p"),r(1),w(2,"date"),n()),o&2){let t=l(4);s(),V(" Last run: ",b(2,2,t.settings.lastAccountSync,"short"),", ",t.settings.lastAccountSyncCount," entries synched ")}}function Ft(o,p){if(o&1){let t=x();i(0,"div",19),_(1,Ot,3,5,"p"),i(2,"yon-button",25),v("onClick",function(){d(t);let e=l(3);return m(e.onSyncAccounts())}),r(3," SYNCHRONIZE NOW "),n(),f(4,"div"),n()}if(o&2){let t=l(3);s(),u(t.settings.lastAccountSync?1:-1),s(),y("disabled",t.isSynchronizing)}}function Rt(o,p){if(o&1){let t=x();i(0,"div",19)(1,"p"),r(2," Fortnox cost centers will be synchronized to a custom field list in Younium. You first need to setup a custom field list and then create custom fields of type list that use this list. Follow the instructions below to do this "),n(),i(3,"ol",26)(4,"li")(5,"div",27)(6,"yon-field",28,10),h("ngModelChange",function(e){d(t);let a=l(3);return C(a.settings.dimensionCode,e)||(a.settings.dimensionCode=e),m(e)}),n()()(),i(8,"li")(9,"a",29),r(10," Create an empty custom field list in Younium "),n()(),i(11,"li")(12,"a",29),r(13," Create a custom field for invoice line of type list that uses the list created in step 1 "),n()(),i(14,"li"),r(15," (Optional) Create a custom field on order product charge with the same name as the field on invoice created in step 3. This will allow to set cost center on charges and have them auto populated on invoice lines "),n(),i(16,"li")(17,"div",27)(18,"yon-field",30),h("ngModelChange",function(e){d(t);let a=l(3);return C(a.settings.invoiceLineDimensionCustomField,e)||(a.settings.invoiceLineDimensionCustomField=e),m(e)}
1),n()()()(),i(19,"yon-button",25),v("onClick",function(){d(t);let e=l(3);return m(e.onSyncDimensions())}),r(20," SYNCHRONIZE NOW "),n()()}if(o&2){let t=A(7),c=l(3);s(6),g("ngModel",c.settings.dimensionCode),y("title","Dynamics nav dimension code"),s(3),y("routerLink",E(8,wt)),s(3),y("routerLink",E(9,bt)),s(6),g("ngModel",c.settings.invoiceLineDimensionCustomField),y("data",c.invoiceLineListCustomFields)("title",t.value+" ON invoice line"),s(),y("disabled",c.isSynchronizing)}}function Yt(o,p){if(o&1){let t=x();i(0,"div")(1,"mat-checkbox",18),h("ngModelChange",function(e){d(t);let a=l(3);return C(a.settings.postInvoices,e)||(a.settings.postInvoices=e),m(e)}),r(2," Post the invoice in Dynamics NAV "),n()()}if(o&2){let t=l(3);y("@slideInOut",void 0),s(),g("ngModel",t.settings.postInvoices)}}function Ut(o,p){o&1&&f(0,"mat-progress-bar",24)}function Zt(o,p){if(o&1){let t=x();i(0,"div")(1,"h2"),r(2,"Synchronize data"),n(),i(3,"p"),r(4),n(),i(5,"section",17)(6,"mat-checkbox",18,2),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.currencySync,e)||(a.settings.currencySync=e),m(e)}),n(),i(8,"h4"),r(9,"Currencies"),n(),i(10,"p"),r(11,"Dynamics NAV currencies to Younium currencies"),n(),_(12,Mt,4,2,"div",19),f(13,"mat-divider"),n(),i(14,"section",17)(15,"mat-checkbox",18,3),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.exchangeRateSync,e)||(a.settings.exchangeRateSync=e),m(e)}),n(),i(17,"h4"),r(18,"Exchange rates"),n(),i(19,"p"),r(20," Younium exchange rates will be created from the "),i(21,"i"),r(22,"Buy Rate"),n(),r(23," of the Dynamics NAV currency "),n(),_(24,kt,4,2,"div",19),f(25,"mat-divider"),n(),i(26,"section",17)(27,"mat-checkbox",18,4),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.paymentTermSync,e)||(a.settings.paymentTermSync=e),m(e)}),n(),i(29,"h4"),r(30,"Payment terms"),n(),i(31,"p"),r(32,"Dynamics NAV payment terms to Younium payment terms"),n(),_(33,Wt,4,2,"div",19),f(34,"mat-divider"),n(),i(35,"section",17)(36,"mat-checkbox",18,5),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.chartOfAccountsSync,e)||(a.settings.chartOfAccountsSync=e),m(e)}),n(),i(38,"h4"),r(39,"Chart of accounts"),n(),i(40,"p"),r(41,"Synchronize Dynamics NAV accounts to Younium chart of accounts"),n(),_(42,Lt,4,2,"div",19),f(43,"mat-divider"),n(),i(44,"section",17)(45,"mat-checkbox",18,6),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.productSync,e)||(a.settings.productSync=e),m(e)}),n(),i(47,"h4"),r(48,"Products"),n(),i(49,"p"),r(50,"This will synchronize Dynamics NAV articles into Younium simple products"),n(),_(51,Bt,4,2,"div",19),f(52,"mat-divider"),n(),i(53,"section",17)(54,"mat-checkbox",18,7),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.accountSync,e)||(a.settings.accountSync=e),m(e)}),n(),i(56,"h4"),r(57,"Accounts"),n(),i(58,"p"),r(59,"This will synchronize Dynamics NAV customers into Younium accounts"),n(),_(60,Ft,5,2,"div",19),f(61,"mat-divider"),n(),i(62,"section",17)(63,"mat-checkbox",18,8),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.useDimension,e)||(a.settings.useDimension=e),m(e)}),n(),i(65,"h4"),r(66,"Dimension"),n(),i(67,"p"),r(68,"This will synchronize Dynamics NAV dimension"),n(),_(69,Rt,21,10,"div",19),f(70,"mat-divider"),n(),i(71,"h2"),r(72,"Events & Actions"),n(),i(73,"p"),r(74,"Below you can configre what events and actions that should be sent to Dynamics NAV"),n(),i(75,"section",17)(76,"mat-checkbox",18,9),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.createInvoices,e)||(a.settings.createInvoices=e),m(e)}),n(),i(78,"h4"),r(79,"Post an invoice into Dynamics NAV"),n(),i(80,"div",20),_(81,Yt,3,2,"div"),n()(),i(82,"div")(83,"mat-checkbox",18),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.hasEANNumber,e)||(a.settings.hasEANNumber=e),m(e)}),n(),i(84,"h4",21),r(85,"EAN Number"),n(),i(86,"p",22),r(87," Enable this option will create an invoice with EAN Number. "),n()(),i(88,"div")(89,"mat-checkbox",18),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.sslBypassValidation,e)||(a.settings.sslBypassValidation=e),m(e)}),n(),i(90,"h4",21),r(91," Bypass SSL validation "),n()(),i(92,"div")(93,"mat-checkbox",18),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.mapExternalDocumentNumber,e)||(a.settings.mapExternalDocumentNumber=e),m(e)}),n(),i(94,"h6",21),r(95," Map external document number and Sell to Contact "),n(),i(96,"p",22),r(97," Enable this option will map your order number with external document number and Your Reference with Sell to contact. "),n()(),i(98,"div")(99,"mat-checkbox",18),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.filterOutZeroAmountRecurringFees,e)||(a.settings.filterOutZeroAmountRecurringFees=e),m(e)}),n(),i(100,"h6",21),r(101," Don't send recurring fees with 0 amount "),n(),i(102,"p",22),r(103," Enable this option will don't send recurring fees with 0 amount "),n()(),f(104,"br"),i(105,"yon-button",23),v("onClick",function(){d(t);let e=l(2);return m(e.onSaveAndSetup())}),r(106," SAVE "),n(),_(107,Ut,1,0,"mat-progress-bar",24),n()}if(o&2){let t=l(2);s(4),F(" Connected to Dynamics NAV, ",t.connectionInfo==null?null:t.connectionInfo.Name,". Below you can configre what data will be synchronized from Dynamics NAV to Younium. "),s(2),g("ngModel",t.settings.currencySync),s(6),u(t.settings.currencySync?12:-1),s(3),g("ngModel",t.settings.exchangeRateSync),s(9),u(t.settings.exchangeRateSync?24:-1),s(3),g("ngModel",t.settings.paymentTermSync),s(6),u(t.settings.paymentTermSync?33:-1),s(3),g("ngModel",t.settings.chartOfAccountsSync),s(6),u(t.settings.chartOfAccountsSync?42:-1),s(3),g("ngModel",t.settings.productSync),s(6),u(t.settings.productSync?51:-1),s(3),g("ngModel",t.settings.accountSync),s(6),u(t.settings.accountSync?60:-1),s(3),g("ngModel",t.settings.useDimension),s(6),u(t.settings.useDimension?69:-1),s(7),g("ngModel",t.settings.createInvoices),s(5),u(t.settings.createInvoices?81:-1),s(2),g("ngModel",t.settings.hasEANNumber),s(6),g("ngModel",t.settings.sslBypassValidation),s(4),g("ngModel",t.settings.mapExternalDocumentNumber),s(6),g("ngModel",t.settings.filterOutZeroAmountRecurringFees),s(6),y("disabled",t.isSynchronizing),s(2),u(t.isSynchronizing?107:-1)}}function jt(o,p){if(o&1&&(_(0,Et,8,0,"div"),_(1,Zt,108,23,"div")),o&2){let t=l();u(t.settings!=null&&t.settings.accessValid?-1:0),s(),u(t.settings!=null&&t.settings.accessValid?1:-1)}}function Ht(o,p){if(o&1){let t=x();i(0,"mat-form-field",32)(1,"input",38),h("ngModelChange",function(e){d(t);let a=l(3);return C(a.settings.authorizationPassword,e)||(a.settings.authorizationPassword=e),m(e)}),n()()}if(o&2){let t=l(3);y("color",t.settings!=null&&t.settings.activationErrorMessage?"warn":"primary"),s(),g("ngModel",t.settings.authorizationPassword)}}
1function Qt(o,p){if(o&1){let t=x();i(0,"div")(1,"p"),r(2,"In Dynamics NAV you now have to connect Younium to your Dynamics NAV account."),n(),i(3,"mat-form-field",32)(4,"input",33),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.baseUrl,e)||(a.settings.baseUrl=e),m(e)}),n()(),i(5,"mat-form-field",32)(6,"input",34),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.keyedServiceEntry,e)||(a.settings.keyedServiceEntry=e),m(e)}),n()(),i(7,"mat-form-field",32)(8,"input",35),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.authorizationUserName,e)||(a.settings.authorizationUserName=e),m(e)}),n()(),_(9,Ht,2,2,"mat-form-field",32),i(10,"div")(11,"mat-checkbox",36),h("ngModelChange",function(e){d(t);let a=l(2);return C(a.settings.sslBypassValidation,e)||(a.settings.sslBypassValidation=e),m(e)}),r(12," Bypass SSL validation "),n()(),i(13,"yon-button",37),v("onClick",function(){d(t);let e=l(2);return m(e.onValidate())}),r(14," VALIDATE "),n()()}if(o&2){let t=l(2);s(3),y("color",t.settings!=null&&t.settings.activationErrorMessage?"warn":"primary"),s(),g("ngModel",t.settings.baseUrl),s(),y("color",t.settings!=null&&t.settings.activationErrorMessage?"warn":"primary"),s(),g("ngModel",t.settings.keyedServiceEntry),s(),y("color",t.settings!=null&&t.settings.activationErrorMessage?"warn":"primary"),s(),g("ngModel",t.settings.authorizationUserName),s(),u(t.settings!=null?9:-1),s(2),g("ngModel",t.settings.sslBypassValidation),s(2),y("disabled",!t.settings.baseUrl&&!t.settings.keyedServiceEntry&&!t.settings.authorizationUserName&&!t.settings.authorizationPassword)}}function Kt(o,p){if(o&1){let t=x();i(0,"div",31),f(1,"yon-icon",39),i(2,"p"),r(3," Younium and Dynamics NAV are now integrated. Now go ahead and setup the rest of the integration "),n(),i(4,"yon-button",40),v("onClick",function(){d(t),l(2);let e=A(6);return m(e.close())}),r(5,"OK"),n()()}o&2&&y("@slideInOut",void 0)}function qt(o,p){if(o&1&&(_(0,Qt,15,9,"div"),_(1,Kt,6,1,"div",31)),o&2){let t=l();u(t.settings&&!(t.settings!=null&&t.settings.accessValid)?0:-1),s(),u(t.settings!=null&&t.settings.accessValid?1:-1)}}var Ne=(()=>{class o{constructor(t,c,e,a,xt){this.dynamicNAVService=t,this.notificationService=c,this.dialogService=e,this.customFieldListService=a,this.fieldConfigurationService=xt,this.isSynchronizing=!1,this.unsubscribe$=new M}ngOnInit(){this.dynamicNAVService.getSettings().pipe(S(this.unsubscribe$)).subscribe(t=>{this.settings=t,this.dynamicNAVService.getConnectionInfo().pipe(S(this.unsubscribe$)).subscribe(c=>this.connectionInfo=c)}),this.customFieldListService.customFieldLists().pipe(S(this.unsubscribe$)).subscribe(t=>this.customFieldLists=t),this.fieldConfigurationService.customFieldsForEntity("invoiceline").pipe(S(this.unsubscribe$),T(t=>t.filter(c=>c.fieldType===Z.List))).subscribe(t=>this.invoiceLineListCustomFields=t)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onSetup(){this.setupDialog.show()}onValidate(){this.dynamicNAVService.activate(this.settings).pipe(S(this.unsubscribe$)).subscribe(t=>{this.settings=t,this.dynamicNAVService.getConnectionInfo().pipe(S(this.unsubscribe$)).subscribe(c=>this.connectionInfo=c)})}onSaveAndSetup(){this.isSynchronizing=!0,this.dynamicNAVService.saveAndSetup(this.settings).pipe(S(this.unsubscribe$)).subscribe(t=>{this.settings=t,this.isSynchronizing=!1,this.customFieldListService.refreshCustomFieldLists().pipe(k(1)).subscribe()})}onSyncCurrencies(){this.isSynchronizing=!0,this.dynamicNAVService.synchronizeCurrencies().pipe(S(this.unsubscribe$)).subscribe({next:t=>{this.settings=t,this.isSynchronizing=!1,this.notificationService.info("Synchronization completed")},error:t=>this.notificationService.error(t.error.message)})}onSyncExchangeRates(){this.isSynchronizing=!0,this.dynamicNAVService.synchronizeExchangeRates().pipe(S(this.unsubscribe$)).subscribe({next:t=>{this.settings=t,this.isSynchronizing=!1,this.notificationService.info("Synchronization completed")},error:t=>this.notificationService.error(t.error.message)})}onSyncProducts(){this.isSynchronizing=!0,this.dynamicNAVService.synchronizeProducts().pipe(S(this.unsubscribe$)).subscribe({next:t=>{this.settings=t,this.isSynchronizing=!1,this.notificationService.info("Synchronization completed")},error:t=>this.notificationService.error(t.error.message)})}onSyncChartOfAccounts(){this.isSynchronizing=!0,this.dynamicNAVService.synchronizeChartOfAccounts().pipe(S(this.unsubscribe$)).subscribe({next:t=>{this.settings=t,this.isSynchronizing=!1,this.notificationService.info("Synchronization completed")},error:t=>this.notificationService.error(t.error.message)})}onSyncPaymentTerms(){this.isSynchronizing=!0,this.dynamicNAVService.synchronizePaymentTerms().pipe(S(this.unsubscribe$)).subscribe({next:t=>{this.settings=t,this.isSynchronizing=!1,this.notificationService.info("Synchronization completed")},error:t=>this.notificationService.error(t.error.message)})}onSyncAccounts(){this.isSynchronizing=!0,this.dynamicNAVService.synchronizeAccounts().pipe(S(this.unsubscribe$)).subscribe({next:t=>{this.settings=t,this.isSynchronizing=!1,this.notificationService.info("Synchronization completed")},error:t=>this.notificationService.error(t.error.message)})}onSyncDimensions(){this.isSynchronizing=!0,this.dynamicNAVService.synchronizeDimensions().pipe(S(this.unsubscribe$)).subscribe({next:t=>{this.settings=t,this.isSynchronizing=!1,this.notificationService.info("Synchronization completed")},error:t=>this.notificationService.error(t.error.message)})}onDeactivate(){return D(this,null,function*(){(yield this.dialogService.confirmYesNo("You will lose your connection to Dynamics NAV, are you sure you want to deactive?"))&&this.dynamicNAVService.deactivate().pipe(S(this.unsubscribe$)).subscribe(c=>this.settings=c)})}static{this.\u0275fac=function(c){return new(c||o)(N(St),N(q),N(it),N(ht),N(K))}}static{this.\u0275cmp=I({type:o,selectors:[["yon-settings-dynamicnav"]],viewQuery:function(c,e){if(c&1&&P(Vt,5),c&2){let a;B(a=O())&&(e.setupDialog=a.first)}},decls:9,vars:4,consts:[["setupDialog",""],["setupDialogContent",""],["syncCurrencies",""],["syncExchangeRates",""],["syncPaymentTerms",""],["syncChartOfAccounts",""],["synchProducts",""],["syncAccounts",""],["useDimension",""],["postInvoices",""],["dimension_nav_code",""],["header","Dynamics NAV"],["color","primary"],["buttonIcon","cancel"],["header","Dynamics NAV setup",3,"containerTemplate"],["color","primary",3,"onClick"],["buttonIcon","cancel",3,"onClick"],[1,"mb-2","mt-2"],["color","primary",3,"ngModelChange","ngModel"],[1,"mt-1","mb-1"],[1,"col-4"],[2,"display","inline","margin-left","6px","vertical-align","top"],[2,"font-size","0.8rem"],["color","primary",3,"onClick","disabled"],["mode","indeterminate",2,"margin-top","10px"],["type","mat-stroked-button",3,"onClick","disabled"],[2,"font-size","12px"],[2,"width","250px"],["type","text",3,"ngModelChange","ngModel","title"],[3,"routerLink"],["type","select","textField","fieldDescription","valueField","fieldName","name","linecsCustomField",3,"ngModelChange","ngModel","data","title"],[1,"text-center"],[2,"width","100%",3,"color"],["matInput","","placeholder"," Dynamics NAV Base URL",3,"ngModelChange","ngModel"],["matInput","","placeholder"," Dynamics NAV company (Keyed Service Entry)",3,"ngModelChange","ngModel"],["matInput","","placeholder"," Dynamics NAV username",3,"ngModelChange","ngModel"],["color","primary",2,"display","inline-block",3,"ngModelChange","ngModel"],["color","primary",1,"mt-2",3,"onClick","disabled"],["matInput","","type","password","autocomplete","new-password","placeholder"," Dynamics NAV password",3,"ngModelChange","ngModel"],["name","check_circle"],[3,"onClick"]],template:function(c,e){if(c&1&&(i(0,"yon-card",11)(1,"yon-card-header-right"),_(2,Nt,2,0,"yon-button",12),_(3,At,2,0,"yon-button",13),n(),_(4,jt,2,2),n(),f(5,"yon-dialog",14,0),L(7,qt,2,2,"ng-template",null,1,R)),c&2){let a=A(8);s(2),u(e.settings!=null&&e.settings.accessValid?-1:2),s(),u(e.settings!=null&&e.settings.accessValid?3:-1),s(),u(e.settings?4:-1),s(),y("containerTemplate",a)}},dependencies:[U,$,G,J,X,H,j,gt,Ct,nt,pt,yt,lt,st,at,ct,rt,mt,dt,et,tt,ut,_t,Y],encapsulation:2,data:{animation:[ot.slideInOut]}})}}return o}
1)();export{Ne as SettingsDynamicNAVComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.