UNPKG

@wjya/ngx-webapp-icpc.group.pms

Version:

angular webapp : icpc.group.pms

50 lines 2.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var data_source_helper_1 = require("./../service/data-source.helper"); var core_1 = require("@angular/core"); var CityPartnerComponent = /** @class */ (function () { function CityPartnerComponent(dataSourceHelper) { this.dataSourceHelper = dataSourceHelper; this.currentStep = null; this.dataSource = this.dataSourceHelper.myPartner; this.loadAll(); } CityPartnerComponent.prototype.loadAll = function () { var _this = this; this.dataSource.findList().subscribe(function (res) { _this.status = res.body; switch (res.body.auditStatus) { case 'WAIT': _this.currentStep = 1; break; case 'FAIL': _this.currentStep = 1; break; default: _this.currentStep = 0; } }, function (error) { _this.currentStep = 0; }); }; CityPartnerComponent.prototype.next = function () { this.loadAll(); // this.currentStep++; }; CityPartnerComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'zx-city-partner', template: "<div style=\"background: #eee\"><zx-header></zx-header><div class=\"main\"><zx-content-block><ng-template #content><zx-register *ngIf=\"currentStep === 0\" (next)=\"next()\"></zx-register><zx-applying *ngIf=\"currentStep === 1\" [status]=\"status\"></zx-applying></ng-template></zx-content-block></div></div>", styles: [ "\n :host zx-content-block{\n margin: 0 !important;\n min-height: calc(100vh - 112px);\n }\n :host .main{\n padding:20px;\n }\n " ] },] }, ]; /** @nocollapse */ CityPartnerComponent.ctorParameters = function () { return [ { type: data_source_helper_1.DataSourceHelper, }, ]; }; return CityPartnerComponent; }()); exports.CityPartnerComponent = CityPartnerComponent; //# sourceMappingURL=city-partner.component.js.map