Skip to content

Commit

Permalink
fix bug: no ajax request for step 1b
Browse files Browse the repository at this point in the history
  • Loading branch information
vherever committed Nov 23, 2016
1 parent c558b0b commit 960179c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion app/components/plugin.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,27 @@ export class PluginComponent implements OnInit{

onCancelInvoice() {
this._dataManager.cancelInvoiceRequest();
this.pluginConfig.view_step = '1a';
// this.pluginConfig.view_step = '1a';
}

ngOnInit() {
if('2' === this.pluginConfig.view_step) {
this.getAjaxDataForStep2();
}
if('1b' === this.pluginConfig.view_step) {
var info = {
reg_service_id: this.pluginConfig.chosen_reg_service_id,
payment_type: ''
};
if(this.pluginConfig.get_invoice) {
this._dataManager.getInvoiceRequest(info)
.then(
data => {
this.invoiceInformation = data.invoice_html;
this.pluginConfig.view_step = '1b';
}
);
}
}
}
}

0 comments on commit 960179c

Please sign in to comment.