Merge branch 'xero' of gitlab.com:pitmutt/zgo into xero
This commit is contained in:
commit
072da66c10
5 changed files with 106 additions and 54 deletions
|
@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Field for Xero's AccountCode added to Settings component's integration tab
|
||||||
- Listorders component updated to show date in ANSI international format.
|
- Listorders component updated to show date in ANSI international format.
|
||||||
- Settings component updated to use owner's invoices field to control
|
- Settings component updated to use owner's invoices field to control
|
||||||
integrations tab (Pro version)
|
integrations tab (Pro version)
|
||||||
|
|
|
@ -77,7 +77,7 @@ export class PmtserviceComponent implements OnInit {
|
||||||
expiration: new Date(Date.now()).toISOString(),
|
expiration: new Date(Date.now()).toISOString(),
|
||||||
payconf: false,
|
payconf: false,
|
||||||
viewkey: '',
|
viewkey: '',
|
||||||
crmToken: ''
|
crmToken: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
public order: Order = {
|
public order: Order = {
|
||||||
|
|
|
@ -2,6 +2,6 @@ http://localhost:4200/pmtservice?ownerid=62cca13f5530331e2a97c78e&invoiceNo=INV-
|
||||||
|
|
||||||
https://test.zgo.cash/api/invdata?address=zs17faa6l5ma55s55exq9rnr32tu0wl8nmqg7xp3e6tz0m5ajn2a6yxlc09t03mqdmvyphavvf3sl8&inv=INV-0034
|
https://test.zgo.cash/api/invdata?address=zs17faa6l5ma55s55exq9rnr32tu0wl8nmqg7xp3e6tz0m5ajn2a6yxlc09t03mqdmvyphavvf3sl8&inv=INV-0034
|
||||||
|
|
||||||
|
https://www.paymentservice.com/?invoiceNo=[INVOICENUMBER]¤cy=[CURRENCY]&amount=[AMOUNTDUE]&shortCode=[SHORTCODE]
|
||||||
|
|
||||||
https://app.zgo.cash/invoice/
|
https://app.zgo.cash/invoice/
|
|
@ -77,61 +77,92 @@
|
||||||
<mat-tab *ngIf="proVersion"
|
<mat-tab *ngIf="proVersion"
|
||||||
label="Integrations"
|
label="Integrations"
|
||||||
style="align-items: center;">
|
style="align-items: center;">
|
||||||
|
<div class="container" style="margin-bottom: 20px;">
|
||||||
|
<mat-dialog-content [formGroup]="settingsForm">
|
||||||
|
<div style="height: 10px;
|
||||||
|
margin-top: 10px;">
|
||||||
|
</div>
|
||||||
|
<mat-form-field class="settings-field" [style.width.%]="100">
|
||||||
|
<mat-label>Account Code</mat-label>
|
||||||
|
<input matInput
|
||||||
|
width="100%"
|
||||||
|
placeholder="9999999999"
|
||||||
|
formControlName="xeroAccCod"
|
||||||
|
(change)="xeroAccCodChanged($event)">
|
||||||
|
</mat-form-field>
|
||||||
|
<div style="height: 10px;
|
||||||
|
margin-top: 10px;">
|
||||||
|
</div>
|
||||||
|
<div class="container"
|
||||||
|
style="height: 300;">
|
||||||
|
<p style="text-align:center">
|
||||||
|
<a mat-raised-button
|
||||||
|
color="primary"
|
||||||
|
href="{{this.xeroLink}}">
|
||||||
|
{{ linkMsg }}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table *ngIf="linked2Xero"
|
||||||
|
[style.width.%]="100"
|
||||||
|
style="margin-top: 10px;">
|
||||||
|
<thead style="width: 100%;">
|
||||||
|
<tr>
|
||||||
|
<th class="urlLabel"
|
||||||
|
style="text-align: left;"
|
||||||
|
width="94%">Payment Service URL:
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<td class="urlDetail"
|
||||||
|
style="text-align: left;"
|
||||||
|
width="94%">
|
||||||
|
<div>
|
||||||
|
<textarea disabled
|
||||||
|
style="font-size: 10px !important;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
min-height: 150px;
|
||||||
|
width: 95%;"
|
||||||
|
cdkTextareaAutosize
|
||||||
|
cdkAutosizeMinRows="6"
|
||||||
|
cdkAutosizeMaxRows="10">{{ pmtServiceURL }}
|
||||||
|
</textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td class="urlCopyBtn">
|
||||||
|
<a (click)='copyUrl()' >
|
||||||
|
<fa-icon [icon]="faCopy"
|
||||||
|
class="copy-button">
|
||||||
|
</fa-icon>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</mat-dialog-content>
|
||||||
|
</div>
|
||||||
|
<div class="container"
|
||||||
|
style="display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;">
|
||||||
|
<button mat-raised-button
|
||||||
|
(click)="closeIntegration()">
|
||||||
|
Close
|
||||||
|
</button>
|
||||||
|
<button *ngIf="saveAccOk"
|
||||||
|
mat-raised-button
|
||||||
|
color="primary"
|
||||||
|
(click)="saveAccCod()">
|
||||||
|
Save Code
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div style="height: 20px;
|
<div style="height: 20px;
|
||||||
margin-top: 10px;">
|
margin-top: 10px;">
|
||||||
</div>
|
</div>
|
||||||
<div class="container"
|
|
||||||
style="height: 300;">
|
|
||||||
<p style="text-align:center">
|
|
||||||
<a mat-raised-button
|
|
||||||
color="primary"
|
|
||||||
href="{{this.xeroLink}}">
|
|
||||||
{{ linkMsg }}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table *ngIf="linked2Xero"
|
|
||||||
style="width:100%;
|
|
||||||
margin-top: 10px;">
|
|
||||||
<thead style="width: 100%;">
|
|
||||||
<tr>
|
|
||||||
<th class="urlLabel"
|
|
||||||
style="text-align: left;"
|
|
||||||
width="94%">Payment Service URL:
|
|
||||||
</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<td class="urlDetail"
|
|
||||||
style="text-align: left;"
|
|
||||||
width="94%">
|
|
||||||
<div>
|
|
||||||
<textarea disabled
|
|
||||||
style="font-size: 10px !important;
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
min-height: 150px;
|
|
||||||
width: 95%;"
|
|
||||||
cdkTextareaAutosize
|
|
||||||
cdkAutosizeMinRows="6"
|
|
||||||
cdkAutosizeMaxRows="10">{{ pmtServiceURL }}
|
|
||||||
</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td class="urlCopyBtn">
|
|
||||||
<a (click)='copyUrl()' >
|
|
||||||
<fa-icon [icon]="faCopy"
|
|
||||||
class="copy-button">
|
|
||||||
</fa-icon>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,6 +28,8 @@ export class SettingsComponent implements OnInit {
|
||||||
proVersion: boolean = false;
|
proVersion: boolean = false;
|
||||||
useVKey: boolean = false;
|
useVKey: boolean = false;
|
||||||
linkMsg: String = 'Link to Xero';
|
linkMsg: String = 'Link to Xero';
|
||||||
|
xeroAccCod: String = '';
|
||||||
|
saveAccOk: boolean = false;
|
||||||
|
|
||||||
coins = [
|
coins = [
|
||||||
{
|
{
|
||||||
|
@ -106,6 +108,14 @@ export class SettingsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
|
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
closeIntegration() {
|
||||||
|
if ( this.xeroAccCod == '' )
|
||||||
|
this.notifierService
|
||||||
|
.showNotification("Warning: Payment confirmation disabled","Close",'success');
|
||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,6 +150,10 @@ export class SettingsComponent implements OnInit {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveAccCod() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
copyUrl() {
|
copyUrl() {
|
||||||
// console.log("Inside copyUrl()");
|
// console.log("Inside copyUrl()");
|
||||||
if (navigator.clipboard) {
|
if (navigator.clipboard) {
|
||||||
|
@ -155,6 +169,12 @@ export class SettingsComponent implements OnInit {
|
||||||
.showNotification("Functionality not available for your browser. Use send button instead.","Close",'error');
|
.showNotification("Functionality not available for your browser. Use send button instead.","Close",'error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xeroAccCodChanged( arg: any ) {
|
||||||
|
// console.log("Account Code changed: " + arg.target.value);
|
||||||
|
// console.log(arg);
|
||||||
|
this.saveAccOk = (arg.target.value !== '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue