Fix offer update notification for AAD users (#338)

This commit is contained in:
Steve Faulkner
2020-12-11 13:38:57 -06:00
committed by GitHub
parent c21f42159f
commit ea39c1d092
12 changed files with 33 additions and 20 deletions

View File

@@ -230,9 +230,7 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels.
return this.throughputTitle() + this.requestUnitsUsageCost();
});
this.pendingNotification = ko.observable<DataModels.Notification>();
this._offerReplacePending = ko.observable<boolean>(
!!this.database.offer()?.headers?.[Constants.HttpHeaders.offerReplacePending]
);
this._offerReplacePending = ko.observable<boolean>(!!this.database.offer()?.offerReplacePending);
this.notificationStatusInfo = ko.observable<string>("");
this.shouldShowNotificationStatusPrompt = ko.computed<boolean>(() => this.notificationStatusInfo().length > 0);
this.warningMessage = ko.computed<string>(() => {
@@ -241,7 +239,7 @@ export default class DatabaseSettingsTab extends TabsBase implements ViewModels.
}
const offer = this.database.offer();
if (offer?.headers?.[Constants.HttpHeaders.offerReplacePending]) {
if (offer?.offerReplacePending) {
const throughput = offer.manualThroughput || offer.autoscaleMaxThroughput;
return throughputApplyShortDelayMessage(this.isAutoPilotSelected(), throughput, this.database.id());
}