Moved changed to optional assignee id in alarm query constructor to end
This commit is contained in:
parent
c9b37237c1
commit
411da14083
@ -155,7 +155,7 @@ export class AlarmTableConfig extends EntityTableConfig<AlarmInfo, TimePageLink>
|
||||
}
|
||||
|
||||
fetchAlarms(pageLink: TimePageLink): Observable<PageData<AlarmInfo>> {
|
||||
const query = new AlarmQuery(this.entityId, pageLink, this.searchStatus, null, null, true);
|
||||
const query = new AlarmQuery(this.entityId, pageLink, this.searchStatus, null, true, null);
|
||||
return this.alarmService.getAlarms(query);
|
||||
}
|
||||
|
||||
|
||||
@ -416,8 +416,8 @@ export class WidgetContext {
|
||||
return new TimePageLink(pageSize, page, textSearch, sortOrder, startTime, endTime);
|
||||
}
|
||||
|
||||
alarmQuery(entityId: EntityId, pageLink: TimePageLink, searchStatus: AlarmSearchStatus, status: AlarmStatus, assigneeId: UserId, fetchOriginator: boolean) {
|
||||
return new AlarmQuery(entityId, pageLink, searchStatus, status, assigneeId, fetchOriginator);
|
||||
alarmQuery(entityId: EntityId, pageLink: TimePageLink, searchStatus: AlarmSearchStatus, status: AlarmStatus, fetchOriginator: boolean, assigneeId: UserId) {
|
||||
return new AlarmQuery(entityId, pageLink, searchStatus, status, fetchOriginator, assigneeId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -263,18 +263,18 @@ export class AlarmQuery {
|
||||
pageLink: TimePageLink;
|
||||
searchStatus: AlarmSearchStatus;
|
||||
status: AlarmStatus;
|
||||
assigneeId: UserId;
|
||||
fetchOriginator: boolean;
|
||||
assigneeId?: UserId;
|
||||
|
||||
constructor(entityId: EntityId, pageLink: TimePageLink,
|
||||
searchStatus: AlarmSearchStatus, status: AlarmStatus,
|
||||
assigneeId: UserId, fetchOriginator: boolean) {
|
||||
fetchOriginator: boolean, assigneeId?: UserId) {
|
||||
this.affectedEntityId = entityId;
|
||||
this.pageLink = pageLink;
|
||||
this.searchStatus = searchStatus;
|
||||
this.status = status;
|
||||
this.assigneeId = assigneeId;
|
||||
this.fetchOriginator = fetchOriginator;
|
||||
this.assigneeId = assigneeId;
|
||||
}
|
||||
|
||||
public toQuery(): string {
|
||||
@ -284,12 +284,13 @@ export class AlarmQuery {
|
||||
query += `&searchStatus=${this.searchStatus}`;
|
||||
} else if (this.status) {
|
||||
query += `&status=${this.status}`;
|
||||
} else if (this.assigneeId) {
|
||||
query += `&assigneeId=${this.assigneeId.id}`;
|
||||
}
|
||||
if (typeof this.fetchOriginator !== 'undefined' && this.fetchOriginator !== null) {
|
||||
query += `&fetchOriginator=${this.fetchOriginator}`;
|
||||
}
|
||||
if (typeof this.assigneeId !== 'undefined' && this.assigneeId !== null) {
|
||||
query += `&assigneeId=${this.assigneeId.id}`;
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user