Skip to content

Commit

Permalink
Invoice package cleaned (openMF#1688)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaKumdale authored Jul 3, 2024
1 parent c154706 commit f30a853
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 1,120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import org.mifospay.R
import org.mifospay.core.designsystem.theme.grey
import org.mifospay.invoices.R

@Composable
fun InvoiceItem(
Expand Down Expand Up @@ -51,8 +51,8 @@ fun InvoiceItem(
) {
Icon(
painter = painterResource(
id = if (invoiceStatusIcon == 0L) R.drawable.ic_remove_circle_outline_black_24dp
else R.drawable.ic_check_round_black_24dp
id = if (invoiceStatusIcon == 0L) R.drawable.feature_invoices_ic_remove_circle_outline_black_24dp
else R.drawable.feature_invoices_ic_check_round_black_24dp
),
contentDescription = "Invoice Status",
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.mifospay.core.model.entity.Invoice
import org.mifospay.R
import org.mifospay.core.designsystem.component.MifosLoadingWheel
import org.mifospay.core.designsystem.icon.MifosIcons.Info
import org.mifospay.core.designsystem.theme.MifosTheme
import org.mifospay.core.ui.EmptyContentScreen
import org.mifospay.invoices.R

@Composable
fun InvoiceScreen(
Expand All @@ -46,8 +46,8 @@ fun InvoiceScreen(
is InvoicesUiState.Error -> {
EmptyContentScreen(
modifier = Modifier,
title = stringResource(id = R.string.error_oops),
subTitle = stringResource(id = R.string.unexpected_error_subtitle),
title = stringResource(id = R.string.feature_invoices_error_oops),
subTitle = stringResource(id = R.string.feature_invoices_unexpected_error_subtitle),
iconTint = Color.Black,
iconImageVector = Info
)
Expand Down Expand Up @@ -78,16 +78,16 @@ fun InvoiceScreen(
InvoicesUiState.Empty -> {
EmptyContentScreen(
modifier = Modifier,
title = stringResource(id = R.string.error_oops),
subTitle = stringResource(id = R.string.error_no_invoices_found),
title = stringResource(id = R.string.feature_invoices_error_oops),
subTitle = stringResource(id = R.string.feature_invoices_error_no_invoices_found),
iconTint = Color.Black,
)
}

InvoicesUiState.Loading -> {
MifosLoadingWheel(
modifier = Modifier.fillMaxWidth(),
contentDesc = stringResource(R.string.loading)
contentDesc = stringResource(R.string.feature_invoices_loading)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/feature_invoices_primaryDarkBlue"
android:pathData="M16.59 7.58L10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFD300"
android:pathData="M7,11v2h10v-2L7,11zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>
4 changes: 4 additions & 0 deletions feature/invoices/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="feature_invoices_primaryDarkBlue">#303F9F</color>
</resources>
14 changes: 3 additions & 11 deletions feature/invoices/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
UPI)
</string>
<string name="feature_invoices_unique_payment_link">Unique Payment Link</string>











<string name="feature_invoices_error_oops">Oops!</string>
<string name="feature_invoices_unexpected_error_subtitle">An unexpected error occurred. Please try again.</string>
<string name="feature_invoices_error_no_invoices_found">Couldn\'t fetch invoice list. Please, try again.</string>
</resources>
2 changes: 1 addition & 1 deletion mifospay/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ dependencies {
implementation(projects.feature.settings)
implementation(projects.feature.savedcards)
implementation(projects.feature.qr)
implementation(projects.feature.invoices)
implementation(projects.feature.merchants)
implementation(projects.feature.history)

implementation(projects.feature.kyc)

// Compose
Expand Down
2 changes: 1 addition & 1 deletion mifospay/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</intent-filter>
</activity>
<activity
android:name=".invoice.ui.InvoiceActivity"
android:name=".feature.invoices.InvoiceActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/AppTheme">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import com.google.accompanist.pager.rememberPagerState
import com.mifospay.core.model.domain.Transaction
import org.mifospay.core.ui.MifosScrollableTabRow
import org.mifospay.core.ui.utility.TabContent
import org.mifospay.feature.invoices.InvoiceScreen
import org.mifospay.feature.history.HistoryScreen
import org.mifospay.invoice.ui.InvoiceScreen
import org.mifospay.payments.TransferViewModel
import org.mifospay.payments.send.SendScreenRoute
import org.mifospay.payments.ui.RequestScreen
Expand Down
33 changes: 0 additions & 33 deletions mifospay/src/main/java/org/mifospay/invoice/InvoiceContract.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f30a853

Please sign in to comment.