TF-4069 Do not show toast message when disable vacation automatically

This commit is contained in:
dab246
2025-10-14 15:30:13 +07:00
committed by Dat H. Pham
parent d6606aeb48
commit e04b88f87c
7 changed files with 34 additions and 14 deletions
@@ -13,11 +13,18 @@ class UpdateVacationInteractor {
UpdateVacationInteractor(this.vacationRepository);
Stream<Either<Failure, Success>> execute(AccountId accountId, VacationResponse vacationResponse) async* {
Stream<Either<Failure, Success>> execute(
AccountId accountId,
VacationResponse vacationResponse,
{bool isAuto = false}
) async* {
try {
yield Right<Failure, Success>(LoadingUpdateVacation());
final listVacationResponse = await vacationRepository.updateVacation(accountId, vacationResponse);
yield Right<Failure, Success>(UpdateVacationSuccess(listVacationResponse));
yield Right<Failure, Success>(UpdateVacationSuccess(
listVacationResponse,
isAuto,
));
} catch (exception) {
yield Left<Failure, Success>(UpdateVacationFailure(exception));
}