TF-4069 Do not show toast message when disable vacation automatically
This commit is contained in:
+1
-1
@@ -16,6 +16,6 @@ extension HandleVacationResponseExtension on ManageAccountDashBoardController {
|
||||
}
|
||||
|
||||
void automaticallyDeactivateVacation(VacationResponse vacationResponse) {
|
||||
disableVacationResponder(vacationResponse);
|
||||
disableVacationResponder(vacationResponse, isAuto: true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,11 +289,15 @@ class ManageAccountDashBoardController extends ReloadableController
|
||||
}
|
||||
}
|
||||
|
||||
void disableVacationResponder(VacationResponse vacation) {
|
||||
void disableVacationResponder(
|
||||
VacationResponse vacation, {
|
||||
bool isAuto = false,
|
||||
}) {
|
||||
if (accountId.value != null && _updateVacationInteractor != null) {
|
||||
consumeState(_updateVacationInteractor!.execute(
|
||||
accountId.value!,
|
||||
vacation.clearAllExceptHtmlBody(),
|
||||
isAuto: isAuto,
|
||||
));
|
||||
} else {
|
||||
consumeState(
|
||||
@@ -304,11 +308,13 @@ class ManageAccountDashBoardController extends ReloadableController
|
||||
|
||||
void _handleUpdateVacationSuccess(UpdateVacationSuccess success) {
|
||||
if (success.listVacationResponse.isNotEmpty &&
|
||||
!success.isAuto &&
|
||||
currentContext != null &&
|
||||
currentOverlayContext != null) {
|
||||
appToast.showToastSuccessMessage(
|
||||
currentOverlayContext!,
|
||||
AppLocalizations.of(currentContext!).yourVacationResponderIsDisabledSuccessfully);
|
||||
AppLocalizations.of(currentContext!).yourVacationResponderIsDisabledSuccessfully,
|
||||
);
|
||||
}
|
||||
setUpVacation(success.listVacationResponse.firstOrNull);
|
||||
}
|
||||
|
||||
@@ -42,15 +42,17 @@ class SettingsView extends GetWidget<SettingsController> {
|
||||
Obx(() {
|
||||
final dashboard = controller.manageAccountDashboardController;
|
||||
final vacation = dashboard.vacationResponse.value;
|
||||
final isWebDesktop = controller.responsiveUtils.isWebDesktop(context);
|
||||
final isWebDesktopResponsive = controller
|
||||
.responsiveUtils
|
||||
.isWebDesktop(context);
|
||||
|
||||
if (vacation?.vacationResponderIsValid == true) {
|
||||
return VacationNotificationMessageWidget(
|
||||
margin: EdgeInsetsDirectional.only(
|
||||
start: 12,
|
||||
end: 12,
|
||||
top: isWebDesktop ? 8 : 0,
|
||||
bottom: isWebDesktop ? 0 : 16,
|
||||
top: isWebDesktopResponsive ? 8 : 0,
|
||||
bottom: isWebDesktopResponsive ? 0 : 16,
|
||||
),
|
||||
fromAccountDashBoard: true,
|
||||
vacationResponse: vacation!,
|
||||
@@ -65,8 +67,8 @@ class SettingsView extends GetWidget<SettingsController> {
|
||||
margin: EdgeInsetsDirectional.only(
|
||||
start: 12,
|
||||
end: 12,
|
||||
top: isWebDesktop ? 8 : 0,
|
||||
bottom: isWebDesktop ? 0 : 16,
|
||||
top: isWebDesktopResponsive ? 8 : 0,
|
||||
bottom: isWebDesktopResponsive ? 0 : 16,
|
||||
),
|
||||
fromAccountDashBoard: true,
|
||||
vacationResponse: vacation!,
|
||||
|
||||
@@ -245,6 +245,7 @@ class VacationController extends BaseController {
|
||||
|
||||
void _handleUpdateVacationSuccess(UpdateVacationSuccess success) {
|
||||
if (success.listVacationResponse.isNotEmpty &&
|
||||
!success.isAuto &&
|
||||
currentOverlayContext != null &&
|
||||
currentContext != null) {
|
||||
appToast.showToastSuccessMessage(
|
||||
|
||||
Reference in New Issue
Block a user