Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play sound or vibrate the device #49

Closed
github-actions bot opened this issue Nov 5, 2023 · 1 comment
Closed

Play sound or vibrate the device #49

github-actions bot opened this issue Nov 5, 2023 · 1 comment
Labels

Comments

@github-actions
Copy link

github-actions bot commented Nov 5, 2023

}

else

{

await _billingService.RemoveLastPaymentLogAsync(Item);

}

}

{

var itemLogs = _billingService.GetPaymentLogsForItem(item, logs);

{

return false;

}

{

if (lastPayment > DateOnly.FromDateTime(DateTime.Today) ||

(lastLog.PaymentDate >= lastPayment && lastLog.PaymentDate < nextPayment))

{

return true;

}

}

}

https://api.github.com/morning4coffe-dev/project-sbs/blob/221473be04beb37fe032f6412da20f043c79e9ed/ProjectSBS/ProjectSBS/Presentation/Components/ItemViewModel.cs#L85

        return _billingService.GetFuturePayments(billing.InitialDate, billing.PeriodType, billing.RecurEvery, numberOfPayments);
    }

    #region FEAT: feature/IndividualPayments
    //[ObservableProperty]
    //private bool _isPaid;

    //public List<ItemLog> PaymentLogs { get; } = new();

    //private async Task OnPay()
    //{

    //await Task.CompletedTask;

    //if (IsPaid)
    //{
    //    //TODO Play sound or vibrate the device

    //    await _billingService.NewPaymentLogAsync(Item);
    //}
    //else
    //{
    //    await _billingService.RemoveLastPaymentLogAsync(Item);
    //}
    //}

    //private bool CalculateIsPaid(Item item, IEnumerable<ItemLog> logs)
    //{
    //    var itemLogs = _billingService.GetPaymentLogsForItem(item, logs);

    //    if (!Enumerable.Any(logs))
    //    {
    //        return false;
    //    }

    //    var (lastPayment, nextPayment) = _billingService.GetBillingDates(item.Billing.InitialDate, item.Billing.PeriodType, item.Billing.RecurEvery);

    //    if (itemLogs.LastOrDefault() is { } lastLog)
    //    {
    //        if (lastPayment > DateOnly.FromDateTime(DateTime.Today) ||
    //            (lastLog.PaymentDate >= lastPayment && lastLog.PaymentDate < nextPayment))
    //        {
    //            return true;
    //        }
    //    }

    //    return false;
    //}
    #endregion
}
@github-actions github-actions bot added the todo label Nov 5, 2023
Copy link
Author

Closed in 015de34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants