Compare commits

..

No commits in common. "fccf781c3b48a44106fa83a55439f7c7e887fc85" and "6669528fdbdf251b7d899e726a2702b1f798ef97" have entirely different histories.

15 changed files with 244 additions and 577 deletions

View File

@ -973,11 +973,6 @@ public class MainFragment extends DataBindingFragment {
} }
} }
public void onClickHistory(){
routeId = R.id.action_nav_main_to_dashboardHistoryFragment;
safeRouteTo(currentId(), routeId, hostId());
}
public void onClickReport() { public void onClickReport() {
routeId = R.id.action_nav_main_to_manageFunctionFragment; routeId = R.id.action_nav_main_to_manageFunctionFragment;
safeRouteTo(currentId(), routeId, hostId()); safeRouteTo(currentId(), routeId, hostId());

View File

@ -106,7 +106,6 @@ public class ConfirmTransactionFragment extends DataBindingFragment implements D
setToolBarTitleWithBackIcon(getResourceString(R.string.txt_title_trans_info)); setToolBarTitleWithBackIcon(getResourceString(R.string.txt_title_trans_info));
isMerchantCopy = true; isMerchantCopy = true;
sharedViewModel.printerDisabled.setValue(!SystemParamsOperation.getInstance().getPrinterEnabled());
if(sharedViewModel.getTransMenu().getValue() == TransMenu.REVIEW) { if(sharedViewModel.getTransMenu().getValue() == TransMenu.REVIEW) {
@ -125,7 +124,7 @@ public class ConfirmTransactionFragment extends DataBindingFragment implements D
sharedViewModel.reprintTransTypeMsg.setValue(getResourceString(R.string.txt_print_merchant_copy)); sharedViewModel.reprintTransTypeMsg.setValue(getResourceString(R.string.txt_print_merchant_copy));
sharedViewModel.oneBtnLayout.setValue(8); sharedViewModel.oneBtnLayout.setValue(8);
sharedViewModel.twoBtnLayout.setValue(8); sharedViewModel.twoBtnLayout.setValue(8);
sharedViewModel.reprintBtnLayout.setValue(sharedViewModel.printerDisabled.getValue() != null && sharedViewModel.printerDisabled.getValue() ? 8 : 0); sharedViewModel.reprintBtnLayout.setValue(0);
// printReceipt(true); // printReceipt(true);
@ -259,10 +258,6 @@ public class ConfirmTransactionFragment extends DataBindingFragment implements D
} }
public void onPrint() { public void onPrint() {
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
showDeclineDialog("Printer is disabled!");
return;
}
printReceipt(isMerchantCopy); printReceipt(isMerchantCopy);

View File

@ -75,8 +75,8 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
setToolBarTitleWithoutBackIcon(getResourceString(R.string.title_print_receipt)); setToolBarTitleWithoutBackIcon(getResourceString(R.string.title_print_receipt));
sharedViewModel.printReceiptButtons.setValue(printerEnabled ? 0 : 8); sharedViewModel.printReceiptButtons.setValue(0);
sharedViewModel.printerDisabled.setValue(!printerEnabled); sharedViewModel.printerDisabled.setValue(printerEnabled);
PayDetail payDetail = sharedViewModel.payDetail.getValue(); PayDetail payDetail = sharedViewModel.payDetail.getValue();
@ -122,14 +122,16 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
if (!printerEnabled) {
sharedViewModel.setPrintStatus(PrintStatus.NOT_PRINT);
sharedViewModel.setVisibilityPrintReceiptButtons(8);
sharedViewModel.postPrintReceiptMsg("Receipt is saved as E-receipt!");
} else {
sharedViewModel.setPrintStatus(PrintStatus.FIRST_PRINT); sharedViewModel.setPrintStatus(PrintStatus.FIRST_PRINT);
observePrintProcess();
if(!printerEnabled){
sharedViewModel.postPrintReceiptMsg("Receipt is saved as E-receipt!");
} }
// else{
// sharedViewModel.postPrintReceiptMsg("Print Receipt for Merchant?");
// }
observePrintProcess();
setBackPressCallback(this); setBackPressCallback(this);
} }

View File

@ -1,190 +0,0 @@
package com.utsmm.kbz.ui.dashboard;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
import com.utsmyanmar.baselib.util.DataBindingConfig;
import com.utsmyanmar.baselib.util.DialogCallback;
import com.utsmyanmar.paylibs.model.PayDetail;
import com.utsmyanmar.paylibs.model.TradeData;
import com.utsmyanmar.paylibs.print.PrintHelper;
import com.utsmyanmar.paylibs.print.printx.PrintXReceipt;
import com.utsmyanmar.paylibs.print.printx.PrintXStatus;
import com.utsmyanmar.paylibs.utils.POSUtil;
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
import com.utsmyanmar.paylibs.utils.enums.HostType;
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType;
import com.utsmyanmar.paylibs.utils.params.Params;
import com.nexgo.oaf.apiv3.SdkResult;
import com.utsmm.kbz.BR;
import com.utsmm.kbz.R;
import com.utsmm.kbz.config.Constants;
import com.utsmm.kbz.databinding.FragmentDashboardHistoryScreenBinding;
import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
import com.utsmm.kbz.ui.management.HistoryAdapter;
import com.utsmm.kbz.ui.management.ManagementViewModel;
import java.util.ArrayList;
public class DashboardHistoryFragment extends DataBindingFragment {
private ManagementViewModel managementViewModel;
private SharedViewModel sharedViewModel;
private HistoryAdapter detailReportAdapter;
private int routeId;
private final ArrayList<PayDetail> lists = new ArrayList<>();
@Override
protected void initViewModel() {
managementViewModel = getFragmentScopeViewModel(ManagementViewModel.class);
sharedViewModel = getFragmentScopeViewModel(SharedViewModel.class);
}
@Override
protected DataBindingConfig getDataBindingConfig() {
return new DataBindingConfig(R.layout.fragment_dashboard_history_screen, BR.manageViewModel, managementViewModel)
.addBindingParam(BR.sharedViewModel, sharedViewModel)
.addBindingParam(BR.click, new ClickEvent());
}
@Override
protected int currentId() {
return R.id.dashboardHistoryFragment;
}
@Override
protected int hostId() {
return Constants.NAV_HOST_ID;
}
@Override
protected int routeId() {
return routeId;
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
observeHistory();
}
@Override
public void onResume() {
super.onResume();
setToolBarTitleWithBackIcon(getString(R.string.title_history));
managementViewModel.detailReportLayoutVisibility.setValue(0);
managementViewModel.detailReportBottomLayoutVisibility.setValue(0);
}
private void observeHistory() {
managementViewModel.getTransactionHistory().observe(getViewLifecycleOwner(), payDetailList -> {
if (payDetailList == null) {
return;
}
lists.clear();
if (payDetailList.isEmpty()) {
managementViewModel.detailReportLayoutVisibility.setValue(0);
managementViewModel.detailReportBottomLayoutVisibility.setValue(8);
} else {
managementViewModel.detailReportLayoutVisibility.setValue(8);
managementViewModel.detailReportBottomLayoutVisibility.setValue(0);
}
HostType hostType = sharedViewModel.hostType.getValue();
for (PayDetail payDetail : payDetailList) {
if (hostType == HostType.MPU) {
if (payDetail.getTransactionType() != TransactionsType.MMQR.value
&& payDetail.getTransactionType() != TransactionsType.REVERSAL.value
&& payDetail.getTransactionType() != TransactionsType.SETTLEMENT.value
&& POSUtil.getInstance().getYesterdayDate()
.compareTo(POSUtil.getInstance().getDateByString(payDetail.transDate)) < 1) {
lists.add(payDetail);
}
} else if (hostType == HostType.QR) {
if (payDetail.getTransactionType() == TransactionsType.MMQR.value
&& payDetail.getQrTransStatus() == 1) {
lists.add(payDetail);
}
} else {
lists.add(payDetail);
}
}
if (lists.isEmpty()) {
managementViewModel.detailReportBottomLayoutVisibility.setValue(8);
managementViewModel.detailReportLayoutVisibility.setValue(0);
}
detailReportAdapter = new HistoryAdapter(lists);
((FragmentDashboardHistoryScreenBinding) mBinding).setAdapter(detailReportAdapter);
});
}
private void navigateMain() {
routeId = R.id.action_dashboardHistoryFragment_to_nav_main;
safeNavigateToRouteId();
}
public class ClickEvent {
public void onCancel() {
navigateMain();
}
public void onPrint() {
TradeData tradeData = Params.newTrade(false);
PayDetail payDetail = tradeData.getPayDetail();
payDetail.setTransType(TransactionsType.DETAIL_REPORT.name);
payDetail.setTransactionType(TransactionsType.DETAIL_REPORT.value);
if (PrintHelper.getInstance().paperRollStatus() == SdkResult.Printer_PaperLack) {
showPrinterAlertDialog(getString(R.string.txt_paper_roll_not_ready), new DialogCallback() {
@Override
public void onClickCancel() {
dismissPrinterAlertDialog();
}
@Override
public void onClickRetry() {
dismissPrinterAlertDialog();
if (PrintHelper.getInstance().paperRollStatus() != SdkResult.Success) {
return;
}
PrintXReceipt.getInstance().printDetailReport(payDetail, lists, sharedViewModel.hostType.getValue(), new PrintXStatus() {
@Override
public void onSuccess() {
}
@Override
public void onFailure() {
}
});
}
});
if (SystemParamsOperation.getInstance().isAlertSound()) {
startSound(getString(R.string.txt_audio_printer_alert));
}
} else if (PrintHelper.getInstance().paperRollStatus() == SdkResult.Success) {
PrintXReceipt.getInstance().printDetailReport(payDetail, lists, sharedViewModel.hostType.getValue(), new PrintXStatus() {
@Override
public void onSuccess() {
}
@Override
public void onFailure() {
}
});
}
}
}
}

View File

@ -157,6 +157,9 @@ public class DashboardTransFragment extends DataBindingFragment {
case CASH_ADVANCE: case CASH_ADVANCE:
new DashboardTransFragment.ClickEvent().onClickCashAdvance(); new DashboardTransFragment.ClickEvent().onClickCashAdvance();
break; break;
case HISTORY:
new DashboardTransFragment.ClickEvent().onClickHistory();
break;
case DEVICE_CONFIG: case DEVICE_CONFIG:
new DashboardTransFragment.ClickEvent().onClickDeviceConfig(); new DashboardTransFragment.ClickEvent().onClickDeviceConfig();
break; break;
@ -259,6 +262,12 @@ public class DashboardTransFragment extends DataBindingFragment {
safeRouteTo(currentId,routeId,hostId); safeRouteTo(currentId,routeId,hostId);
} }
public void onClickHistory() {
routeId = R.id.action_dashboardTransFragment_to_manageFunctionFragment;
safeRouteTo(currentId,routeId,hostId);
}
public void onClickDeviceConfig(){ public void onClickDeviceConfig(){
routeId = R.id.action_dashboardTransFragment_to_deviceConfig; routeId = R.id.action_dashboardTransFragment_to_deviceConfig;
safeRouteTo(currentId, routeId, hostId); safeRouteTo(currentId, routeId, hostId);

View File

@ -72,7 +72,6 @@ public class DetailReportFragment extends DataBindingFragment {
super.onResume(); super.onResume();
setToolBarTitleWithBackIcon(getResourceString(R.string.txt_subtitle_print_detail_report)); setToolBarTitleWithBackIcon(getResourceString(R.string.txt_subtitle_print_detail_report));
sharedViewModel.printerDisabled.setValue(!SystemParamsOperation.getInstance().getPrinterEnabled());
showLoadingView(); showLoadingView();
} }
@ -223,10 +222,6 @@ public class DetailReportFragment extends DataBindingFragment {
} }
public void onPrint() { public void onPrint() {
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
showDeclineDialog("Printer is disabled!");
return;
}
TradeData tradeData = Params.newTrade(false); TradeData tradeData = Params.newTrade(false);
PayDetail payDetail = tradeData.getPayDetail(); PayDetail payDetail = tradeData.getPayDetail();
payDetail.setTransType(TransactionsType.DETAIL_REPORT.name); payDetail.setTransType(TransactionsType.DETAIL_REPORT.name);

View File

@ -62,7 +62,6 @@ public class TransactionSummaryFragment extends DataBindingFragment {
protected DataBindingConfig getDataBindingConfig() { protected DataBindingConfig getDataBindingConfig() {
return new DataBindingConfig(R.layout.fragment_transaction_summary_screen, BR.manageViewModel,managementViewModel) return new DataBindingConfig(R.layout.fragment_transaction_summary_screen, BR.manageViewModel,managementViewModel)
.addBindingParam(BR.summaryViewModel,summaryViewModel) .addBindingParam(BR.summaryViewModel,summaryViewModel)
.addBindingParam(BR.sharedViewModel, sharedViewModel)
.addBindingParam(BR.click,new ClickEvent()); .addBindingParam(BR.click,new ClickEvent());
} }
@ -87,8 +86,6 @@ public class TransactionSummaryFragment extends DataBindingFragment {
setToolBarTitleWithBackIcon(getString(R.string.title_trans_summary)); setToolBarTitleWithBackIcon(getString(R.string.title_trans_summary));
sharedViewModel.printerDisabled.setValue(!SystemParamsOperation.getInstance().getPrinterEnabled());
summaryViewModel.resetField(); summaryViewModel.resetField();
} }
@ -564,10 +561,6 @@ public class TransactionSummaryFragment extends DataBindingFragment {
public void onPrint() { public void onPrint() {
try { try {
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
showDeclineDialog("Printer is disabled!");
return;
}
if (summaryViewModel.validateField()) { if (summaryViewModel.validateField()) {
LogUtil.d(TAG, "Print button clicked - validation passed"); LogUtil.d(TAG, "Print button clicked - validation passed");
startSearchProcess(); startSearchProcess();

View File

@ -36,7 +36,6 @@ public class HostConfigFragment extends DataBindingFragment {
@Override @Override
protected DataBindingConfig getDataBindingConfig() { protected DataBindingConfig getDataBindingConfig() {
return new DataBindingConfig(R.layout.fragment_host_config, BR.viewModel, viewModel) return new DataBindingConfig(R.layout.fragment_host_config, BR.viewModel, viewModel)
.addBindingParam(BR.sharedViewModel, sharedViewModel)
.addBindingParam(BR.click, new ClickHandler()); .addBindingParam(BR.click, new ClickHandler());
} }
@ -53,7 +52,6 @@ public class HostConfigFragment extends DataBindingFragment {
super.onResume(); super.onResume();
setToolBarTitleWithBackIcon("Host Configs"); setToolBarTitleWithBackIcon("Host Configs");
sharedViewModel.printerDisabled.setValue(!SystemParamsOperation.getInstance().getPrinterEnabled());
} }
@Override @Override
@ -77,10 +75,6 @@ public class HostConfigFragment extends DataBindingFragment {
} }
public void onPrint(){ public void onPrint(){
if (!SystemParamsOperation.getInstance().getPrinterEnabled()) {
showDeclineDialog("Printer is disabled!");
return;
}
sharedViewModel.printTerminalHostConfigs(); sharedViewModel.printTerminalHostConfigs();
} }
} }

View File

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="sharedViewModel"
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
<variable
name="manageViewModel"
type="com.utsmm.kbz.ui.management.ManagementViewModel" />
<variable
name="adapter"
type="com.utsmm.kbz.ui.management.HistoryAdapter" />
<variable
name="click"
type="com.utsmm.kbz.ui.dashboard.DashboardHistoryFragment.ClickEvent" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:padding="12dp"
android:layout_height="match_parent">
<LinearLayout
android:visibility="@{manageViewModel.detailReportLayoutVisibility}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:orientation="vertical">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lav_no_trans"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_margin="8dp"
app:lottie_autoPlay="true"
app:lottie_fileName="lottie_no_trans.json"
app:lottie_loop="true" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/rubik_regular"
android:text="@string/txt_trans_not_found"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="22sp"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lav_no_trans" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
app:adapter="@{adapter}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/item_view_history" />
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:orientation="horizontal"
android:visibility="@{manageViewModel.detailReportBottomLayoutVisibility}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_amount_cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:background="@drawable/bg_rounded_btn_cancel_cv"
android:onClick="@{()->click.onCancel()}"
android:text="@string/layout_cancel"
android:textColor="@color/colorPrimary" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_amount_confirm"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:background="@drawable/bg_rounded_btn_cv"
android:onClick="@{()->click.onPrint()}"
android:text="@string/layout_print"
android:textColor="@color/white" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -168,7 +168,10 @@
android:layout_width="120dp" android:layout_width="120dp"
android:layout_height="120dp" android:layout_height="120dp"
android:background="@drawable/honey" android:background="@drawable/honey"
android:onClick="@{() -> click.onClickHistory()}" android:clickable="@{mainViewModel.voidStatus}"
android:focusable="@{mainViewModel.voidStatus}"
android:alpha="@{mainViewModel.voidStatus ? 1f : 0.5f}"
android:onClick="@{() -> click.onClickVoid()}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/bt4" app:layout_constraintEnd_toStartOf="@+id/bt4"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@ -183,14 +186,14 @@
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginBottom="6dp" android:layout_marginBottom="6dp"
android:src="@drawable/ic_history" android:src="@drawable/ic_void_dash"
app:tint="@color/colorPrimary" /> app:tint="@color/colorPrimary" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/rubik_medium" android:fontFamily="@font/rubik_medium"
android:text="History" android:text="Void"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="14sp" android:textSize="14sp"

View File

@ -6,7 +6,6 @@
<data> <data>
<import type="com.utsmyanmar.paylibs.utils.POSUtil"/> <import type="com.utsmyanmar.paylibs.utils.POSUtil"/>
<import type="com.utsmyanmar.paylibs.utils.enums.HostType"/> <import type="com.utsmyanmar.paylibs.utils.enums.HostType"/>
<import type="android.view.View"/>
<variable <variable
name="sharedViewModel" name="sharedViewModel"
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" /> type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
@ -187,136 +186,136 @@
android:orientation="vertical"> android:orientation="vertical">
<!-- Report Header Table --> <!-- Report Header Table -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="vertical"--> android:orientation="vertical"
<!-- android:layout_marginBottom="16dp">--> android:layout_marginBottom="16dp">
<!-- &lt;!&ndash; Table Headers Row 1 &ndash;&gt;--> <!-- Table Headers Row 1 -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="horizontal"--> android:orientation="horizontal"
<!-- android:paddingVertical="8dp"--> android:paddingVertical="8dp"
<!-- android:background="@color/colorPrimary"--> android:background="@color/colorPrimary"
<!-- android:alpha="0.1">--> android:alpha="0.1">
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:text="@{sharedViewModel.hostType == HostType.QR ? `PAYMENT NAME`:`CARD NAME`}"--> android:text="@{sharedViewModel.hostType == HostType.QR ? `PAYMENT NAME`:`CARD NAME`}"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="12sp"--> android:textSize="12sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="center"--> android:textAlignment="center"
<!-- tools:text="CARD NAME" />--> tools:text="CARD NAME" />
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:text="@{sharedViewModel.hostType == HostType.QR ? ` `:`CARD NUMBER`}"--> android:text="@{sharedViewModel.hostType == HostType.QR ? ` `:`CARD NUMBER`}"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="12sp"--> android:textSize="12sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="center"--> android:textAlignment="center"
<!-- tools:text="CARD NUMBER" />--> tools:text="CARD NUMBER" />
<!-- </LinearLayout>--> </LinearLayout>
<!-- &lt;!&ndash; Table Headers Row 2 &ndash;&gt;--> <!-- Table Headers Row 2 -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="horizontal"--> android:orientation="horizontal"
<!-- android:paddingVertical="8dp"--> android:paddingVertical="8dp"
<!-- android:background="@color/colorPrimary"--> android:background="@color/colorPrimary"
<!-- android:alpha="0.1">--> android:alpha="0.1">
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:text="@string/txt_exp_date"--> android:text="@string/txt_exp_date"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="12sp"--> android:textSize="12sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="center" />--> android:textAlignment="center" />
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:text="@string/txt_trace_no"--> android:text="@string/txt_trace_no"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="12sp"--> android:textSize="12sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="center" />--> android:textAlignment="center" />
<!-- </LinearLayout>--> </LinearLayout>
<!-- &lt;!&ndash; Table Headers Row 3 &ndash;&gt;--> <!-- Table Headers Row 3 -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="horizontal"--> android:orientation="horizontal"
<!-- android:paddingVertical="8dp"--> android:paddingVertical="8dp"
<!-- android:background="@color/colorPrimary"--> android:background="@color/colorPrimary"
<!-- android:alpha="0.1">--> android:alpha="0.1">
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:text="@string/txt_transaction"--> android:text="@string/txt_transaction"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="12sp"--> android:textSize="12sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="center" />--> android:textAlignment="center" />
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:text="@string/txt_amount"--> android:text="@string/txt_amount"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="12sp"--> android:textSize="12sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="center" />--> android:textAlignment="center" />
<!-- </LinearLayout>--> </LinearLayout>
<!-- &lt;!&ndash; Table Headers Row 4 &ndash;&gt;--> <!-- Table Headers Row 4 -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="horizontal"--> android:orientation="horizontal"
<!-- android:paddingVertical="8dp"--> android:paddingVertical="8dp"
<!-- android:background="@color/colorPrimary"--> android:background="@color/colorPrimary"
<!-- android:alpha="0.1">--> android:alpha="0.1">
<!-- <TextView--> <TextView
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:text="@{sharedViewModel.hostType == HostType.QR ? `WAVE TRXN ID`:`REF NUM`}"--> android:text="@{sharedViewModel.hostType == HostType.QR ? `WAVE TRXN ID`:`REF NUM`}"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="12sp"--> android:textSize="12sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="center"--> android:textAlignment="center"
<!-- tools:text="REF NUM" />--> tools:text="REF NUM" />
<!-- </LinearLayout>--> </LinearLayout>
<!-- </LinearLayout>--> </LinearLayout>
<!-- Dotted Divider --> <!-- Dotted Divider -->
<View <View
@ -338,116 +337,116 @@
tools:listitem="@layout/item_view_detail_report" /> tools:listitem="@layout/item_view_detail_report" />
<!-- Report Summary --> <!-- Report Summary -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="vertical"--> android:orientation="vertical"
<!-- android:layout_marginTop="24dp"--> android:layout_marginTop="24dp"
<!-- android:padding="16dp"--> android:padding="16dp"
<!-- android:background="@color/colorPrimary"--> android:background="@color/colorPrimary"
<!-- android:alpha="0.1">--> android:alpha="0.1">
<!-- &lt;!&ndash; Summary Title &ndash;&gt;--> <!-- Summary Title -->
<!-- <TextView--> <TextView
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:text="@{manageViewModel.hostTypeDR}"--> android:text="@{manageViewModel.hostTypeDR}"
<!-- android:textAlignment="center"--> android:textAlignment="center"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="18sp"--> android:textSize="18sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:layout_marginBottom="16dp"--> android:layout_marginBottom="16dp"
<!-- tools:text="MPU" />--> tools:text="MPU" />
<!-- &lt;!&ndash; Summary Row &ndash;&gt;--> <!-- Summary Row -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="horizontal">--> android:orientation="horizontal">
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="2"--> android:layout_weight="2"
<!-- android:text="@{sharedViewModel.hostType == HostType.QR ? `TYPE`:`CARD TYPE`}"--> android:text="@{sharedViewModel.hostType == HostType.QR ? `TYPE`:`CARD TYPE`}"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="14sp"--> android:textSize="14sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="textStart"--> android:textAlignment="textStart"
<!-- tools:text="CARD TYPE" />--> tools:text="CARD TYPE" />
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:text="@string/txt_title_count"--> android:text="@string/txt_title_count"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="14sp"--> android:textSize="14sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="center" />--> android:textAlignment="center" />
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="2"--> android:layout_weight="2"
<!-- android:text="@string/txt_amount"--> android:text="@string/txt_amount"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="14sp"--> android:textSize="14sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="textEnd" />--> android:textAlignment="textEnd" />
<!-- </LinearLayout>--> </LinearLayout>
<!-- &lt;!&ndash; Summary Data Row &ndash;&gt;--> <!-- Summary Data Row -->
<!-- <LinearLayout--> <LinearLayout
<!-- android:layout_width="match_parent"--> android:layout_width="match_parent"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:orientation="horizontal"--> android:orientation="horizontal"
<!-- android:layout_marginTop="8dp">--> android:layout_marginTop="8dp">
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="2"--> android:layout_weight="2"
<!-- android:text="@{manageViewModel.cardTypeDR}"--> android:text="@{manageViewModel.cardTypeDR}"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="16sp"--> android:textSize="16sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="textStart"--> android:textAlignment="textStart"
<!-- tools:text="MPU" />--> tools:text="MPU" />
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="1"--> android:layout_weight="1"
<!-- android:text="@{manageViewModel.trnxCountDR}"--> android:text="@{manageViewModel.trnxCountDR}"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="16sp"--> android:textSize="16sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="monospace"--> android:fontFamily="monospace"
<!-- android:textAlignment="center"--> android:textAlignment="center"
<!-- tools:text="5" />--> tools:text="5" />
<!-- <TextView--> <TextView
<!-- android:layout_width="0dp"--> android:layout_width="0dp"
<!-- android:layout_height="wrap_content"--> android:layout_height="wrap_content"
<!-- android:layout_weight="2"--> android:layout_weight="2"
<!-- android:text="@{`MMK ` + POSUtil.getInstance().getDecimalAmountFormat(manageViewModel.totalAmountDR)}"--> android:text="@{`MMK ` + POSUtil.getInstance().getDecimalAmountFormat(manageViewModel.totalAmountDR)}"
<!-- android:textColor="@color/colorPrimary"--> android:textColor="@color/colorPrimary"
<!-- android:textSize="16sp"--> android:textSize="16sp"
<!-- android:textStyle="bold"--> android:textStyle="bold"
<!-- android:fontFamily="sans-serif-medium"--> android:fontFamily="sans-serif-medium"
<!-- android:textAlignment="textEnd"--> android:textAlignment="textEnd"
<!-- tools:text="MMK 10,000.00" />--> tools:text="MMK 10,000.00" />
<!-- </LinearLayout>--> </LinearLayout>
<!-- </LinearLayout>--> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -465,7 +464,7 @@
android:orientation="horizontal" android:orientation="horizontal"
android:padding="16dp" android:padding="16dp"
android:paddingBottom="24dp" android:paddingBottom="24dp"
android:visibility="@{sharedViewModel.printerDisabled ? View.GONE : manageViewModel.detailReportBottomLayoutVisibility}" android:visibility="@{manageViewModel.detailReportBottomLayoutVisibility}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">

View File

@ -257,7 +257,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="@{sharedViewModel.printerDisabled ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">

View File

@ -6,7 +6,6 @@
<data> <data>
<import type="com.utsmyanmar.paylibs.utils.POSUtil"/> <import type="com.utsmyanmar.paylibs.utils.POSUtil"/>
<import type="android.view.View"/>
<variable <variable
name="voidViewModel" name="voidViewModel"
type="com.utsmm.kbz.ui.sale_void.VoidViewModel" /> type="com.utsmm.kbz.ui.sale_void.VoidViewModel" />
@ -505,7 +504,7 @@
<!-- Reprint Buttons --> <!-- Reprint Buttons -->
<LinearLayout <LinearLayout
android:visibility="@{sharedViewModel.printerDisabled ? View.GONE : sharedViewModel.reprintBtnLayout}" android:visibility="@{sharedViewModel.reprintBtnLayout}"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"

View File

@ -4,16 +4,12 @@
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<data> <data>
<import type="android.view.View"/>
<variable <variable
name="summaryViewModel" name="summaryViewModel"
type="com.utsmm.kbz.ui.management.SummaryViewModel" /> type="com.utsmm.kbz.ui.management.SummaryViewModel" />
<variable <variable
name="manageViewModel" name="manageViewModel"
type="com.utsmm.kbz.ui.management.ManagementViewModel" /> type="com.utsmm.kbz.ui.management.ManagementViewModel" />
<variable
name="sharedViewModel"
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
<variable <variable
name="click" name="click"
type="com.utsmm.kbz.ui.management.TransactionSummaryFragment.ClickEvent" /> type="com.utsmm.kbz.ui.management.TransactionSummaryFragment.ClickEvent" />
@ -540,7 +536,6 @@
android:orientation="horizontal" android:orientation="horizontal"
android:padding="16dp" android:padding="16dp"
android:paddingBottom="24dp" android:paddingBottom="24dp"
android:visibility="@{sharedViewModel.printerDisabled ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">

View File

@ -147,9 +147,6 @@
<action <action
android:id="@+id/action_nav_main_to_versionFragment" android:id="@+id/action_nav_main_to_versionFragment"
app:destination="@id/versionFragment" /> app:destination="@id/versionFragment" />
<action
android:id="@+id/action_nav_main_to_dashboardHistoryFragment"
app:destination="@id/dashboardHistoryFragment" />
<action <action
android:id="@+id/action_nav_main_to_QRTransactionFragment" android:id="@+id/action_nav_main_to_QRTransactionFragment"
app:destination="@id/QRTransactionFragment" /> app:destination="@id/QRTransactionFragment" />
@ -620,8 +617,8 @@
app:launchSingleTop="true" app:launchSingleTop="true"
app:popUpTo="@+id/dashboardTransFragment" app:popUpTo="@+id/dashboardTransFragment"
app:popUpToInclusive="true" app:popUpToInclusive="true"
android:id="@+id/action_dashboardTransFragment_to_dashboardHistoryFragment" android:id="@+id/action_dashboardTransFragment_to_manageFunctionFragment"
app:destination="@id/dashboardHistoryFragment" /> app:destination="@id/managementFunctionFragment" />
<action <action
app:launchSingleTop="true" app:launchSingleTop="true"
app:popUpTo="@+id/dashboardTransFragment" app:popUpTo="@+id/dashboardTransFragment"
@ -677,18 +674,6 @@
android:id="@+id/action_dashboardPreAuthCancelBottomSheet_to_inputPasswordFragment" android:id="@+id/action_dashboardPreAuthCancelBottomSheet_to_inputPasswordFragment"
app:destination="@id/inputPasswordFragment" /> app:destination="@id/inputPasswordFragment" />
</dialog> </dialog>
<fragment
tools:layout="@layout/fragment_dashboard_history_screen"
android:id="@+id/dashboardHistoryFragment"
android:name="com.utsmm.kbz.ui.dashboard.DashboardHistoryFragment"
android:label="@string/title_history" >
<action
app:launchSingleTop="true"
app:popUpTo="@+id/mobile_navigation"
app:popUpToInclusive="true"
android:id="@+id/action_dashboardHistoryFragment_to_nav_main"
app:destination="@id/nav_main" />
</fragment>
<fragment <fragment
tools:layout="@layout/fragment_print_receipt_screen" tools:layout="@layout/fragment_print_receipt_screen"
android:id="@+id/printReceiptFragment" android:id="@+id/printReceiptFragment"