myrtex-mf-competition 1.0.72 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +16 -0
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +13 -33
- package/src/lib/modules/competition-header/competition-header.module.ts +46 -0
- package/src/lib/modules/competition-header/components/competition-header.component.html +164 -0
- package/src/lib/modules/competition-header/components/competition-header.component.ts +584 -0
- package/src/lib/modules/competition-header/constants.ts +1 -0
- package/src/lib/modules/competition-header/directives/competition-header-custom-buttons.directive.ts +10 -0
- package/src/lib/modules/competition-header/directives/index.ts +1 -0
- package/{lib/modules/competition-header/index.d.ts → src/lib/modules/competition-header/index.ts} +1 -1
- package/src/lib/modules/competition-header/models/competition-header-version.model.ts +13 -0
- package/src/lib/modules/competition-header/models/competition-rejection.model.ts +5 -0
- package/{lib/modules/competition-header/models/competition-status.model.d.ts → src/lib/modules/competition-header/models/competition-status.model.ts} +4 -3
- package/src/lib/modules/competition-header/models/competition-version.model.ts +12 -0
- package/{lib/modules/competition-header/models/eb-links.model.d.ts → src/lib/modules/competition-header/models/eb-links.model.ts} +1 -1
- package/src/lib/modules/competition-header/services/competition-header.service.ts +47 -0
- package/src/lib/modules/competition-header/services/settings.service.ts +17 -0
- package/src/lib/modules/competition-header/store/competition-header.actions.ts +102 -0
- package/src/lib/modules/competition-header/store/competition-header.effects.ts +193 -0
- package/src/lib/modules/competition-header/store/competition-header.reducers.ts +39 -0
- package/src/lib/modules/competition-header/store/competition-header.selector.ts +45 -0
- package/src/lib/modules/competition-header/store/competition-header.state.ts +21 -0
- package/{public-api.d.ts → src/public-api.ts} +4 -0
- package/src/test.ts +27 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2020/lib/modules/competition-header/competition-header.module.mjs +0 -76
- package/esm2020/lib/modules/competition-header/components/competition-header.component.mjs +0 -495
- package/esm2020/lib/modules/competition-header/constants.mjs +0 -2
- package/esm2020/lib/modules/competition-header/directives/competition-header-custom-buttons.directive.mjs +0 -16
- package/esm2020/lib/modules/competition-header/directives/index.mjs +0 -2
- package/esm2020/lib/modules/competition-header/index.mjs +0 -5
- package/esm2020/lib/modules/competition-header/models/competition-header-version.model.mjs +0 -2
- package/esm2020/lib/modules/competition-header/models/competition-rejection.model.mjs +0 -2
- package/esm2020/lib/modules/competition-header/models/competition-status.model.mjs +0 -2
- package/esm2020/lib/modules/competition-header/models/competition-version.model.mjs +0 -2
- package/esm2020/lib/modules/competition-header/models/eb-links.model.mjs +0 -2
- package/esm2020/lib/modules/competition-header/models/index.mjs +0 -2
- package/esm2020/lib/modules/competition-header/services/competition-header.service.mjs +0 -40
- package/esm2020/lib/modules/competition-header/services/settings.service.mjs +0 -20
- package/esm2020/lib/modules/competition-header/store/competition-header.actions.mjs +0 -37
- package/esm2020/lib/modules/competition-header/store/competition-header.effects.mjs +0 -96
- package/esm2020/lib/modules/competition-header/store/competition-header.reducers.mjs +0 -31
- package/esm2020/lib/modules/competition-header/store/competition-header.selector.mjs +0 -14
- package/esm2020/lib/modules/competition-header/store/competition-header.state.mjs +0 -9
- package/esm2020/myrtex-mf-competition.mjs +0 -5
- package/esm2020/public-api.mjs +0 -6
- package/fesm2015/myrtex-mf-competition.mjs +0 -811
- package/fesm2015/myrtex-mf-competition.mjs.map +0 -1
- package/fesm2020/myrtex-mf-competition.mjs +0 -804
- package/fesm2020/myrtex-mf-competition.mjs.map +0 -1
- package/lib/modules/competition-header/competition-header.module.d.ts +0 -16
- package/lib/modules/competition-header/components/competition-header.component.d.ts +0 -89
- package/lib/modules/competition-header/constants.d.ts +0 -1
- package/lib/modules/competition-header/directives/competition-header-custom-buttons.directive.d.ts +0 -8
- package/lib/modules/competition-header/directives/index.d.ts +0 -1
- package/lib/modules/competition-header/models/competition-header-version.model.d.ts +0 -11
- package/lib/modules/competition-header/models/competition-rejection.model.d.ts +0 -5
- package/lib/modules/competition-header/models/competition-version.model.d.ts +0 -11
- package/lib/modules/competition-header/services/competition-header.service.d.ts +0 -20
- package/lib/modules/competition-header/services/settings.service.d.ts +0 -14
- package/lib/modules/competition-header/store/competition-header.actions.d.ts +0 -78
- package/lib/modules/competition-header/store/competition-header.effects.d.ts +0 -42
- package/lib/modules/competition-header/store/competition-header.reducers.d.ts +0 -3
- package/lib/modules/competition-header/store/competition-header.selector.d.ts +0 -7
- package/lib/modules/competition-header/store/competition-header.state.d.ts +0 -12
- package/myrtex-mf-competition.d.ts +0 -5
- /package/{lib/modules/competition-header/models/index.d.ts → src/lib/modules/competition-header/models/index.ts} +0 -0
|
@@ -1,811 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Injectable, EventEmitter, Component, ContentChild, Input, Output, NgModule } from '@angular/core';
|
|
3
|
-
import * as i7 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i2$1 from '@ngrx/effects';
|
|
6
|
-
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
7
|
-
import * as i2 from '@ngrx/store';
|
|
8
|
-
import { createAction, props, createFeatureSelector, createSelector, select, createReducer, on, StoreModule } from '@ngrx/store';
|
|
9
|
-
import * as i3 from 'myrtex-mf-ui-composite';
|
|
10
|
-
import { selectCompetitionIdAndVersionId, EndpointBaseService, UnSubscriber, CompetitionStatusEnum, CancelCompetitionTypeEnum, CompetitionVersionStatusEnum, CompetitionVersionStatusEnumLabel, CompetitionStatusEnumLabel, CompetitionModeEnum, selectCompetitionLabel, selectCompetitionConfig, CompetitionVersionStatusGrouppingLabel, DialogColor, DialogType, CompetitionTypeEnum, selectCompetitionId, MessageSeverity, Utilities, TenantSettingsModule, MyrtexUiComponentsModule, MyrtexMfUiCompositeModule } from 'myrtex-mf-ui-composite';
|
|
11
|
-
import * as i1$1 from 'myrtex-mf-signer';
|
|
12
|
-
import { MyrtexSignerModule } from 'myrtex-mf-signer';
|
|
13
|
-
import * as i1 from '@angular/common/http';
|
|
14
|
-
import * as i5 from '@ng-select/ng-select';
|
|
15
|
-
import { NgSelectModule } from '@ng-select/ng-select';
|
|
16
|
-
import * as i6 from 'myrta-ui';
|
|
17
|
-
import { DropdownModule } from 'myrta-ui';
|
|
18
|
-
import * as i8 from '@angular/forms';
|
|
19
|
-
import { FormsModule } from '@angular/forms';
|
|
20
|
-
import { EMPTY } from 'rxjs';
|
|
21
|
-
import { withLatestFrom, switchMap, map, catchError, tap } from 'rxjs/operators';
|
|
22
|
-
|
|
23
|
-
var ECompetitionHeaderActions;
|
|
24
|
-
(function (ECompetitionHeaderActions) {
|
|
25
|
-
ECompetitionHeaderActions["LoadCompetitionHeader"] = "[Competition] Load Header";
|
|
26
|
-
ECompetitionHeaderActions["LoadCompetitionHeaderSuccess"] = "[Competition] Load Header Success";
|
|
27
|
-
ECompetitionHeaderActions["DeleteCompetitionVersion"] = "[Competition] Delete Version";
|
|
28
|
-
ECompetitionHeaderActions["DeleteCompetitionVersionSuccess"] = "[Competition] Delete Version Success";
|
|
29
|
-
ECompetitionHeaderActions["CreateCompetitionVersion"] = "[Competition] Create Version";
|
|
30
|
-
ECompetitionHeaderActions["CreateCompetitionVersionSuccess"] = "[Competition] Create Version Success";
|
|
31
|
-
ECompetitionHeaderActions["CompetitionVersionChangeStatus"] = "[Competition] Version Change Status";
|
|
32
|
-
ECompetitionHeaderActions["CompetitionVersionChangeStatusSuccess"] = "[Competition] Version Change Status Success";
|
|
33
|
-
ECompetitionHeaderActions["CompetitionVersionChangeStatusManual"] = "[Competition] Version Change Status Manual";
|
|
34
|
-
ECompetitionHeaderActions["SelectCompetitionVersion"] = "[Competition] Select Version";
|
|
35
|
-
ECompetitionHeaderActions["ActivateCompetition"] = "[Competition] Activate";
|
|
36
|
-
ECompetitionHeaderActions["PauseCompetition"] = "[Competition] Pause";
|
|
37
|
-
ECompetitionHeaderActions["CancelCompetition"] = "[Competition] Cancel";
|
|
38
|
-
ECompetitionHeaderActions["CancelCompetitionWithValidation"] = "[Competition] Cancel With Validation";
|
|
39
|
-
ECompetitionHeaderActions["CompleteCompetition"] = "[Competition] Complete";
|
|
40
|
-
ECompetitionHeaderActions["CompetitionChangeStatusSuccess"] = "[Competition] ChangeStatus Success";
|
|
41
|
-
})(ECompetitionHeaderActions || (ECompetitionHeaderActions = {}));
|
|
42
|
-
const loadCompetitionHeader = createAction(ECompetitionHeaderActions.LoadCompetitionHeader);
|
|
43
|
-
const loadCompetitionHeaderSuccess = createAction(ECompetitionHeaderActions.LoadCompetitionHeaderSuccess, props());
|
|
44
|
-
const deleteCompetitionVersion = createAction(ECompetitionHeaderActions.DeleteCompetitionVersion, props());
|
|
45
|
-
const deleteCompetitionVersionSuccess = createAction(ECompetitionHeaderActions.DeleteCompetitionVersionSuccess, props());
|
|
46
|
-
const createCompetitionVersion = createAction(ECompetitionHeaderActions.CreateCompetitionVersion);
|
|
47
|
-
const competitionVersionChangeStatus = createAction(ECompetitionHeaderActions.CompetitionVersionChangeStatus, props());
|
|
48
|
-
const competitionVersionChangeStatusSuccess = createAction(ECompetitionHeaderActions.CompetitionVersionChangeStatusSuccess, props());
|
|
49
|
-
const competitionVersionChangeStatusManual = createAction(ECompetitionHeaderActions.CompetitionVersionChangeStatusManual, props());
|
|
50
|
-
const createCompetitionVersionSuccess = createAction(ECompetitionHeaderActions.CreateCompetitionVersionSuccess, props());
|
|
51
|
-
const selectCompetitionVersion = createAction(ECompetitionHeaderActions.SelectCompetitionVersion, props());
|
|
52
|
-
const activateCompetition = createAction(ECompetitionHeaderActions.ActivateCompetition);
|
|
53
|
-
const pauseCompetition = createAction(ECompetitionHeaderActions.PauseCompetition);
|
|
54
|
-
const cancelCompetition = createAction(ECompetitionHeaderActions.CancelCompetition);
|
|
55
|
-
const cancelCompetitionWithValidation = createAction(ECompetitionHeaderActions.CancelCompetitionWithValidation, props());
|
|
56
|
-
const completeCompetition = createAction(ECompetitionHeaderActions.CompleteCompetition);
|
|
57
|
-
const competitionChangeStatusSuccess = createAction(ECompetitionHeaderActions.CompetitionChangeStatusSuccess);
|
|
58
|
-
|
|
59
|
-
const COMPETITION_HEADER_FEATURE_NAME = 'competition-header';
|
|
60
|
-
|
|
61
|
-
const competitionVersionsFeature = createFeatureSelector(COMPETITION_HEADER_FEATURE_NAME);
|
|
62
|
-
const selectCompetitionVersions = createSelector(competitionVersionsFeature, (state) => state.competitionVersions);
|
|
63
|
-
const selectCompetitionDefaultVersionId = createSelector(competitionVersionsFeature, (state) => state.defaultVersionVersionId);
|
|
64
|
-
const selectCompetitionSelectedVersionId = createSelector(selectCompetitionIdAndVersionId, selectCompetitionDefaultVersionId, (cv, dv) => {
|
|
65
|
-
return cv.versionId ? cv.versionId : dv;
|
|
66
|
-
});
|
|
67
|
-
const selectCompetitionStatus = createSelector(competitionVersionsFeature, (state) => state.competition);
|
|
68
|
-
const selectManualVersionStatusChanged = createSelector(competitionVersionsFeature, (state) => state.manualVersionStatusChanged);
|
|
69
|
-
const selectActivityId = createSelector(competitionVersionsFeature, (state) => state.activityId);
|
|
70
|
-
const selectCompetitionType = createSelector(competitionVersionsFeature, (state) => state.type);
|
|
71
|
-
|
|
72
|
-
class CompetitionHeaderCustomButtonsDirective {
|
|
73
|
-
constructor(templateRef) {
|
|
74
|
-
this.templateRef = templateRef;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
CompetitionHeaderCustomButtonsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderCustomButtonsDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
78
|
-
CompetitionHeaderCustomButtonsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: CompetitionHeaderCustomButtonsDirective, selector: "[myCompetitionHeaderCustomButtons]", ngImport: i0 });
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderCustomButtonsDirective, decorators: [{
|
|
80
|
-
type: Directive,
|
|
81
|
-
args: [{
|
|
82
|
-
selector: '[myCompetitionHeaderCustomButtons]'
|
|
83
|
-
}]
|
|
84
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
85
|
-
|
|
86
|
-
class SettingsService extends EndpointBaseService {
|
|
87
|
-
constructor(http, injector) {
|
|
88
|
-
super(http, injector);
|
|
89
|
-
this.http = http;
|
|
90
|
-
this.injector = injector;
|
|
91
|
-
}
|
|
92
|
-
getSelelectionEditEbLinks() {
|
|
93
|
-
return this.http.get('/m-data/minfin/selection/edit/eb-links');
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SettingsService, deps: [{ token: i1.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
97
|
-
SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SettingsService });
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SettingsService, decorators: [{
|
|
99
|
-
type: Injectable
|
|
100
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Injector }]; } });
|
|
101
|
-
|
|
102
|
-
class CompetitionHeaderComponent extends UnSubscriber {
|
|
103
|
-
constructor(signService, store, alertService, settingsService) {
|
|
104
|
-
super();
|
|
105
|
-
this.signService = signService;
|
|
106
|
-
this.store = store;
|
|
107
|
-
this.alertService = alertService;
|
|
108
|
-
this.settingsService = settingsService;
|
|
109
|
-
this.canChangeStatus = true;
|
|
110
|
-
this.canCreateVersionOnActivityPeriod = true;
|
|
111
|
-
this.canValidateVersionOnActivityPeriod = true;
|
|
112
|
-
this.canActivateVersionOnActivityPeriod = true;
|
|
113
|
-
this.validateVersionAction = undefined;
|
|
114
|
-
this.validateManagementAccess = undefined;
|
|
115
|
-
this.validatePiblicationAccess = undefined;
|
|
116
|
-
this.selectedCompetitionVersionInfo = new EventEmitter();
|
|
117
|
-
this.versions = [];
|
|
118
|
-
this.selectedVersion = '';
|
|
119
|
-
this.competitionStatusEnum = CompetitionStatusEnum;
|
|
120
|
-
this.cancelCompetitionTypeEnum = CancelCompetitionTypeEnum;
|
|
121
|
-
this.competitionVersionStatusEnum = CompetitionVersionStatusEnum;
|
|
122
|
-
this.competitionLabel = '';
|
|
123
|
-
this.showCancelCompetitionButton = false;
|
|
124
|
-
this.cancelCompetitionButtonLabel = 'Отменить отбор';
|
|
125
|
-
this.showCompleteCompetitionButton = false;
|
|
126
|
-
this.restoreButtonName = 'Возобновить';
|
|
127
|
-
}
|
|
128
|
-
get competitionAggregateStatusEnumLabel() {
|
|
129
|
-
if (this.versions && this.versions.length == 1 && this.selected
|
|
130
|
-
&& this.selected.status !== CompetitionVersionStatusEnum.Active) {
|
|
131
|
-
return CompetitionVersionStatusEnumLabel[this.selected.status];
|
|
132
|
-
}
|
|
133
|
-
return this.competition ? CompetitionStatusEnumLabel[this.competition.status] : '';
|
|
134
|
-
}
|
|
135
|
-
get competitionAggregateStatusCssClass() {
|
|
136
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
137
|
-
if (this.versions && this.versions.length == 1 && this.selected
|
|
138
|
-
&& (((_a = this.competition) === null || _a === void 0 ? void 0 : _a.status) || CompetitionStatusEnum.New) <= CompetitionStatusEnum.Active) {
|
|
139
|
-
return {
|
|
140
|
-
'': ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.status) !== CompetitionVersionStatusEnum.Active,
|
|
141
|
-
'color-green': ((_c = this.selected) === null || _c === void 0 ? void 0 : _c.status) === CompetitionVersionStatusEnum.Active,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
'': ((_d = this.competition) === null || _d === void 0 ? void 0 : _d.status) === CompetitionStatusEnum.New
|
|
146
|
-
|| ((_e = this.competition) === null || _e === void 0 ? void 0 : _e.status) !== CompetitionStatusEnum.Completed,
|
|
147
|
-
'color-green': ((_f = this.competition) === null || _f === void 0 ? void 0 : _f.status) === CompetitionStatusEnum.Active,
|
|
148
|
-
'color-orange': ((_g = this.competition) === null || _g === void 0 ? void 0 : _g.status) === CompetitionStatusEnum.Staying,
|
|
149
|
-
'color-red': ((_h = this.competition) === null || _h === void 0 ? void 0 : _h.status) === CompetitionStatusEnum.Canceled
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
get canCreateVersion() {
|
|
153
|
-
var _a, _b;
|
|
154
|
-
if (!this.canCreateVersionOnActivityPeriod) {
|
|
155
|
-
return false;
|
|
156
|
-
}
|
|
157
|
-
if (this.validateManagementAccess === undefined) {
|
|
158
|
-
return this.isLastVersion && ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.status) === CompetitionVersionStatusEnum.Active &&
|
|
159
|
-
this.competition !== undefined && this.competition.mode > CompetitionModeEnum.Base
|
|
160
|
-
&& (this.competition.status === CompetitionStatusEnum.Active ||
|
|
161
|
-
this.competition.status === CompetitionStatusEnum.Staying);
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
return this.isLastVersion && ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.status) === CompetitionVersionStatusEnum.Active &&
|
|
165
|
-
this.competition !== undefined && this.competition.mode > CompetitionModeEnum.Base
|
|
166
|
-
&& (this.competition.status === CompetitionStatusEnum.Active ||
|
|
167
|
-
this.competition.status === CompetitionStatusEnum.Staying) &&
|
|
168
|
-
this.validateManagementAccess();
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
get canDeleteVersion() {
|
|
172
|
-
var _a, _b;
|
|
173
|
-
if (this.validateManagementAccess === undefined) {
|
|
174
|
-
return ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.status) === this.competitionVersionStatusEnum.Draft
|
|
175
|
-
&& this.versions
|
|
176
|
-
&& this.versions.length > 1;
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
return ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.status) === this.competitionVersionStatusEnum.Draft
|
|
180
|
-
&& this.versions
|
|
181
|
-
&& this.versions.length > 1
|
|
182
|
-
&& this.validateManagementAccess();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
get canActivateVersion() {
|
|
186
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
187
|
-
if (!this.canActivateVersionOnActivityPeriod) {
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
if (this.validatePiblicationAccess === undefined) {
|
|
191
|
-
return (((_a = this.selected) === null || _a === void 0 ? void 0 : _a.status) === CompetitionVersionStatusEnum.Draft &&
|
|
192
|
-
((_b = this.competition) === null || _b === void 0 ? void 0 : _b.mode) !== CompetitionModeEnum.VersionedExtended) ||
|
|
193
|
-
((((_c = this.selected) === null || _c === void 0 ? void 0 : _c.status) === CompetitionVersionStatusEnum.Confirmed ||
|
|
194
|
-
((_d = this.selected) === null || _d === void 0 ? void 0 : _d.status) === CompetitionVersionStatusEnum.Validation) &&
|
|
195
|
-
((_e = this.competition) === null || _e === void 0 ? void 0 : _e.mode) === CompetitionModeEnum.VersionedExtended);
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
return (((_f = this.selected) === null || _f === void 0 ? void 0 : _f.status) === CompetitionVersionStatusEnum.Draft &&
|
|
199
|
-
((_g = this.competition) === null || _g === void 0 ? void 0 : _g.mode) !== CompetitionModeEnum.VersionedExtended) ||
|
|
200
|
-
((((_h = this.selected) === null || _h === void 0 ? void 0 : _h.status) === CompetitionVersionStatusEnum.Confirmed ||
|
|
201
|
-
((_j = this.selected) === null || _j === void 0 ? void 0 : _j.status) === CompetitionVersionStatusEnum.Validation) &&
|
|
202
|
-
((_k = this.competition) === null || _k === void 0 ? void 0 : _k.mode) === CompetitionModeEnum.VersionedExtended) &&
|
|
203
|
-
this.validatePiblicationAccess();
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
get activateVersionDisabled() {
|
|
207
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
208
|
-
if (this.validatePiblicationAccess === undefined) {
|
|
209
|
-
return (!this.canChangeStatus ||
|
|
210
|
-
((((_a = this.selected) === null || _a === void 0 ? void 0 : _a.status) !== CompetitionVersionStatusEnum.Draft &&
|
|
211
|
-
((_b = this.competition) === null || _b === void 0 ? void 0 : _b.mode) !== CompetitionModeEnum.VersionedExtended) ||
|
|
212
|
-
(((_c = this.selected) === null || _c === void 0 ? void 0 : _c.status) !== CompetitionVersionStatusEnum.Confirmed &&
|
|
213
|
-
((_d = this.competition) === null || _d === void 0 ? void 0 : _d.mode) === CompetitionModeEnum.VersionedExtended)));
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
return (!this.canChangeStatus ||
|
|
217
|
-
((((_e = this.selected) === null || _e === void 0 ? void 0 : _e.status) !== CompetitionVersionStatusEnum.Draft &&
|
|
218
|
-
((_f = this.competition) === null || _f === void 0 ? void 0 : _f.mode) !== CompetitionModeEnum.VersionedExtended) ||
|
|
219
|
-
(((_g = this.selected) === null || _g === void 0 ? void 0 : _g.status) !== CompetitionVersionStatusEnum.Confirmed &&
|
|
220
|
-
((_h = this.competition) === null || _h === void 0 ? void 0 : _h.mode) === CompetitionModeEnum.VersionedExtended))) &&
|
|
221
|
-
this.validatePiblicationAccess();
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
get validateVersionDisabled() {
|
|
225
|
-
if (this.validatePiblicationAccess === undefined) {
|
|
226
|
-
return !this.canChangeStatus;
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
return !this.canChangeStatus && !!this.validatePiblicationAccess();
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
get createVersionDisabled() {
|
|
233
|
-
if (this.validateManagementAccess === undefined) {
|
|
234
|
-
return !this.canChangeStatus;
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
const validationRes = this.validateManagementAccess();
|
|
238
|
-
return !this.canChangeStatus && validationRes;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
get backToEditDisabled() {
|
|
242
|
-
if (this.validateManagementAccess === undefined) {
|
|
243
|
-
return !this.canChangeStatus;
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
const validationRes = this.validateManagementAccess();
|
|
247
|
-
return !this.canChangeStatus && validationRes;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
get canValidateVersion() {
|
|
251
|
-
var _a, _b, _c, _d, _e, _f;
|
|
252
|
-
if (!this.canValidateVersionOnActivityPeriod) {
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
if (this.validatePiblicationAccess === undefined) {
|
|
256
|
-
return ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.status) === CompetitionVersionStatusEnum.Draft &&
|
|
257
|
-
((_b = this.competition) === null || _b === void 0 ? void 0 : _b.mode) === CompetitionModeEnum.VersionedExtended &&
|
|
258
|
-
((_c = this.competition) === null || _c === void 0 ? void 0 : _c.status) !== CompetitionStatusEnum.Canceled;
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
return ((_d = this.selected) === null || _d === void 0 ? void 0 : _d.status) === CompetitionVersionStatusEnum.Draft &&
|
|
262
|
-
((_e = this.competition) === null || _e === void 0 ? void 0 : _e.mode) === CompetitionModeEnum.VersionedExtended &&
|
|
263
|
-
this.validatePiblicationAccess() &&
|
|
264
|
-
((_f = this.competition) === null || _f === void 0 ? void 0 : _f.status) !== CompetitionStatusEnum.Canceled;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
get isLastVersion() {
|
|
268
|
-
var _a, _b;
|
|
269
|
-
if (((_a = this.versions) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
270
|
-
const m = Math.max(...this.versions.map(x => x.num));
|
|
271
|
-
return m === ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.num);
|
|
272
|
-
}
|
|
273
|
-
return false;
|
|
274
|
-
}
|
|
275
|
-
get showRejectionReason() {
|
|
276
|
-
var _a, _b, _c;
|
|
277
|
-
return !!((_a = this.selected) === null || _a === void 0 ? void 0 : _a.rejectionReason) &&
|
|
278
|
-
(((_b = this.selected) === null || _b === void 0 ? void 0 : _b.status) === CompetitionVersionStatusEnum.Draft
|
|
279
|
-
|| ((_c = this.selected) === null || _c === void 0 ? void 0 : _c.status) === CompetitionVersionStatusEnum.Rejected);
|
|
280
|
-
}
|
|
281
|
-
get versionStatusClass() {
|
|
282
|
-
var _a, _b;
|
|
283
|
-
return {
|
|
284
|
-
'': ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.status) !== CompetitionVersionStatusEnum.Active,
|
|
285
|
-
'color-green': ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.status) === CompetitionVersionStatusEnum.Active
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
/** Контекст для кастомных кнопок, может расширяться */
|
|
289
|
-
get customButtonsTemplateContext() {
|
|
290
|
-
var _a, _b;
|
|
291
|
-
return {
|
|
292
|
-
activityId: this._activityId,
|
|
293
|
-
competitionId: (_a = this.competition) === null || _a === void 0 ? void 0 : _a.id,
|
|
294
|
-
competitionVersionId: (_b = this.selected) === null || _b === void 0 ? void 0 : _b.id
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
get canReturnToEdit() {
|
|
298
|
-
var _a, _b;
|
|
299
|
-
if (this.validateManagementAccess === undefined) {
|
|
300
|
-
return ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.status) === CompetitionVersionStatusEnum.Rejected;
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
return ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.status) === CompetitionVersionStatusEnum.Rejected && this.validateManagementAccess();
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
get canManageCompetition() {
|
|
307
|
-
var _a, _b, _c;
|
|
308
|
-
if (this.validateManagementAccess === undefined) {
|
|
309
|
-
return false;
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
return this.validateManagementAccess() &&
|
|
313
|
-
((_a = this.competition) === null || _a === void 0 ? void 0 : _a.status) != this.competitionStatusEnum.New &&
|
|
314
|
-
((_b = this.competition) === null || _b === void 0 ? void 0 : _b.status) != this.competitionStatusEnum.Completed &&
|
|
315
|
-
((_c = this.competition) === null || _c === void 0 ? void 0 : _c.status) != this.competitionStatusEnum.NotPlace;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
get showEbLink() {
|
|
319
|
-
return this.competition != undefined &&
|
|
320
|
-
this.versions.some(x => x.status != CompetitionVersionStatusEnum.Draft);
|
|
321
|
-
}
|
|
322
|
-
get canCompleteCompetition() {
|
|
323
|
-
return this.competition != undefined &&
|
|
324
|
-
(this.competition.status == CompetitionStatusEnum.Active ||
|
|
325
|
-
this.competition.status == CompetitionStatusEnum.Staying)
|
|
326
|
-
&& this.showCompleteCompetitionButton;
|
|
327
|
-
}
|
|
328
|
-
get canCancelCompetition() {
|
|
329
|
-
return this.competition != undefined &&
|
|
330
|
-
(this.competition.status == CompetitionStatusEnum.Active ||
|
|
331
|
-
this.competition.status == CompetitionStatusEnum.Staying ||
|
|
332
|
-
this.competition.status == CompetitionStatusEnum.Canceled)
|
|
333
|
-
&& this.showCancelCompetitionButton;
|
|
334
|
-
}
|
|
335
|
-
ngOnInit() {
|
|
336
|
-
this.store.dispatch(loadCompetitionHeader());
|
|
337
|
-
this.appendSubscription(this.store.pipe(select(selectCompetitionVersions)).subscribe(result => {
|
|
338
|
-
if (result) {
|
|
339
|
-
this.versions = result;
|
|
340
|
-
this.select();
|
|
341
|
-
}
|
|
342
|
-
}));
|
|
343
|
-
this.appendSubscription(this.store.pipe(select(selectCompetitionSelectedVersionId)).subscribe(result => {
|
|
344
|
-
if (result) {
|
|
345
|
-
this.selectedVersion = result;
|
|
346
|
-
this.select();
|
|
347
|
-
}
|
|
348
|
-
}));
|
|
349
|
-
this.appendSubscription(this.store.pipe(select(selectCompetitionStatus)).subscribe(result => {
|
|
350
|
-
if (result) {
|
|
351
|
-
this.competition = result;
|
|
352
|
-
}
|
|
353
|
-
}));
|
|
354
|
-
this.appendSubscription(this.store.pipe(select(selectCompetitionType)).subscribe(result => {
|
|
355
|
-
if (result !== null && result !== undefined) {
|
|
356
|
-
this._competitionType = result;
|
|
357
|
-
}
|
|
358
|
-
}));
|
|
359
|
-
this.appendSubscription(this.store.pipe(select(selectCompetitionLabel)).subscribe(result => {
|
|
360
|
-
this.competitionLabel = result;
|
|
361
|
-
}));
|
|
362
|
-
this.appendSubscription(this.store.pipe(select(selectActivityId)).subscribe(result => {
|
|
363
|
-
this._activityId = result;
|
|
364
|
-
}));
|
|
365
|
-
this.appendSubscription(this.store.pipe(select(selectCompetitionConfig)).subscribe(result => {
|
|
366
|
-
if (result) {
|
|
367
|
-
this.competitionConfig = result;
|
|
368
|
-
if (this.competitionConfig.cancelCompetitionLabel) {
|
|
369
|
-
this.cancelCompetitionButtonLabel = this.competitionConfig.cancelCompetitionLabel;
|
|
370
|
-
}
|
|
371
|
-
if (this.competitionConfig.cancelCompetitionType
|
|
372
|
-
&& this.competitionConfig.cancelCompetitionType > this.cancelCompetitionTypeEnum.Disabled) {
|
|
373
|
-
this.showCancelCompetitionButton = true;
|
|
374
|
-
}
|
|
375
|
-
this.showCompleteCompetitionButton = this.competitionConfig.showCompleteCompetitionButton;
|
|
376
|
-
if (this.competitionConfig.restoreButtonName) {
|
|
377
|
-
this.restoreButtonName = this.competitionConfig.restoreButtonName;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}));
|
|
381
|
-
this.appendSubscription(this.store.pipe(select(selectManualVersionStatusChanged)).subscribe(result => {
|
|
382
|
-
// произошло ручное изменение статуса, толкаем дальше по таймауту
|
|
383
|
-
if (result) {
|
|
384
|
-
setTimeout(() => {
|
|
385
|
-
const selectedItem = this.selected;
|
|
386
|
-
if (selectedItem) {
|
|
387
|
-
this.store.dispatch(competitionVersionChangeStatus({
|
|
388
|
-
versionId: selectedItem.id,
|
|
389
|
-
status: CompetitionVersionStatusEnum.Confirmed
|
|
390
|
-
}));
|
|
391
|
-
}
|
|
392
|
-
}, 10000);
|
|
393
|
-
}
|
|
394
|
-
}));
|
|
395
|
-
this.settingsService.getSelelectionEditEbLinks().subscribe(res => {
|
|
396
|
-
this._ebLinksModel = res;
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
ngOnDestroy() {
|
|
400
|
-
super.ngOnDestroy();
|
|
401
|
-
}
|
|
402
|
-
getCompetitionVersionStatusEnumLabel(value) {
|
|
403
|
-
return CompetitionVersionStatusEnumLabel[value];
|
|
404
|
-
}
|
|
405
|
-
getCompetitionVersionStatusGrouppingLabel(value) {
|
|
406
|
-
return CompetitionVersionStatusGrouppingLabel[value];
|
|
407
|
-
}
|
|
408
|
-
createVersion() {
|
|
409
|
-
this.alertService.showDialog({
|
|
410
|
-
title: `Формирование изменений`,
|
|
411
|
-
message: `${this.getWarningMessageHtml('Внимание! Формирование изменений приведет к созданию новой версии отбора')}
|
|
412
|
-
<p>
|
|
413
|
-
Вы действительно хотите сформировать изменения?
|
|
414
|
-
</p>`,
|
|
415
|
-
color: DialogColor.yellow,
|
|
416
|
-
type: DialogType.confirm,
|
|
417
|
-
okLabel: 'Подтвердить',
|
|
418
|
-
cancelLabel: 'Отменить',
|
|
419
|
-
okCallback: () => {
|
|
420
|
-
this.store.dispatch(createCompetitionVersion());
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
activateVersion() {
|
|
425
|
-
if (this.selected) {
|
|
426
|
-
const selectedItem = this.selected;
|
|
427
|
-
this.alertService.showDialog({
|
|
428
|
-
title: `Публикация ${this.competitionLabel}а`,
|
|
429
|
-
message: `${this.getWarningMessageHtml()}
|
|
430
|
-
<p>
|
|
431
|
-
Вы действительно хотите опубликовать ${this.competitionLabel}?
|
|
432
|
-
</p>`,
|
|
433
|
-
color: DialogColor.yellow,
|
|
434
|
-
type: DialogType.confirm,
|
|
435
|
-
okLabel: 'Подтвердить',
|
|
436
|
-
cancelLabel: 'Отменить',
|
|
437
|
-
okCallback: () => {
|
|
438
|
-
this.store.dispatch(competitionVersionChangeStatus({
|
|
439
|
-
versionId: selectedItem.id,
|
|
440
|
-
status: CompetitionVersionStatusEnum.Active
|
|
441
|
-
}));
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
validateVersion() {
|
|
447
|
-
if (this.selected) {
|
|
448
|
-
const selectedItem = this.selected;
|
|
449
|
-
if (this.validateVersionAction) {
|
|
450
|
-
this.validateVersionAction(selectedItem.id, () => {
|
|
451
|
-
this.signService.sign({
|
|
452
|
-
title: 'Направление документа на согласование',
|
|
453
|
-
okLabel: 'Отправить',
|
|
454
|
-
cancelLabel: 'Отменить',
|
|
455
|
-
pdfUrl: `/m-data/minfin/pdf-competition/${selectedItem.id}`,
|
|
456
|
-
xmlUrl: `/m-data/minfin/xml-competition/${selectedItem.id}`,
|
|
457
|
-
provider: 'empty'
|
|
458
|
-
}, () => {
|
|
459
|
-
this.store.dispatch(competitionVersionChangeStatus({
|
|
460
|
-
versionId: selectedItem.id,
|
|
461
|
-
status: CompetitionVersionStatusEnum.Validation
|
|
462
|
-
}));
|
|
463
|
-
}, () => {
|
|
464
|
-
});
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
removeVersion() {
|
|
470
|
-
var _a;
|
|
471
|
-
if (this.selected) {
|
|
472
|
-
const selectedItem = this.selected;
|
|
473
|
-
this.alertService.showDialog(`Удалить версию ${this.competitionLabel}а?`, `${this.getWarningMessageHtml()}
|
|
474
|
-
<p>
|
|
475
|
-
Вы действительно хотите удалить версию ${(_a = this.competitionLabel) === null || _a === void 0 ? void 0 : _a.toLowerCase()}а?
|
|
476
|
-
</p>`, DialogType.confirm, (ok) => {
|
|
477
|
-
this.store.dispatch(deleteCompetitionVersion({ versionId: selectedItem.id }));
|
|
478
|
-
}, undefined, null, undefined, undefined, DialogColor.red);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
restore() {
|
|
482
|
-
this.alertService.showDialog(`Возобновить ${this.competitionLabel}?`, null, DialogType.confirm, (ok) => {
|
|
483
|
-
this.store.dispatch(activateCompetition());
|
|
484
|
-
});
|
|
485
|
-
}
|
|
486
|
-
pause() {
|
|
487
|
-
this.alertService.showDialog(`Приостановить ${this.competitionLabel}?`, null, DialogType.confirm, (ok) => {
|
|
488
|
-
this.store.dispatch(pauseCompetition());
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
cancel() {
|
|
492
|
-
if (this.competitionConfig && this.competitionConfig.cancelCompetitionType == this.cancelCompetitionTypeEnum.WithValidation) {
|
|
493
|
-
if (this.selected) {
|
|
494
|
-
const selectedItem = this.selected;
|
|
495
|
-
this.store.dispatch(cancelCompetitionWithValidation({ versionId: selectedItem.id }));
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
this.alertService.showDialog(`Отменить ${this.competitionLabel}?`, null, DialogType.confirm, (ok) => {
|
|
500
|
-
this.store.dispatch(cancelCompetition());
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
complete() {
|
|
505
|
-
this.alertService.showDialog(`Завершить ${this.competitionLabel}?`, null, DialogType.confirm, (ok) => {
|
|
506
|
-
this.store.dispatch(completeCompetition());
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
selectVersion(id) {
|
|
510
|
-
this.store.dispatch(selectCompetitionVersion({ versionId: id }));
|
|
511
|
-
}
|
|
512
|
-
backToEdit() {
|
|
513
|
-
this.alertService.showDialog(`редактирование текущей версии`, `Вы действительно хотите редактировать текущую версию ${this.competitionLabel.toLowerCase()}a`, DialogType.confirm, (ok) => {
|
|
514
|
-
if (!!this.selected) {
|
|
515
|
-
this.store.dispatch(competitionVersionChangeStatus({
|
|
516
|
-
versionId: this.selected.id,
|
|
517
|
-
status: CompetitionVersionStatusEnum.Draft
|
|
518
|
-
}));
|
|
519
|
-
}
|
|
520
|
-
}, undefined, null, 'Подтвердить', undefined, DialogColor.yellow);
|
|
521
|
-
}
|
|
522
|
-
showRejection(model) {
|
|
523
|
-
this.alertService.showDialog(`Причина отклонения`, ` <div class="modal-body__author">
|
|
524
|
-
<span>${model.author}</span>
|
|
525
|
-
<span>${model.createdDate}</span>
|
|
526
|
-
</div>
|
|
527
|
-
<p class="modal-body__text">${model.reason}</p>
|
|
528
|
-
`, DialogType.confirm, undefined, undefined, null, undefined, '', DialogColor.yellow);
|
|
529
|
-
}
|
|
530
|
-
redirectToEb() {
|
|
531
|
-
if (this.competition != undefined && this._competitionType != undefined && this._ebLinksModel != undefined) {
|
|
532
|
-
let link = '';
|
|
533
|
-
if (this._competitionType == CompetitionTypeEnum.SocialOrder) {
|
|
534
|
-
link = `${this._ebLinksModel.socialOrder}/#SocialOrderAgreement`;
|
|
535
|
-
}
|
|
536
|
-
else if (this._competitionType == CompetitionTypeEnum.Region) {
|
|
537
|
-
link = `${this._ebLinksModel.subsidy}/#AgreementSubsidyNonFederal`;
|
|
538
|
-
}
|
|
539
|
-
else {
|
|
540
|
-
link = `${this._ebLinksModel.subsidy}/#AgreementSubsidyRegistry`;
|
|
541
|
-
}
|
|
542
|
-
window.open(link, '_blank');
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
select() {
|
|
546
|
-
if (this.versions && this.selectedVersion) {
|
|
547
|
-
this.selected = this.versions.find(s => s.id === this.selectedVersion);
|
|
548
|
-
this.selectedCompetitionVersionInfo.emit(this.selected);
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
getWarningMessageHtml(customText = undefined) {
|
|
552
|
-
if (!customText) {
|
|
553
|
-
customText = 'Внимание! Данное действие нельзя отменить';
|
|
554
|
-
}
|
|
555
|
-
return `<div class="bg-news px-3 py-2 radius-4 my-3 d-flex">
|
|
556
|
-
<div class="mr-3">
|
|
557
|
-
<svg width="16" height="16" fill="none">
|
|
558
|
-
<use href="#alert"></use>
|
|
559
|
-
</svg>
|
|
560
|
-
</div>
|
|
561
|
-
<div class="small m-0 bold">
|
|
562
|
-
<span class="color-orange">
|
|
563
|
-
${customText}
|
|
564
|
-
</span>
|
|
565
|
-
</div>
|
|
566
|
-
</div>`;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
CompetitionHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderComponent, deps: [{ token: i1$1.SignService }, { token: i2.Store }, { token: i3.AlertService }, { token: SettingsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
570
|
-
CompetitionHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CompetitionHeaderComponent, selector: "mrx-competition-header", inputs: { canChangeStatus: "canChangeStatus", canCreateVersionOnActivityPeriod: "canCreateVersionOnActivityPeriod", canValidateVersionOnActivityPeriod: "canValidateVersionOnActivityPeriod", canActivateVersionOnActivityPeriod: "canActivateVersionOnActivityPeriod", validateVersionAction: "validateVersionAction", validateManagementAccess: "validateManagementAccess", validatePiblicationAccess: "validatePiblicationAccess" }, outputs: { selectedCompetitionVersionInfo: "selectedCompetitionVersionInfo" }, queries: [{ propertyName: "customButtonsTemplate", first: true, predicate: CompetitionHeaderCustomButtonsDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"info-banner\" *ngIf=\"selected\">\r\n <div class=\"info-banner-body\">\r\n <div class=\"info-banner-block\">\r\n <!-- \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <div class=\"info-banner-item wpx-160 mr-3\">\r\n <!-- \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u0438, \u043B\u0438\u0431\u043E \"\u0421\u0443\u0431\u0441\u0438\u0434\u0438\u044F\" \u043B\u0438\u0431\u043E \"\u041E\u0442\u0431\u043E\u0440\" -->\r\n <span class=\"info-banner-item__title\" myCompetitionLabel>\r\n\r\n </span>\r\n <!-- \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <!-- \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0442\u044C \u0434\u043B\u0438\u043D\u0443 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0432 44 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 -->\r\n <!-- \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0432 \u0442\u0443\u043B\u0442\u0438\u043F \u043F\u043E\u043B\u043D\u043E\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <span class=\"info-banner-item__text text-normal\" myTooltip [tooltip]=\"selected.name\" [tooltipMaxWidth]=\"320\">\r\n {{ selected.shortName ? selected.shortName : '\u041D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D' }}\r\n </span>\r\n </div>\r\n <!-- \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <div class=\"info-banner-item wpx-110\">\r\n <span class=\"info-banner-item__title\">\r\n \u0421\u0442\u0430\u0442\u0443\u0441\r\n </span>\r\n <!-- \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <!-- \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u0446\u0432\u0435\u0442\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u043A\u043B\u0430\u0441\u0441\u044B: \u043E\u0440\u0430\u043D\u0436\u0435\u0432\u044B\u0439 - \"color-orange\", \u0437\u0435\u043B\u0435\u043D\u044B\u0439 - \"color-green\" -->\r\n <span class=\"info-banner-item__text\" [ngClass]=\"competitionAggregateStatusCssClass\">\r\n {{ competitionAggregateStatusEnumLabel }}\r\n </span>\r\n </div>\r\n </div>\r\n <!-- \u0441\u0435\u043B\u0435\u043A\u0442 \u0441 \u0432\u044B\u0431\u043E\u0440\u043E\u043C \u0432\u0435\u0440\u0441\u0438\u0438 -->\r\n <div class=\"info-banner-item info-banner-item_input wpx-260 mr-3\" *ngIf=\"versions && versions.length > 1\">\r\n <div class=\"inputbox inputbox-md mb-0\">\r\n <ng-select [items]=\"versions\" [ngModel]=\"selected.id\"\r\n (ngModelChange)=\"selectVersion($event)\"\r\n [clearable]=\"false\"\r\n bindValue=\"id\"\r\n bindLabel=\"name\"\r\n groupBy=\"status\"\r\n notFoundText=\"\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E\">\r\n <ng-template ng-optgroup-tmp let-item=\"item\" let-index=\"index\">\r\n {{getCompetitionVersionStatusGrouppingLabel(item.status)}}\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\r\n \u0412\u0435\u0440\u0441\u0438\u044F {{item.num}} \u043E\u0442 {{item.createdDate}}\r\n </ng-template>\r\n <ng-template ng-label-tmp let-item=\"item\">\r\n \u0412\u0435\u0440\u0441\u0438\u044F {{item.num}} \u043E\u0442 {{item.createdDate}}\r\n </ng-template>\r\n </ng-select>\r\n </div>\r\n </div>\r\n <!-- \u0441\u0442\u0430\u0442\u0430\u0443\u0441 \u0432\u0435\u0440\u0441\u0438\u0438 -->\r\n <!-- \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C, \u0435\u0441\u043B\u0438 \u043D\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u0439 -->\r\n <div class=\"info-banner-item wpx-110\" *ngIf=\"versions && versions.length > 1\">\r\n <span class=\"info-banner-item__title\">\r\n \u0421\u0442\u0430\u0442\u0443\u0441 \u0432\u0435\u0440\u0441\u0438\u0438\r\n </span>\r\n <!-- \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u0435\u0440\u0441\u0438\u0438 -->\r\n <!-- \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u0446\u0432\u0435\u0442\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u043A\u043B\u0430\u0441\u0441\u044B: \u043E\u0440\u0430\u043D\u0436\u0435\u0432\u044B\u0439 - \"color-orange\", \u0437\u0435\u043B\u0435\u043D\u044B\u0439 - \"color-green\" -->\r\n <span class=\"info-banner-item__text\" *ngIf=\"selected\" [ngClass]=\"versionStatusClass\">\r\n {{ getCompetitionVersionStatusEnumLabel(selected.status) }}\r\n </span>\r\n </div>\r\n <!-- \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435, \u0432\u044B\u0437\u043E\u0432 \u043C\u043E\u0434\u0430\u043B\u043A\u0438, \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u043E\u0431 \u0432\u043D\u0435\u0441\u0435\u043D\u0438\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 -->\r\n <div class=\"info-banner-item\">\r\n <!-- \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C, \u0435\u0441\u043B\u0438 \u043D\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F -->\r\n <!-- \"\u043A\u043E\u043D\u0432\u0435\u0440\u0442\" -->\r\n <div class=\"info-banner-item__icon\" *ngIf=\"showRejectionReason\"\r\n myTooltip\r\n [tooltip]=\"'\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043F\u0440\u0438\u0447\u0438\u043D\u0443 \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F'\"\r\n (click)=\"showRejection(selected.rejectionReason)\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"6\" width=\"18\" height=\"12\" rx=\"1\" stroke=\"#282828\" stroke-width=\"1.5\"/>\r\n <path d=\"M3 6.25L11.3356 13.6595C11.7145 13.9962 12.2855 13.9962 12.6644 13.6595L21 6.25\" stroke=\"#282828\" stroke-width=\"1.5\"/>\r\n <path d=\"M3 18L7.5 14L9.75 12M21 18L16.5 14L14.25 12\" stroke=\"#282828\" stroke-width=\"1.5\"/>\r\n </svg>\r\n </div>\r\n <!-- \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 -->\r\n <div *ngIf=\"canDeleteVersion\" (click)=\"removeVersion()\" class=\"info-banner-item__icon\" myTooltip [tooltip]=\"'\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0435\u0440\u0441\u0438\u044E'\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3 6H5H21\" stroke=\"#D14114\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n <path d=\"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z\" stroke=\"#D14114\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n <path d=\"M10 11V17\" stroke=\"#D14114\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n <path d=\"M14 11V17\" stroke=\"#D14114\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <!-- \u0432\u043E\u0441\u043A\u043B\u0438\u0446\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0437\u043D\u0430\u043A -->\r\n <div *ngIf=\"!isLastVersion\" class=\"info-banner-item__icon\" myTooltip [tooltip]=\"'\u0412\u043D\u0435\u0441\u0435\u043D\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438'\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M12.2302 18V17M12.2302 14V10M4.00298 21.25H20.4575C21.9971 21.25 22.9593 19.5833 22.1895 18.25L13.9623 4C13.1925 2.66667 11.268 2.66667 10.4982 4L2.27093 18.25C1.50113 19.5833 2.46338 21.25 4.00298 21.25Z\" stroke=\"#D57B1C\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"info-banner-control\">\r\n <div *ngIf=\"!!customButtonsTemplate\">\r\n <ng-container *ngTemplateOutlet=\"customButtonsTemplate.templateRef;context:customButtonsTemplateContext\"></ng-container>\r\n </div>\r\n <button class=\"btn btn-md green\"\r\n (click)=\"createVersion()\"\r\n *ngIf=\"canCreateVersion\"\r\n [disabled]=\"createVersionDisabled\">\r\n \u0421\u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F\r\n </button>\r\n <button class=\"btn btn-md green\"\r\n (click)=\"activateVersion()\"\r\n *ngIf=\"canActivateVersion\"\r\n [disabled]=\"activateVersionDisabled\">\r\n \u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C\r\n </button>\r\n <button class=\"btn btn-md\"\r\n (click)=\"validateVersion()\"\r\n *ngIf=\"canValidateVersion\"\r\n [disabled]=\"validateVersionDisabled\">\r\n \u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435\r\n </button>\r\n <button *ngIf=\"canReturnToEdit\" class=\"btn btn-md\"\r\n (click)=\"backToEdit()\"\r\n [disabled]=\"backToEditDisabled\">\r\n \u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C\r\n </button>\r\n <!-- \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u043C/\u043E\u0442\u0431\u043E\u0440\u043E\u043C -->\r\n <!-- \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0435\u0441\u043B\u0438 \u043D\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F -->\r\n <div class=\"info-banner-control__action\"\r\n *ngIf=\"competition && showEbLink\">\r\n <mrx-dropdown [mainPlacement]=\"'bottom-end'\" [fallbackPlacements]=\"['top-end']\">\r\n <ng-template #dropdownToggle>\r\n <span class=\"mrx-icon icon-more-vertical icon-font-24\"></span>\r\n </ng-template>\r\n <ng-template #dropdownMenu>\r\n <button mrxHideAfterClick (click)=\"redirectToEb()\">\r\n <span class=\"mrx-icon icon-link icon-font-24 mr-2\"></span>\r\n <span>\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043F\u043E\u0434\u0441\u0438\u0441\u0442\u0435\u043C\u0443 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0433\u043E \u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0413\u0418\u0418\u0421 \u00AB\u042D\u0411\u00BB</span>\r\n </button>\r\n\r\n <button mrxHideAfterClick (click)=\"pause()\"\r\n *ngIf=\"competition.status == competitionStatusEnum.Active && canManageCompetition\">\r\n <span class=\"mrx-icon icon-pause-filled icon-font-24 mr-2\"></span>\r\n <span>\u041F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C</span>\r\n </button>\r\n\r\n <button mrxHideAfterClick (click)=\"restore()\"\r\n *ngIf=\"competition.status == competitionStatusEnum.Staying && canManageCompetition\">\r\n <span class=\"mrx-icon icon-play-filled icon-font-24 mr-2\"></span>\r\n <span>{{restoreButtonName}}</span>\r\n </button>\r\n\r\n <button mrxHideAfterClick \r\n *ngIf=\"canCompleteCompetition && canManageCompetition\"\r\n (click)=\"complete()\">\r\n <span class=\"mrx-icon icon-stop-filled icon-font-24 mr-2\"></span>\r\n <span>\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C</span>\r\n </button>\r\n\r\n <button mrxHideAfterClick \r\n *ngIf=\"canCancelCompetition && canManageCompetition\"\r\n (click)=\"cancel()\">\r\n <span class=\"mrx-icon icon-close icon-font-24 mr-2\"></span>\r\n <span>{{cancelCompetitionButtonLabel}}</span>\r\n </button>\r\n </ng-template>\r\n </mrx-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", components: [{ type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: i6.DropdownComponent, selector: "mrx-dropdown", inputs: ["mainPlacement", "fallbackPlacements", "closeOnClick", "customClasses"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.CompetitionLabelDirective, selector: "[myCompetitionLabel]" }, { type: i3.TooltipDirective, selector: "[myTooltip]", inputs: ["tooltip", "tooltipPosition", "tooltipMinWidth", "tooltipMaxWidth", "tooltipInteractive", "tooltipActive"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.NgOptgroupTemplateDirective, selector: "[ng-optgroup-tmp]" }, { type: i5.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { type: i5.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.HideAfterClickDirective, selector: "[mrxHideAfterClick]" }] });
|
|
571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderComponent, decorators: [{
|
|
572
|
-
type: Component,
|
|
573
|
-
args: [{ selector: 'mrx-competition-header', template: "<div class=\"info-banner\" *ngIf=\"selected\">\r\n <div class=\"info-banner-body\">\r\n <div class=\"info-banner-block\">\r\n <!-- \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <div class=\"info-banner-item wpx-160 mr-3\">\r\n <!-- \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u0438, \u043B\u0438\u0431\u043E \"\u0421\u0443\u0431\u0441\u0438\u0434\u0438\u044F\" \u043B\u0438\u0431\u043E \"\u041E\u0442\u0431\u043E\u0440\" -->\r\n <span class=\"info-banner-item__title\" myCompetitionLabel>\r\n\r\n </span>\r\n <!-- \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <!-- \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0442\u044C \u0434\u043B\u0438\u043D\u0443 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0432 44 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 -->\r\n <!-- \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0432 \u0442\u0443\u043B\u0442\u0438\u043F \u043F\u043E\u043B\u043D\u043E\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <span class=\"info-banner-item__text text-normal\" myTooltip [tooltip]=\"selected.name\" [tooltipMaxWidth]=\"320\">\r\n {{ selected.shortName ? selected.shortName : '\u041D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D' }}\r\n </span>\r\n </div>\r\n <!-- \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <div class=\"info-banner-item wpx-110\">\r\n <span class=\"info-banner-item__title\">\r\n \u0421\u0442\u0430\u0442\u0443\u0441\r\n </span>\r\n <!-- \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0443\u0431\u0441\u0438\u0434\u0438\u0438/\u043E\u0442\u0431\u043E\u0440\u0430 -->\r\n <!-- \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u0446\u0432\u0435\u0442\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u043A\u043B\u0430\u0441\u0441\u044B: \u043E\u0440\u0430\u043D\u0436\u0435\u0432\u044B\u0439 - \"color-orange\", \u0437\u0435\u043B\u0435\u043D\u044B\u0439 - \"color-green\" -->\r\n <span class=\"info-banner-item__text\" [ngClass]=\"competitionAggregateStatusCssClass\">\r\n {{ competitionAggregateStatusEnumLabel }}\r\n </span>\r\n </div>\r\n </div>\r\n <!-- \u0441\u0435\u043B\u0435\u043A\u0442 \u0441 \u0432\u044B\u0431\u043E\u0440\u043E\u043C \u0432\u0435\u0440\u0441\u0438\u0438 -->\r\n <div class=\"info-banner-item info-banner-item_input wpx-260 mr-3\" *ngIf=\"versions && versions.length > 1\">\r\n <div class=\"inputbox inputbox-md mb-0\">\r\n <ng-select [items]=\"versions\" [ngModel]=\"selected.id\"\r\n (ngModelChange)=\"selectVersion($event)\"\r\n [clearable]=\"false\"\r\n bindValue=\"id\"\r\n bindLabel=\"name\"\r\n groupBy=\"status\"\r\n notFoundText=\"\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E\">\r\n <ng-template ng-optgroup-tmp let-item=\"item\" let-index=\"index\">\r\n {{getCompetitionVersionStatusGrouppingLabel(item.status)}}\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\r\n \u0412\u0435\u0440\u0441\u0438\u044F {{item.num}} \u043E\u0442 {{item.createdDate}}\r\n </ng-template>\r\n <ng-template ng-label-tmp let-item=\"item\">\r\n \u0412\u0435\u0440\u0441\u0438\u044F {{item.num}} \u043E\u0442 {{item.createdDate}}\r\n </ng-template>\r\n </ng-select>\r\n </div>\r\n </div>\r\n <!-- \u0441\u0442\u0430\u0442\u0430\u0443\u0441 \u0432\u0435\u0440\u0441\u0438\u0438 -->\r\n <!-- \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C, \u0435\u0441\u043B\u0438 \u043D\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u0439 -->\r\n <div class=\"info-banner-item wpx-110\" *ngIf=\"versions && versions.length > 1\">\r\n <span class=\"info-banner-item__title\">\r\n \u0421\u0442\u0430\u0442\u0443\u0441 \u0432\u0435\u0440\u0441\u0438\u0438\r\n </span>\r\n <!-- \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u0435\u0440\u0441\u0438\u0438 -->\r\n <!-- \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u0446\u0432\u0435\u0442\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u043A\u043B\u0430\u0441\u0441\u044B: \u043E\u0440\u0430\u043D\u0436\u0435\u0432\u044B\u0439 - \"color-orange\", \u0437\u0435\u043B\u0435\u043D\u044B\u0439 - \"color-green\" -->\r\n <span class=\"info-banner-item__text\" *ngIf=\"selected\" [ngClass]=\"versionStatusClass\">\r\n {{ getCompetitionVersionStatusEnumLabel(selected.status) }}\r\n </span>\r\n </div>\r\n <!-- \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435, \u0432\u044B\u0437\u043E\u0432 \u043C\u043E\u0434\u0430\u043B\u043A\u0438, \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u043E\u0431 \u0432\u043D\u0435\u0441\u0435\u043D\u0438\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 -->\r\n <div class=\"info-banner-item\">\r\n <!-- \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C, \u0435\u0441\u043B\u0438 \u043D\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F -->\r\n <!-- \"\u043A\u043E\u043D\u0432\u0435\u0440\u0442\" -->\r\n <div class=\"info-banner-item__icon\" *ngIf=\"showRejectionReason\"\r\n myTooltip\r\n [tooltip]=\"'\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043F\u0440\u0438\u0447\u0438\u043D\u0443 \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F'\"\r\n (click)=\"showRejection(selected.rejectionReason)\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"6\" width=\"18\" height=\"12\" rx=\"1\" stroke=\"#282828\" stroke-width=\"1.5\"/>\r\n <path d=\"M3 6.25L11.3356 13.6595C11.7145 13.9962 12.2855 13.9962 12.6644 13.6595L21 6.25\" stroke=\"#282828\" stroke-width=\"1.5\"/>\r\n <path d=\"M3 18L7.5 14L9.75 12M21 18L16.5 14L14.25 12\" stroke=\"#282828\" stroke-width=\"1.5\"/>\r\n </svg>\r\n </div>\r\n <!-- \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 -->\r\n <div *ngIf=\"canDeleteVersion\" (click)=\"removeVersion()\" class=\"info-banner-item__icon\" myTooltip [tooltip]=\"'\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0435\u0440\u0441\u0438\u044E'\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M3 6H5H21\" stroke=\"#D14114\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n <path d=\"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z\" stroke=\"#D14114\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n <path d=\"M10 11V17\" stroke=\"#D14114\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n <path d=\"M14 11V17\" stroke=\"#D14114\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <!-- \u0432\u043E\u0441\u043A\u043B\u0438\u0446\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0437\u043D\u0430\u043A -->\r\n <div *ngIf=\"!isLastVersion\" class=\"info-banner-item__icon\" myTooltip [tooltip]=\"'\u0412\u043D\u0435\u0441\u0435\u043D\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438'\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M12.2302 18V17M12.2302 14V10M4.00298 21.25H20.4575C21.9971 21.25 22.9593 19.5833 22.1895 18.25L13.9623 4C13.1925 2.66667 11.268 2.66667 10.4982 4L2.27093 18.25C1.50113 19.5833 2.46338 21.25 4.00298 21.25Z\" stroke=\"#D57B1C\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"info-banner-control\">\r\n <div *ngIf=\"!!customButtonsTemplate\">\r\n <ng-container *ngTemplateOutlet=\"customButtonsTemplate.templateRef;context:customButtonsTemplateContext\"></ng-container>\r\n </div>\r\n <button class=\"btn btn-md green\"\r\n (click)=\"createVersion()\"\r\n *ngIf=\"canCreateVersion\"\r\n [disabled]=\"createVersionDisabled\">\r\n \u0421\u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F\r\n </button>\r\n <button class=\"btn btn-md green\"\r\n (click)=\"activateVersion()\"\r\n *ngIf=\"canActivateVersion\"\r\n [disabled]=\"activateVersionDisabled\">\r\n \u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C\r\n </button>\r\n <button class=\"btn btn-md\"\r\n (click)=\"validateVersion()\"\r\n *ngIf=\"canValidateVersion\"\r\n [disabled]=\"validateVersionDisabled\">\r\n \u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435\r\n </button>\r\n <button *ngIf=\"canReturnToEdit\" class=\"btn btn-md\"\r\n (click)=\"backToEdit()\"\r\n [disabled]=\"backToEditDisabled\">\r\n \u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C\r\n </button>\r\n <!-- \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u043C/\u043E\u0442\u0431\u043E\u0440\u043E\u043C -->\r\n <!-- \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0435\u0441\u043B\u0438 \u043D\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F -->\r\n <div class=\"info-banner-control__action\"\r\n *ngIf=\"competition && showEbLink\">\r\n <mrx-dropdown [mainPlacement]=\"'bottom-end'\" [fallbackPlacements]=\"['top-end']\">\r\n <ng-template #dropdownToggle>\r\n <span class=\"mrx-icon icon-more-vertical icon-font-24\"></span>\r\n </ng-template>\r\n <ng-template #dropdownMenu>\r\n <button mrxHideAfterClick (click)=\"redirectToEb()\">\r\n <span class=\"mrx-icon icon-link icon-font-24 mr-2\"></span>\r\n <span>\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043F\u043E\u0434\u0441\u0438\u0441\u0442\u0435\u043C\u0443 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0433\u043E \u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0413\u0418\u0418\u0421 \u00AB\u042D\u0411\u00BB</span>\r\n </button>\r\n\r\n <button mrxHideAfterClick (click)=\"pause()\"\r\n *ngIf=\"competition.status == competitionStatusEnum.Active && canManageCompetition\">\r\n <span class=\"mrx-icon icon-pause-filled icon-font-24 mr-2\"></span>\r\n <span>\u041F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C</span>\r\n </button>\r\n\r\n <button mrxHideAfterClick (click)=\"restore()\"\r\n *ngIf=\"competition.status == competitionStatusEnum.Staying && canManageCompetition\">\r\n <span class=\"mrx-icon icon-play-filled icon-font-24 mr-2\"></span>\r\n <span>{{restoreButtonName}}</span>\r\n </button>\r\n\r\n <button mrxHideAfterClick \r\n *ngIf=\"canCompleteCompetition && canManageCompetition\"\r\n (click)=\"complete()\">\r\n <span class=\"mrx-icon icon-stop-filled icon-font-24 mr-2\"></span>\r\n <span>\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C</span>\r\n </button>\r\n\r\n <button mrxHideAfterClick \r\n *ngIf=\"canCancelCompetition && canManageCompetition\"\r\n (click)=\"cancel()\">\r\n <span class=\"mrx-icon icon-close icon-font-24 mr-2\"></span>\r\n <span>{{cancelCompetitionButtonLabel}}</span>\r\n </button>\r\n </ng-template>\r\n </mrx-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
574
|
-
}], ctorParameters: function () { return [{ type: i1$1.SignService }, { type: i2.Store }, { type: i3.AlertService }, { type: SettingsService }]; }, propDecorators: { customButtonsTemplate: [{
|
|
575
|
-
type: ContentChild,
|
|
576
|
-
args: [CompetitionHeaderCustomButtonsDirective]
|
|
577
|
-
}], canChangeStatus: [{
|
|
578
|
-
type: Input
|
|
579
|
-
}], canCreateVersionOnActivityPeriod: [{
|
|
580
|
-
type: Input
|
|
581
|
-
}], canValidateVersionOnActivityPeriod: [{
|
|
582
|
-
type: Input
|
|
583
|
-
}], canActivateVersionOnActivityPeriod: [{
|
|
584
|
-
type: Input
|
|
585
|
-
}], validateVersionAction: [{
|
|
586
|
-
type: Input
|
|
587
|
-
}], validateManagementAccess: [{
|
|
588
|
-
type: Input
|
|
589
|
-
}], validatePiblicationAccess: [{
|
|
590
|
-
type: Input
|
|
591
|
-
}], selectedCompetitionVersionInfo: [{
|
|
592
|
-
type: Output
|
|
593
|
-
}] } });
|
|
594
|
-
|
|
595
|
-
const initialCompetitionHeaderState = {
|
|
596
|
-
competition: null,
|
|
597
|
-
competitionVersions: [],
|
|
598
|
-
defaultVersionVersionId: '',
|
|
599
|
-
manualVersionStatusChanged: false,
|
|
600
|
-
activityId: undefined,
|
|
601
|
-
type: undefined
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
const competitionHeaderReducerCreator = createReducer(initialCompetitionHeaderState, on(loadCompetitionHeaderSuccess, (state, { competitionHeader }) => {
|
|
605
|
-
const versions = competitionHeader.versions;
|
|
606
|
-
const competition = {
|
|
607
|
-
id: competitionHeader.id,
|
|
608
|
-
status: competitionHeader.status,
|
|
609
|
-
mode: competitionHeader.mode
|
|
610
|
-
};
|
|
611
|
-
return Object.assign(Object.assign({}, state), { competitionVersions: versions, defaultVersionVersionId: competitionHeader.selectedCompetitionVersionId, competition, activityId: competitionHeader.activityId, type: competitionHeader.type });
|
|
612
|
-
}), on(competitionVersionChangeStatusManual, (state, { versionId, status }) => {
|
|
613
|
-
const versions = [...state.competitionVersions];
|
|
614
|
-
const version = versions.find(s => s.id === versionId);
|
|
615
|
-
if (version) {
|
|
616
|
-
const newVersion = Object.assign({}, version);
|
|
617
|
-
newVersion.status = status;
|
|
618
|
-
versions.splice(versions.indexOf(version), 1, newVersion);
|
|
619
|
-
}
|
|
620
|
-
return Object.assign(Object.assign({}, state), { competitionVersions: versions, manualVersionStatusChanged: true });
|
|
621
|
-
}));
|
|
622
|
-
function competitionHeaderReducer(state, action) {
|
|
623
|
-
return competitionHeaderReducerCreator(state, action);
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
class CompetitionHeaderService extends EndpointBaseService {
|
|
627
|
-
constructor(http, injector) {
|
|
628
|
-
super(http, injector);
|
|
629
|
-
this.url = '/application' + this.restPath + '/competition';
|
|
630
|
-
}
|
|
631
|
-
getHeader(competitionId) {
|
|
632
|
-
return this.http.get(`${this.url}/${competitionId}/header`);
|
|
633
|
-
}
|
|
634
|
-
createVersion(competitionId) {
|
|
635
|
-
return this.http.post(`${this.url}/${competitionId}/version`, {});
|
|
636
|
-
}
|
|
637
|
-
deleteVersion(competitionId, versionId) {
|
|
638
|
-
return this.http.delete(`${this.url}/${competitionId}/version/${versionId}`);
|
|
639
|
-
}
|
|
640
|
-
versionChangeStatus(competitionId, versionId, status) {
|
|
641
|
-
return this.http.post(`${this.url}/${competitionId}/version/${versionId}/to-status/${status}`, {});
|
|
642
|
-
}
|
|
643
|
-
activate(competitionId) {
|
|
644
|
-
return this.http.post(`${this.url}/${competitionId}/activate`, {});
|
|
645
|
-
}
|
|
646
|
-
pause(competitionId) {
|
|
647
|
-
return this.http.post(`${this.url}/${competitionId}/pause`, {});
|
|
648
|
-
}
|
|
649
|
-
complete(competitionId) {
|
|
650
|
-
return this.http.post(`${this.url}/${competitionId}/complete`, {});
|
|
651
|
-
}
|
|
652
|
-
cancel(competitionId) {
|
|
653
|
-
return this.http.post(`${this.url}/${competitionId}/cancel`, {});
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
CompetitionHeaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderService, deps: [{ token: i1.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
657
|
-
CompetitionHeaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderService });
|
|
658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderService, decorators: [{
|
|
659
|
-
type: Injectable
|
|
660
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Injector }]; } });
|
|
661
|
-
|
|
662
|
-
class CompetitionHeaderEffects {
|
|
663
|
-
constructor(competitionHeaderService, actions$, store, alertService) {
|
|
664
|
-
this.competitionHeaderService = competitionHeaderService;
|
|
665
|
-
this.actions$ = actions$;
|
|
666
|
-
this.store = store;
|
|
667
|
-
this.alertService = alertService;
|
|
668
|
-
this.loadCompetitionHeader$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.LoadCompetitionHeader), withLatestFrom(this.store.pipe(select(selectCompetitionId))), switchMap(([, competitionId]) => {
|
|
669
|
-
return this.competitionHeaderService.getHeader(competitionId).pipe(map((result) => loadCompetitionHeaderSuccess({ competitionHeader: result })), catchError((err) => {
|
|
670
|
-
this.alertService.showMessage(err, null, MessageSeverity.error);
|
|
671
|
-
return EMPTY;
|
|
672
|
-
}));
|
|
673
|
-
})));
|
|
674
|
-
this.deleteCompetitionVersion$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.DeleteCompetitionVersion), map((action) => action.versionId), withLatestFrom(this.store.pipe(select(selectCompetitionId))), switchMap(([versionId, competitionId]) => {
|
|
675
|
-
return this.competitionHeaderService.deleteVersion(competitionId, versionId).pipe(map((result) => deleteCompetitionVersionSuccess({ versionId })), catchError((err) => {
|
|
676
|
-
this.alertService.showMessage(err, null, MessageSeverity.error);
|
|
677
|
-
return EMPTY;
|
|
678
|
-
}));
|
|
679
|
-
})));
|
|
680
|
-
this.deleteCompetitionVersionSuccess$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.DeleteCompetitionVersionSuccess), withLatestFrom(this.store.pipe(select(selectCompetitionId))), tap(([, competitionId]) => window.location.href = `/application/competitions/item?competitionId=${competitionId}`)), { dispatch: false });
|
|
681
|
-
this.createCompetitionVersion$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.CreateCompetitionVersion), withLatestFrom(this.store.pipe(select(selectCompetitionId))), switchMap(([, competitionId]) => {
|
|
682
|
-
return this.competitionHeaderService.createVersion(competitionId).pipe(map((result) => createCompetitionVersionSuccess({ versionId: result })), catchError((err) => {
|
|
683
|
-
this.alertService.showMessage(err, null, MessageSeverity.error);
|
|
684
|
-
return EMPTY;
|
|
685
|
-
}));
|
|
686
|
-
})));
|
|
687
|
-
this.createCompetitionVersionSuccess$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.CreateCompetitionVersionSuccess), map((action) => action.versionId), withLatestFrom(this.store.pipe(select(selectCompetitionId))), tap(([versionId, competitionId]) => window.location.href = `/application/competitions/item?competitionId=${competitionId}&versionId=${versionId}`)), { dispatch: false });
|
|
688
|
-
this.competitionVersionChangeStatus$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.CompetitionVersionChangeStatus), map((action) => action), withLatestFrom(this.store.pipe(select(selectCompetitionId))), switchMap(([action, competitionId]) => {
|
|
689
|
-
return this.competitionHeaderService.versionChangeStatus(competitionId, action.versionId, action.status).pipe(map((result) => {
|
|
690
|
-
return competitionVersionChangeStatusSuccess({
|
|
691
|
-
versionId: action.versionId,
|
|
692
|
-
status: action.status
|
|
693
|
-
});
|
|
694
|
-
}), catchError((err) => {
|
|
695
|
-
this.alertService.showMessage(err, null, MessageSeverity.error);
|
|
696
|
-
return EMPTY;
|
|
697
|
-
}));
|
|
698
|
-
})));
|
|
699
|
-
this.competitionVersionChangeStatusSuccess$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.CompetitionVersionChangeStatusSuccess), map((action) => action), withLatestFrom(this.store.pipe(select(selectCompetitionId))), tap(([action, competitionId]) => {
|
|
700
|
-
if (action.status === CompetitionVersionStatusEnum.Validation) {
|
|
701
|
-
window.location.href = `/m-data/minfin/selection/edit?competitionId=${competitionId}&versionId=${action.versionId}`;
|
|
702
|
-
}
|
|
703
|
-
else {
|
|
704
|
-
window.location.reload();
|
|
705
|
-
}
|
|
706
|
-
})), { dispatch: false });
|
|
707
|
-
this.selectCompetitionVersion$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.SelectCompetitionVersion), map((action) => action.versionId), withLatestFrom(this.store.pipe(select(selectCompetitionId))), tap(([versionId, competitionId]) => {
|
|
708
|
-
const newUri = Utilities.updateQueryStringParameter(window.location.href, 'versionId', versionId);
|
|
709
|
-
window.location.href = newUri;
|
|
710
|
-
})), { dispatch: false });
|
|
711
|
-
this.activateCompetition$ = createEffect(() => (this.actions$.pipe(ofType(ECompetitionHeaderActions.ActivateCompetition), withLatestFrom(this.store.pipe(select(selectCompetitionId))), switchMap(([, competitionId]) => {
|
|
712
|
-
return this.competitionHeaderService.activate(competitionId).pipe(map((result) => competitionChangeStatusSuccess()), catchError((err, caught) => {
|
|
713
|
-
this.alertService.showStickyMessage(err, 'Ошибка активации', MessageSeverity.error);
|
|
714
|
-
return EMPTY;
|
|
715
|
-
}));
|
|
716
|
-
}))));
|
|
717
|
-
this.pauseCompetition$ = createEffect(() => (this.actions$.pipe(ofType(ECompetitionHeaderActions.PauseCompetition), withLatestFrom(this.store.pipe(select(selectCompetitionId))), switchMap(([, competitionId]) => {
|
|
718
|
-
return this.competitionHeaderService.pause(competitionId).pipe(map((result) => competitionChangeStatusSuccess()), catchError((err, caught) => {
|
|
719
|
-
this.alertService.showStickyMessage(err, 'Ошибка приостановки', MessageSeverity.error);
|
|
720
|
-
return EMPTY;
|
|
721
|
-
}));
|
|
722
|
-
}))));
|
|
723
|
-
this.completeCompetition$ = createEffect(() => (this.actions$.pipe(ofType(ECompetitionHeaderActions.CompleteCompetition), withLatestFrom(this.store.pipe(select(selectCompetitionId))), switchMap(([, competitionId]) => {
|
|
724
|
-
return this.competitionHeaderService.complete(competitionId).pipe(map((result) => competitionChangeStatusSuccess()), catchError((err, caught) => {
|
|
725
|
-
this.alertService.showStickyMessage(err, 'Ошибка при завершении', MessageSeverity.error);
|
|
726
|
-
return EMPTY;
|
|
727
|
-
}));
|
|
728
|
-
}))));
|
|
729
|
-
this.cancelCompetition$ = createEffect(() => (this.actions$.pipe(ofType(ECompetitionHeaderActions.CancelCompetition), withLatestFrom(this.store.pipe(select(selectCompetitionId))), switchMap(([, competitionId]) => {
|
|
730
|
-
return this.competitionHeaderService.cancel(competitionId).pipe(map((result) => competitionChangeStatusSuccess()), catchError((err, caught) => {
|
|
731
|
-
this.alertService.showStickyMessage(err, 'Ошибка при отмене', MessageSeverity.error);
|
|
732
|
-
return EMPTY;
|
|
733
|
-
}));
|
|
734
|
-
}))));
|
|
735
|
-
this.cancelCompetitionWithValidation$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.CancelCompetitionWithValidation), map((action) => action.versionId), withLatestFrom(this.store.pipe(select(selectCompetitionId))), tap(([versionId, competitionId]) => window.location.href = `/m-data/minfin/selection/edit/cancel?competitionId=${competitionId}&versionId=${versionId}`)), { dispatch: false });
|
|
736
|
-
this.competitionChangeStatusSuccess$ = createEffect(() => this.actions$.pipe(ofType(ECompetitionHeaderActions.CompetitionChangeStatusSuccess), tap(() => window.location.reload())), { dispatch: false });
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
CompetitionHeaderEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderEffects, deps: [{ token: CompetitionHeaderService }, { token: i2$1.Actions }, { token: i2.Store }, { token: i3.AlertService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
740
|
-
CompetitionHeaderEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderEffects });
|
|
741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderEffects, decorators: [{
|
|
742
|
-
type: Injectable
|
|
743
|
-
}], ctorParameters: function () { return [{ type: CompetitionHeaderService }, { type: i2$1.Actions }, { type: i2.Store }, { type: i3.AlertService }]; } });
|
|
744
|
-
|
|
745
|
-
class CompetitionHeaderModule {
|
|
746
|
-
}
|
|
747
|
-
CompetitionHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
748
|
-
CompetitionHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderModule, declarations: [CompetitionHeaderComponent,
|
|
749
|
-
CompetitionHeaderCustomButtonsDirective], imports: [CommonModule, i2$1.EffectsFeatureModule, i2.StoreFeatureModule, TenantSettingsModule,
|
|
750
|
-
FormsModule,
|
|
751
|
-
MyrtexUiComponentsModule,
|
|
752
|
-
MyrtexMfUiCompositeModule,
|
|
753
|
-
MyrtexSignerModule,
|
|
754
|
-
NgSelectModule,
|
|
755
|
-
DropdownModule], exports: [CompetitionHeaderComponent,
|
|
756
|
-
CompetitionHeaderCustomButtonsDirective] });
|
|
757
|
-
CompetitionHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderModule, providers: [
|
|
758
|
-
CompetitionHeaderService,
|
|
759
|
-
SettingsService
|
|
760
|
-
], imports: [[
|
|
761
|
-
CommonModule,
|
|
762
|
-
EffectsModule.forFeature([CompetitionHeaderEffects]),
|
|
763
|
-
StoreModule.forFeature(COMPETITION_HEADER_FEATURE_NAME, competitionHeaderReducer),
|
|
764
|
-
TenantSettingsModule,
|
|
765
|
-
FormsModule,
|
|
766
|
-
MyrtexUiComponentsModule,
|
|
767
|
-
MyrtexMfUiCompositeModule,
|
|
768
|
-
MyrtexSignerModule,
|
|
769
|
-
NgSelectModule,
|
|
770
|
-
DropdownModule
|
|
771
|
-
]] });
|
|
772
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CompetitionHeaderModule, decorators: [{
|
|
773
|
-
type: NgModule,
|
|
774
|
-
args: [{
|
|
775
|
-
declarations: [
|
|
776
|
-
CompetitionHeaderComponent,
|
|
777
|
-
CompetitionHeaderCustomButtonsDirective,
|
|
778
|
-
],
|
|
779
|
-
imports: [
|
|
780
|
-
CommonModule,
|
|
781
|
-
EffectsModule.forFeature([CompetitionHeaderEffects]),
|
|
782
|
-
StoreModule.forFeature(COMPETITION_HEADER_FEATURE_NAME, competitionHeaderReducer),
|
|
783
|
-
TenantSettingsModule,
|
|
784
|
-
FormsModule,
|
|
785
|
-
MyrtexUiComponentsModule,
|
|
786
|
-
MyrtexMfUiCompositeModule,
|
|
787
|
-
MyrtexSignerModule,
|
|
788
|
-
NgSelectModule,
|
|
789
|
-
DropdownModule
|
|
790
|
-
],
|
|
791
|
-
providers: [
|
|
792
|
-
CompetitionHeaderService,
|
|
793
|
-
SettingsService
|
|
794
|
-
],
|
|
795
|
-
exports: [
|
|
796
|
-
CompetitionHeaderComponent,
|
|
797
|
-
CompetitionHeaderCustomButtonsDirective,
|
|
798
|
-
]
|
|
799
|
-
}]
|
|
800
|
-
}] });
|
|
801
|
-
|
|
802
|
-
/*
|
|
803
|
-
* Public API Surface of myrtex-mf-competition
|
|
804
|
-
*/
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* Generated bundle index. Do not edit.
|
|
808
|
-
*/
|
|
809
|
-
|
|
810
|
-
export { CompetitionHeaderComponent, CompetitionHeaderCustomButtonsDirective, CompetitionHeaderModule };
|
|
811
|
-
//# sourceMappingURL=myrtex-mf-competition.mjs.map
|