Skip to content

Add Income Feature#37

Open
dev-bilal-azzam wants to merge 23 commits into
developfrom
feature/add-income
Open

Add Income Feature#37
dev-bilal-azzam wants to merge 23 commits into
developfrom
feature/add-income

Conversation

@dev-bilal-azzam

Copy link
Copy Markdown
Collaborator

What's New :

  • Add Income Screen & State Management
  • Add Income API Integration

Demo :

Add.Income.Screen.Demo.webm

Comment thread data/build.gradle.kts Outdated
Comment on lines +10 to +31
class AddIncome(
private val incomeRepository: IncomeRepository
) {
suspend operator fun invoke(income: Income) {
println("Trace + Use case $income")
validateIncomeAmount(income.amount)
validateIncomeDate(income.date)
incomeRepository.addIncome(income)
}

private fun validateIncomeDate(date: LocalDate): Boolean {
return date <= LocalDate.currentDate()
}

private fun validateIncomeAmount(amount: Int): Boolean {
return amount > 0
}

private fun LocalDate.Companion.currentDate(): LocalDate {
return Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()).date
}
} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a usecase right?, then add the postfix to the class name

Comment thread iosApp/iosApp/Info.plist
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>BASE_URL</key>
<string>https://money-plus-dev.vercel.app</string>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find a way to not set the base url hard coded, cause we will have 2 apps, one for develop, and one for prod

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can take a look on the MENA project to check how did the infra team do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants