mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-30 21:04:16 +00:00
add project adins
This commit is contained in:
parent
ad06ac5505
commit
f8f85d679d
5299 changed files with 625430 additions and 0 deletions
|
@ -0,0 +1,161 @@
|
|||
package com.adins.mss.coll;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.mikepenz.aboutlibraries.entity.Library;
|
||||
import com.mikepenz.aboutlibraries.entity.License;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ChangeLog {
|
||||
public static ArrayList<Library> library = new ArrayList<Library>();
|
||||
|
||||
public ChangeLog(Context context) {
|
||||
String authorLogv2_0_0 = "AdIns";
|
||||
String appNameLogv2_0_0 = "MSSCOLL";
|
||||
int buildVersion = Global.BUILD_VERSION;
|
||||
License licenseLogv2_0_0 = new License();
|
||||
licenseLogv2_0_0.setLicenseName("Apache Version 2.0");
|
||||
|
||||
library.add(0, new Library("06/06/2015", appNameLogv2_0_0, context.getString(R.string.changelog_v200),
|
||||
"2.0.0.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("06/01/2016", appNameLogv2_0_0, context.getString(R.string.changelog_v210),
|
||||
"2.1.0.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("01/06/2016", appNameLogv2_0_0, context.getString(R.string.changelog_v220),
|
||||
"2.2.0.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("06/12/2016", appNameLogv2_0_0, context.getString(R.string.changelog_v230),
|
||||
"2.3.0.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("29/12/2016", appNameLogv2_0_0, context.getString(R.string.changelog_v2310),
|
||||
"2.3.1.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("19/01/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2320),
|
||||
"2.3.2.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("07/03/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2330),
|
||||
"2.3.3.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("04/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2340),
|
||||
"2.3.4.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("08/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2350),
|
||||
"2.3.5.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("09/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2360),
|
||||
"2.3.6.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("12/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2370),
|
||||
"2.3.7.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("15/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2380),
|
||||
"2.3.8.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("16/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2390),
|
||||
"2.3.9.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("17/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23100),
|
||||
"2.3.10.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("22/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23110),
|
||||
"2.3.11.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("23/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23120),
|
||||
"2.3.12.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("24/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23130),
|
||||
"2.3.13.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("26/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23140),
|
||||
"2.3.14.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("29/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23150),
|
||||
"2.3.15.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("30/05/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23160),
|
||||
"2.3.16.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("02/06/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23170),
|
||||
"2.3.17.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("06/06/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23180),
|
||||
"2.3.18.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("07/06/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v23190),
|
||||
"2.3.19.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("07/07/2017", appNameLogv2_0_0, context.getString(R.string.changelog_v2400),
|
||||
"2.4.0.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("26/02/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v2500),
|
||||
"2.5.0.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("22/10/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3000),
|
||||
"3.0.0.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("19/11/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3001),
|
||||
"3.0.0.1", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("27/11/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3002),
|
||||
"3.0.0.2", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("04/12/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3003),
|
||||
"3.0.0.3", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("07/12/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3004),
|
||||
"3.0.0.4", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("11/12/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3005),
|
||||
"3.0.0.5", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("11/12/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3006),
|
||||
"3.0.0.6", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("12/12/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3007),
|
||||
"3.0.0.7", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("12/12/2018", appNameLogv2_0_0, context.getString(R.string.changelog_v3008),
|
||||
"3.0.0.8", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("18/01/2019", appNameLogv2_0_0, context.getString(R.string.changelog_v3009),
|
||||
"3.0.0.9", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("21/06/2019", appNameLogv2_0_0, context.getString(R.string.changelog_v30013),
|
||||
"3.0.0.13", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("01/08/2019", appNameLogv2_0_0, context.getString(R.string.changelog_v30017),
|
||||
"3.0.0.17", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("22/11/2019", appNameLogv2_0_0, context.getString(R.string.changelog_v30029),
|
||||
"3.0.0.29", licenseLogv2_0_0, buildVersion));
|
||||
library.add(0, new Library("04/023/2020", appNameLogv2_0_0, context.getString(R.string.changelog_v3110),
|
||||
"3.1.1.0", licenseLogv2_0_0, buildVersion));
|
||||
library.add(0, new Library("04/27/2020", appNameLogv2_0_0, context.getString(R.string.changelog_v3120),
|
||||
"3.1.2.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("05/27/2020", appNameLogv2_0_0, context.getString(R.string.changelog_v3130),
|
||||
"3.1.3.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("01/10/2020", appNameLogv2_0_0, context.getString(R.string.changelog_v3140),
|
||||
"3.1.4.0", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("18/03/2021", appNameLogv2_0_0, context.getString(R.string.changelog_v3201),
|
||||
"3.2.0.1", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("12/04/2021", appNameLogv2_0_0, context.getString(R.string.changelog_v3202),
|
||||
"3.2.0.2", licenseLogv2_0_0, buildVersion));
|
||||
|
||||
library.add(0, new Library("27/02/2024", appNameLogv2_0_0, context.getString(R.string.changelog_v3202),
|
||||
"3.3.0.1", licenseLogv2_0_0, buildVersion));
|
||||
}
|
||||
|
||||
public static ArrayList<Library> getChangeLog(Context context) {
|
||||
library = new ArrayList<Library>();
|
||||
new ChangeLog(context);
|
||||
|
||||
return library;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.adins.mss.base.cleansing;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.adins.mss.dao.DaoMaster;
|
||||
import com.adins.mss.foundation.db.dataaccess.CollectionHistoryDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.CommentDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.DepositReportDDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.DepositReportHDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.GeneralParameterDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.GroupUserDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.HolidayDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.ImageResultDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.InstallmentScheduleDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.LocationInfoDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.LoggerDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.LookupDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.MenuDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.MessageDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.MobileContentDDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.MobileContentHDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.PaymentHistoryDDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.PaymentHistoryHDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.PrintItemDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.PrintResultDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.QuestionSetDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.ReceiptVoucherDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.SchemeDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.SyncDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TaskDDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TaskHDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TaskSummaryDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TimelineDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TimelineTypeDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.UserDataAccess;
|
||||
|
||||
import de.greenrobot.dao.database.Database;
|
||||
|
||||
//import com.adins.mss.foundation.db.dataaccess.PaymentHistoryDataAccess;
|
||||
|
||||
public class ApplicationCleansingManager {
|
||||
/**
|
||||
* This method is used to delete all data in local storage database
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
public static void deleteAllDataInAllTable(Context context) {
|
||||
////////////////////////////////
|
||||
|
||||
CommentDataAccess.clean(context);
|
||||
TimelineDataAccess.clean(context);
|
||||
TimelineTypeDataAccess.clean(context);
|
||||
MessageDataAccess.clean(context);
|
||||
|
||||
LoggerDataAccess.clean(context);
|
||||
|
||||
LocationInfoDataAccess.clean(context);
|
||||
|
||||
MenuDataAccess.clean(context);
|
||||
ReceiptVoucherDataAccess.clean(context);
|
||||
InstallmentScheduleDataAccess.clean(context);
|
||||
DepositReportDDataAccess.clean(context);
|
||||
DepositReportHDataAccess.clean(context);
|
||||
CollectionHistoryDataAccess.clean(context);
|
||||
//PaymentHistoryDataAccess.clean(context);
|
||||
PaymentHistoryDDataAccess.clean(context);
|
||||
PaymentHistoryHDataAccess.clean(context);
|
||||
ImageResultDataAccess.clean(context);
|
||||
PrintResultDataAccess.clean(context);
|
||||
LookupDataAccess.clean(context);
|
||||
QuestionSetDataAccess.clean(context);
|
||||
PrintItemDataAccess.clean(context);
|
||||
TaskDDataAccess.clean(context);
|
||||
TaskHDataAccess.clean(context);
|
||||
TaskSummaryDataAccess.clean(context);
|
||||
SchemeDataAccess.clean(context);
|
||||
MobileContentDDataAccess.clean(context);
|
||||
MobileContentHDataAccess.clean(context);
|
||||
|
||||
GroupUserDataAccess.clean(context);
|
||||
|
||||
GeneralParameterDataAccess.clean(context);
|
||||
|
||||
UserDataAccess.clean(context);
|
||||
|
||||
SyncDataAccess.clean(context);
|
||||
HolidayDataAccess.clean(context);
|
||||
////////////////////////////////////////
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to drop all atable in local storage database
|
||||
*
|
||||
* @param db
|
||||
*/
|
||||
public static void dropAllTable(Database db) {
|
||||
DaoMaster.dropAllTables(db, true);
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
|
@ -0,0 +1,78 @@
|
|||
package com.adins.mss.odr.model;
|
||||
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class JsonRequestSubmitAssign extends MssRequestType{
|
||||
/** Property uuid_user */
|
||||
@SerializedName("uuid_user")
|
||||
String uuid_user;
|
||||
|
||||
/** Property uuid_task_h */
|
||||
@SerializedName("uuid_task_h")
|
||||
String uuid_task_h;
|
||||
|
||||
/** Property flag */
|
||||
@SerializedName("flag")
|
||||
String flag;
|
||||
|
||||
/** Property notes */
|
||||
@SerializedName("notes")
|
||||
String notes;
|
||||
|
||||
/**
|
||||
* Gets the uuid_user
|
||||
*/
|
||||
public String getUuid_user() {
|
||||
return this.uuid_user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the uuid_user
|
||||
*/
|
||||
public void setUuid_user(String value) {
|
||||
this.uuid_user = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the uuid_task_h
|
||||
*/
|
||||
public String getUuid_task_h() {
|
||||
return this.uuid_task_h;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the uuid_task_h
|
||||
*/
|
||||
public void setUuid_task_h(String value) {
|
||||
this.uuid_task_h = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the flag
|
||||
*/
|
||||
public String getFlag() {
|
||||
return this.flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the flag
|
||||
*/
|
||||
public void setFlag(String value) {
|
||||
this.flag = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the notes
|
||||
*/
|
||||
public String getNotes() {
|
||||
return this.notes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the notes
|
||||
*/
|
||||
public void setNotes(String value) {
|
||||
this.notes = value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
AITMSS
|
|
@ -0,0 +1,291 @@
|
|||
package com.adins.mss.base.checkin;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.R;
|
||||
import com.adins.mss.base.crashlytics.FireCrash;
|
||||
import com.adins.mss.base.errorhandler.ErrorMessageHandler;
|
||||
import com.adins.mss.base.errorhandler.IShowError;
|
||||
import com.adins.mss.base.timeline.TimelineManager;
|
||||
import com.adins.mss.base.util.GsonHelper;
|
||||
import com.adins.mss.base.util.Utility;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.LocationInfo;
|
||||
import com.adins.mss.foundation.dialog.NiftyDialogBuilder;
|
||||
import com.adins.mss.foundation.formatter.Tool;
|
||||
import com.adins.mss.foundation.http.HttpConnectionResult;
|
||||
import com.adins.mss.foundation.http.HttpCryptedConnection;
|
||||
import com.adins.mss.foundation.image.ImageLoader;
|
||||
import com.adins.mss.foundation.security.storepreferences.ObscuredSharedPreferences;
|
||||
import com.google.firebase.perf.FirebasePerformance;
|
||||
import com.google.firebase.perf.metrics.HttpMetric;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
||||
/**
|
||||
* @author gigin.ginanjar
|
||||
*/
|
||||
public class CheckInLocationTask extends AsyncTask<Void, Void, String> implements IShowError {
|
||||
private static String TAG = "CHECK IN LOCATION";
|
||||
LocationInfo locationInfo;
|
||||
String result;
|
||||
String errMessage = null;
|
||||
private ProgressDialog progressDialog;
|
||||
private WeakReference<Context> context;
|
||||
private WeakReference<Activity> activity;
|
||||
private String messageWait;
|
||||
private String messageUnavaiableLocation;
|
||||
private String[] address;
|
||||
private byte[] bitmapArray;
|
||||
private String attdAddress;
|
||||
private ErrorMessageHandler errorMessageHandler;
|
||||
/**
|
||||
* Inisialisasi Check In Location Task
|
||||
*
|
||||
* @param activity -Context
|
||||
* @param msgWait - Waiting Message
|
||||
* @param messageUnavaiableLocation - message if unavailable
|
||||
* @param locationInfo - Location Info
|
||||
* @param address - String[] Address
|
||||
*/
|
||||
public CheckInLocationTask(Activity activity, String msgWait, String messageUnavaiableLocation, LocationInfo locationInfo, String[] address) {
|
||||
this.activity = new WeakReference<>(activity);
|
||||
this.context = new WeakReference<Context>(activity);
|
||||
this.messageWait = msgWait;
|
||||
this.messageUnavaiableLocation = messageUnavaiableLocation;
|
||||
this.address = address;
|
||||
this.locationInfo = locationInfo;
|
||||
}
|
||||
|
||||
public CheckInLocationTask(Context activity, String msgWait, String messageUnavaiableLocation, LocationInfo locationInfo, String[] address) {
|
||||
this.context = new WeakReference<>(activity);
|
||||
this.messageWait = msgWait;
|
||||
this.messageUnavaiableLocation = messageUnavaiableLocation;
|
||||
this.address = address;
|
||||
this.locationInfo = locationInfo;
|
||||
errorMessageHandler = new ErrorMessageHandler(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
progressDialog = ProgressDialog.show(context.get(), "", this.messageWait, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doInBackground(Void... params) {
|
||||
String lat;
|
||||
String lng;
|
||||
HttpConnectionResult resultServer = null;
|
||||
if (Tool.isInternetconnected(context.get())) {
|
||||
if (locationInfo != null) {
|
||||
lat = locationInfo.getLatitude();
|
||||
lng = locationInfo.getLongitude();
|
||||
|
||||
List<LocationInfo> list = new ArrayList<>();
|
||||
list.add(locationInfo);
|
||||
|
||||
attdAddress = context.get().getString(R.string.address_not_found);
|
||||
if (address != null)
|
||||
attdAddress = address[1] != null ? address[1] : context.get().getString(R.string.address_not_found);
|
||||
|
||||
JsonRequestAbsensi requestAbsensi = new JsonRequestAbsensi();
|
||||
requestAbsensi.setAudit(GlobalData.getSharedGlobalData().getAuditData());
|
||||
requestAbsensi.addImeiAndroidIdToUnstructured();
|
||||
requestAbsensi.setLocationInfo(list);
|
||||
requestAbsensi.setAttd_address(attdAddress);
|
||||
|
||||
String json = GsonHelper.toJson(requestAbsensi);
|
||||
|
||||
try {
|
||||
boolean encrypt = GlobalData.getSharedGlobalData().isEncrypt();
|
||||
boolean decrypt = GlobalData.getSharedGlobalData().isDecrypt();
|
||||
HttpCryptedConnection httpConn = new HttpCryptedConnection(context.get(), encrypt, decrypt);
|
||||
String url = GlobalData.getSharedGlobalData().getURL_GET_ABSENSI();
|
||||
|
||||
//Firebase Performance Trace HTTP Request
|
||||
HttpMetric networkMetric =
|
||||
FirebasePerformance.getInstance().newHttpMetric(url, FirebasePerformance.HttpMethod.POST);
|
||||
Utility.metricStart(networkMetric, json);
|
||||
|
||||
resultServer = httpConn.requestToServer(url, json, Global.DEFAULTCONNECTIONTIMEOUT);
|
||||
try {
|
||||
Utility.metricStop(networkMetric, resultServer);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
result = resultServer.getResult();
|
||||
|
||||
try {
|
||||
String image_url = "https://maps.googleapis.com/maps/api/staticmap?center=" + lat + "," + lng + "&zoom=15&size=720x300&maptype=roadmap&markers=color:green%7Clabel:I%7C" + lat + "," + lng;
|
||||
|
||||
ImageLoader imgLoader = new ImageLoader(context.get());
|
||||
Bitmap bitmap = imgLoader.getBitmap(image_url);
|
||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 80, stream);
|
||||
|
||||
bitmapArray = stream.toByteArray();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
|
||||
//** debug version
|
||||
if (Global.IS_DEV) {
|
||||
Log.i(TAG, "check in " + locationInfo.toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
if (Global.IS_DEV)
|
||||
e.printStackTrace();
|
||||
errMessage = context.get().getString(R.string.msgUnavaibleLocationCheckIn);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
errMessage = context.get().getString(R.string.no_internet_connection);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(String result) {
|
||||
if (progressDialog.isShowing()) {
|
||||
try {
|
||||
progressDialog.dismiss();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (errMessage != null) {
|
||||
Log.i(TAG, "check in " + locationInfo.toString());
|
||||
if (errMessage.equals(context.get().getString(R.string.no_internet_connection))) {
|
||||
errorMessageHandler.processError(context.get().getString(R.string.info_capital)
|
||||
,errMessage, ErrorMessageHandler.DIALOG_TYPE);
|
||||
} else {
|
||||
errorMessageHandler.processError(context.get().getString(R.string.error_capital)
|
||||
,context.get().getString(R.string.connection_failed)
|
||||
, ErrorMessageHandler.DIALOG_TYPE);
|
||||
}
|
||||
} else {
|
||||
if (result != null) {
|
||||
try {
|
||||
JsonResponseAbsensi response = GsonHelper.fromJson(result, JsonResponseAbsensi.class);
|
||||
int code = response.getStatus().getCode();
|
||||
if (code == 0) {
|
||||
String resultResponse = null;
|
||||
try {
|
||||
resultResponse = response.getResult();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
if (("1").equalsIgnoreCase(response.getSuccess())) {
|
||||
if (Pattern.compile(Pattern.quote("Tidak berhasil"), Pattern.CASE_INSENSITIVE).matcher(resultResponse).find()) {
|
||||
final NiftyDialogBuilder dialogBuilder = NiftyDialogBuilder.getInstance(context.get());
|
||||
dialogBuilder.withTitle(context.get().getString(R.string.info_capital))
|
||||
.withMessage(resultResponse)
|
||||
.withButton1Text(context.get().getString(R.string.btnOk))
|
||||
.setButton1Click(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialogBuilder.dismiss();
|
||||
}
|
||||
})
|
||||
.isCancelable(true)
|
||||
.show();
|
||||
} else {
|
||||
try {
|
||||
String message = "";
|
||||
message = resultResponse;
|
||||
locationInfo.setLocation_type(Global.LOCATION_TYPE_CHECKIN);
|
||||
TimelineManager.insertTimeline(context.get(), locationInfo, message, attdAddress, bitmapArray);
|
||||
|
||||
CheckInManager.insertLocationCheckInToDB(context.get(), locationInfo);
|
||||
|
||||
final NiftyDialogBuilder dialogBuilder = NiftyDialogBuilder.getInstance(context.get());
|
||||
dialogBuilder.withTitle(context.get().getString(R.string.success))
|
||||
.withMessage(message)
|
||||
.withButton1Text(context.get().getString(R.string.btnOk))
|
||||
.setButton1Click(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialogBuilder.dismiss();
|
||||
}
|
||||
})
|
||||
.isCancelable(true)
|
||||
.show();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
try {
|
||||
CheckInManager.insertLocationCheckInToDB(context.get(), locationInfo);
|
||||
String message = "";
|
||||
message = resultResponse;
|
||||
TimelineManager.insertTimeline(context.get(), locationInfo, message, attdAddress, bitmapArray);
|
||||
} catch (Exception en) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if(response.getSuccess().equalsIgnoreCase("0")) {//gagal karena sudah pernah login
|
||||
NiftyDialogBuilder dialogBuilder = NiftyDialogBuilder.getInstance(context.get());
|
||||
dialogBuilder.withTitle(context.get().getString(R.string.info_capital))
|
||||
.withMessage(resultResponse)
|
||||
.isCancelable(true)
|
||||
.show();
|
||||
} else {
|
||||
if (resultResponse == null) {
|
||||
resultResponse = context.get().getString(R.string.empty_data);
|
||||
errorMessageHandler.processError(context.get().getString(R.string.info_capital), resultResponse, ErrorMessageHandler.DIALOG_TYPE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
errorMessageHandler.processError(context.get().getString(R.string.warning_capital)
|
||||
,response.getStatus().getMessage()
|
||||
, ErrorMessageHandler.DIALOG_TYPE);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
errorMessageHandler.processError(context.get().getString(R.string.error_capital)
|
||||
,result
|
||||
, ErrorMessageHandler.DIALOG_TYPE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String errorSubject, String errorMsg, int notifType) {
|
||||
if(GlobalData.isRequireRelogin()){
|
||||
return;
|
||||
}
|
||||
if(notifType == ErrorMessageHandler.DIALOG_TYPE){
|
||||
final NiftyDialogBuilder dialogBuilder = NiftyDialogBuilder.getInstance(context.get());
|
||||
dialogBuilder.withTitle(errorSubject)
|
||||
.withMessage(errorMsg)
|
||||
.withButton1Text(context.get().getString(R.string.btnOk))
|
||||
.setButton1Click(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialogBuilder.dismiss();
|
||||
}
|
||||
})
|
||||
.isCancelable(true)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,296 @@
|
|||
<resources>
|
||||
<string name="app_name">CheckId</string>
|
||||
<string name="appVersion">v2.1.0.1</string>
|
||||
|
||||
<string name="action_settings">Pengaturan</string>
|
||||
|
||||
<!-- Left Menu -->
|
||||
<string name="drawer_open">Open drawer</string>
|
||||
<string name="drawer_close">close_drawer</string>
|
||||
|
||||
<!-- CHECK ORDER -->
|
||||
|
||||
<string name="btnLookupCMO">Lookup CMO</string>
|
||||
<string name="btnLookupCMOMH">Lookup CMO / MH</string>
|
||||
<string name="lblSearchBy">Pilih Pencarian</string>
|
||||
<string name="lblStartDate">Tanggal Awal</string>
|
||||
<string name="lblEndDate">Tanggal Akhir</string>
|
||||
<string name="lblNomorOrder">Nomor Order</string>
|
||||
<string name="btnSearchOrder">Cari</string>
|
||||
<string name="menu">Main Menu</string>
|
||||
<string name="cekOrder">Check Order</string>
|
||||
<string name="btnOpen">Buka</string>
|
||||
<string name="lblSearchByStatus">Status</string>
|
||||
<string name="btnOk">OK</string>
|
||||
|
||||
<!-- SURVEY VERIFICATION-->
|
||||
|
||||
<string name="chooseOne"> Pilih Satu </string>
|
||||
<string name="workflowByForm"> Alur Kerja dengan Form</string>
|
||||
<string name="pleaseChooseOne">Silahkan memilih salah satu aksi</string>
|
||||
|
||||
<string-array name="cbSearchByStatus">
|
||||
<item>ALL</item>
|
||||
<item>On Survey</item>
|
||||
<item>On CA</item>
|
||||
</string-array>
|
||||
<string-array name="cbUpdateOrder">
|
||||
<item>Open Order</item>
|
||||
<item>Cancel Order</item>
|
||||
</string-array>
|
||||
<string-array name="cbOrderReassign">
|
||||
<item>Date</item>
|
||||
<!-- <item >Nomor Order</item> -->
|
||||
</string-array>
|
||||
<string-array name="cbSearchBy">
|
||||
<item>Tanggal</item>
|
||||
<item>Bulan</item>
|
||||
<item>Estimasi Tanggal</item>
|
||||
</string-array>
|
||||
<string-array name="cbSearchByMonth">
|
||||
<item>Januari</item>
|
||||
<item>Februari</item>
|
||||
<item>Maret</item>
|
||||
<item>April</item>
|
||||
<item>Mei</item>
|
||||
<item>Juni</item>
|
||||
<item>Juli</item>
|
||||
<item>Agustus</item>
|
||||
<item>September</item>
|
||||
<item>Oktober</item>
|
||||
<item>November</item>
|
||||
<item>Desember</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Main Menu -->
|
||||
<!-- Main Menu -->
|
||||
<string name="title_mn_home">Home</string>
|
||||
<string name="title_mn_tasklist">DAFTAR TUGAS</string>
|
||||
<string name="title_mn_log">LOG</string>
|
||||
<string name="title_mn_reportsummary">Report Summary</string>
|
||||
<string name="title_mn_depositreport">Deposit Report</string>
|
||||
<string name="title_mn_absentin">ABSEN MASUK</string>
|
||||
<string name="title_mn_synchronize">SINKRONISASI</string>
|
||||
<string name="title_mn_about">INFO</string>
|
||||
<string name="title_mn_exit">KELUAR</string>
|
||||
<string name="title_mn_newtask">TUGAS BARU</string>
|
||||
<string name="title_mn_surveyperformance">PERFORMA SURVEI</string>
|
||||
<string name="title_mn_surveyverification">VERIFIKASI SURVEI</string>
|
||||
<string name="title_mn_surveyapproval">PERSETUJUAN SURVEI</string>
|
||||
<string name="title_mn_checkorder">Check Order</string>
|
||||
<string name="title_mn_creditsimulation">Credit Simulation</string>
|
||||
<string name="title_mn_news">News</string>
|
||||
<string name="title_mn_promo">Promo</string>
|
||||
<string name="title_mn_orderassign">Order Assignment</string>
|
||||
<string name="title_mn_orderreassign">Order Re-Assignment</string>
|
||||
<string name="title_mn_cancelorder">Cancel Order</string>
|
||||
<string name="title_mn_surveyassign">TUGAS SURVEI</string>
|
||||
<string name="title_mn_surveyreassign">PENUGASAN KEMBALI</string>
|
||||
<string name="title_mn_verification_bybranch">VERIFIKASI BERDASARKAN CABANG</string>
|
||||
<string name="title_mn_approval_bybranch">PERSETUJUAN BERDASARKAN CABANG</string>
|
||||
<string name="title_mn_changepassword">Change Password</string>
|
||||
<string name="title_mn_paymenthistory">Payment History</string>
|
||||
<string name="title_mn_installmentschedule">Installment Schedule</string>
|
||||
<string name="title_mn_absentout">Check Out</string>
|
||||
<string name="title_mn_setting">Settings</string>
|
||||
<string name="login_desc">Login ke Aplikasi CheckId</string>
|
||||
<string name="text_gps">GPS</string>
|
||||
<string name="filter_by">Pilih filter</string>
|
||||
<string name="news_not_found">Promo tidak ditemukan</string>
|
||||
<string name="nama_customer">Nama Konsumen</string>
|
||||
<string name="form_name">Nama Form</string>
|
||||
<string name="toast_crash">Ooooops ! Terjadi crash, report sudah dikirim ke developer untuk perbaikan issue ini!</string>
|
||||
<string name="approve_failed">Approval Task tidak berhasil</string>
|
||||
<string name="approve_success">Task berhasil di approve</string>
|
||||
<string name="get_suggestion_user">Mendapatkan User yang disarankan...</string>
|
||||
<string name="reject_failed">Task tidak berhasil di reject</string>
|
||||
<string name="reject_success">Task berhasil di reject</string>
|
||||
<string name="selectOne">PIlih salah satu</string>
|
||||
<string name="title_activity_survey_verification_action">Survey Verifikasi</string>
|
||||
<string name="taskChanged">Status task telah berubah.</string>
|
||||
|
||||
<string name="hello_world">Hello world!</string>
|
||||
<string name="title_activity_developer_option">Dev Options</string>
|
||||
<string name="changelog_v230"><![CDATA[Perbaikan: <br/>
|
||||
1. Support Multilingual <br/>
|
||||
2. Update compatibility untuk Android M <br/>
|
||||
3. Support refresh lokasi dengan mengetuk GPS Icon <br/>
|
||||
4. Peningkatan performa <br/>
|
||||
5. Perbaikan managemen memory <br/>
|
||||
6. Menampilkan radius accuracy di tampilan peta<br/>
|
||||
7. Menampilkan pertanyaan tidak relevan secara otomatis<br/>
|
||||
8. Mendukung menyalin jawaban dari pertanyaan lain <br/>
|
||||
9. Mendukung validasi pertanyaan tingkat lanjut <br/>
|
||||
10. Minor Bug fixes]]></string>
|
||||
<string name="action_not_available">Tidak tersedia aksi untuk Task ini</string>
|
||||
<string name="changelog_v2310"><![CDATA[Perbaikan: <br/>
|
||||
1. Mendukung menyalin jawaban dengan kondisi tertentu]]></string>
|
||||
<string name="changelog_v2320"><![CDATA[Perbaikan: <br/>
|
||||
1. perbaikan gambar profile dan gambar cover
|
||||
]]></string>
|
||||
<string name="changelog_v200"><![CDATA[Perbaikan: <br/>
|
||||
1. Mendukung fitur linimasa tugas<br/>
|
||||
2. Mendukung menu navigasi]]></string>
|
||||
<string name="changelog_v210"><![CDATA[Perbaikan: <br/>
|
||||
1. Mendukung fitur Survey Approval<br/>
|
||||
2. Mendukung fitur Survey Verification]]></string>
|
||||
<string name="changelog_v220"><![CDATA[Perbaikan: <br/>
|
||||
1. Mendukung fitur Survey Approval By Branch<br/>
|
||||
2. Mendukung fitur Survey Verification By Branch<br/>
|
||||
3. Mendukung fitur Reschedule Survey]]></string>
|
||||
<string name="changelog_v2330"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan Sinkronisasi<br/>
|
||||
2. Perbaikan Linimasa untuk Absensi<br/>
|
||||
3. Perbaikan memuat jawaban pertanyaan<br/>
|
||||
4. Menambahkan pengecekan root device]]></string>
|
||||
<string name="changelog_v2340"><![CDATA[Perbaikan: <br/>
|
||||
1. Alphanumeric pada Password]]></string>
|
||||
<string name="changelog_v2350"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug<br/>
|
||||
2. Menghilangkan Form tidak aktif]]></string>
|
||||
<string name="changelog_v2360"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v2370"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug
|
||||
2. Perbaikan eror pada GPS]]></string>
|
||||
<string name="changelog_v2380"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v2390"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23100"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23110"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23120"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23130"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23140"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23150"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23160"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23170"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23180"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v23190"><![CDATA[Perbaikan: <br/>
|
||||
1. Perbaikan bug]]></string>
|
||||
<string name="changelog_v2400"><![CDATA[Perbaikan: <br/>
|
||||
1. Penambahan informasi terkait device di menu about<br/>
|
||||
2. Mendukung tipe jawaban online lookup<br/>
|
||||
3. Tampilan task list dapat berupa box atau list]]></string>
|
||||
<string name="changelog_v2500"><![CDATA[Changes: <br/>
|
||||
1. Interaksi antarmuka baru<br/>
|
||||
2. Penambahan sinkronisasi data<br/>
|
||||
3. Perbaikan bug]]></string>
|
||||
<string name="changelog_v3000"><![CDATA[Changes: <br/>
|
||||
1. Pesan dan informasi lebih mudah dibaca<br/>
|
||||
2. Mendukung konfigurasi tema<br/>
|
||||
3. Mendukung foto profil yang bulat<br/>
|
||||
4. Penambahan kode unik<br/>
|
||||
5. Penambahan timestamp foto<br/>
|
||||
6. Perbaikan bug]]></string>
|
||||
<string name="changelog_v3001"><![CDATA[Changes: <br/>
|
||||
1. Menambah toggle untuk visibilitas password pada halaman Change Password<br/>
|
||||
2. Mengubah pesan error untuk connection timeout<br/>
|
||||
3. Perbaikan bug dialog nonaktifkan Fake GPS tidak muncul ketika menggunakan lokasi palsu<br/>
|
||||
4. Perbaikan bug pada pesan user tidak aktif<br/>
|
||||
5. Menambah Migrasi Database dari Versi 2.5 ke 3.0<br/>
|
||||
6. Perbaikan header task hilang setelah simpan draft<br/>
|
||||
7. Perbaikan tipe dropdown search pada halaman Survey Performance]]></string>
|
||||
<string name="changelog_v3002"><![CDATA[Changes: <br/>
|
||||
1. Perbaikan Search Timeline tidak ada pilihan Uploading Task meskipun ada task yang statusnya uploading.<br/>
|
||||
2. Perbaikan bug tidak tampil semua option pada radio button dynamic form.<br/>
|
||||
3. Perbaikan bug dialog nonaktifkan Fake GPS tidak muncul ketika menggunakan lokasi palsu.<br/>
|
||||
4. Perbaikan bug tidak dapat memunculkan opsi developer pada kanan atas aplikasi.<br/>
|
||||
5. Perbaikan bug jawaban hilang ketika memulai task dari draft setelah ganti user.<br/>
|
||||
6. Penambahan pengecekan regex pada input nama customer.]]></string>
|
||||
<string name="changelog_v3003"><![CDATA[Changes: <br/>
|
||||
1. Perbaikan google play service update bisa diabaikan.<br/>
|
||||
2. Penambahan submit lokasi untuk reschedule task.<br/>
|
||||
3. Perbaikan task list tidak update.<br/>
|
||||
4. Perbaikan notifikasi uploading.<br/>
|
||||
5. Set default bulan berjalan di survey performance.<br/>
|
||||
6. Perbaikan log online.<br/>
|
||||
7. Penambahan notification channel untuk foreground service notification.<br/>
|
||||
8. Perbaikan pertanyaan tipe option dan multiple memiliki duplikasi jawaban.<br/>
|
||||
9. Perbaikan pertanyaan option choice filter tidak tampil.<br/>
|
||||
10.Penjagaan format datetime dengan panjang lebih dari 14 karakter pada DateTimePicker.<br/>
|
||||
11.Perbaikan crash saat submit task manual menggunakan long click.]]></string>
|
||||
<string name="changelog_v3004"><![CDATA[Changes: <br/>
|
||||
1. Perbaikan fitur push tema.<br/>
|
||||
2. Menampilkan notifikasi aplikasi sedang berjalan.<br/>
|
||||
3. Perbaikan crash ketika membuka menu daftar task.<br/>
|
||||
4. Perbaikan fitur filter task.<br/>
|
||||
5. Perbaikan minor bugs.]]></string>
|
||||
<string name="changelog_v3005"><![CDATA[Changes: <br/>
|
||||
1. Penambahan pengecekan dan update status task survey approval atau verification sesuai data di server.<br/>
|
||||
2. Fix minor bugs.]]></string>
|
||||
<string name="changelog_v3006"><![CDATA[Changes: <br/>
|
||||
1. Perbaikan fragment overlapped.<br/>
|
||||
3. Perbaikan sync question set.<br/>
|
||||
4. Perbaikan filter status pending tidak ada hasil.]]></string>
|
||||
<string name="changelog_v3007"><![CDATA[Changes: <br/>
|
||||
1. Perbaikan add taskd untuk log online.<br/>
|
||||
2. Perbaikan bug di viewholder.<br/>
|
||||
3. Perbaikan answer location, brand, dan model task approval tidak tampil pada halaman review.<br/>
|
||||
4. Menseragamkan format request submit task melalui force send, auto send, dan send biasa.<br/>
|
||||
5. Perbaikan bug timeline task header tertukar ketika diklik.<br/>
|
||||
6. Perbaikan minor bug.]]></string>
|
||||
<string name="changelog_v3008"><![CDATA[Changes: <br/>
|
||||
1. Perbaikan minor bug.]]></string>
|
||||
<string name="changelog_v3009"><![CDATA[Changes: <br/>
|
||||
1. Perbaikan timeline saat upgrade dari versi 2.5 ke 3.0.<br/>
|
||||
2. Menambah fitur bypass developer mode.<br/>
|
||||
3. Perbaikan crash saat mengolah pertanyaan dengan choice filter.<br/>
|
||||
4. Perbaikan minor bug.]]></string>
|
||||
<string name="changelog_v30013"><![CDATA[Changes: <br/>
|
||||
1. Menambah support service lokasi untuk Android >= O.<br/>
|
||||
2. Menambah support service lokasi untuk perangkat oppo, vivo dan xiaomi.<br/>
|
||||
3. Perbaikan notifikasi update task untuk Android >= O.<br/>
|
||||
4. Perbaikan print gambar untuk Android >= O.<br/>
|
||||
5. Perbaikan minor bug.]]></string>
|
||||
<string name="changelog_v3110"><![CDATA[Changes: <br/>
|
||||
1. Penambahan status TaskH FailedDraft ketika mendapatkan response code tertentu saat submit task dari web.<br/>
|
||||
2. Pembetulan bug SPV seharusnya tidak hit openreadtask saat verification dan approval .<br/>
|
||||
3. Penambahan user help .<br/>
|
||||
4. Pembetulan take picture failed di android 10 .<br/>
|
||||
5. App lemot saat Login-Logout-Login .<br/>
|
||||
6. Penyempurnaan answer type LuOnline .<br/>
|
||||
7. Pembetulan bug uploading task di timeline tidak muncul.<br/>
|
||||
8. Penambahan support untuk Android 10]]]]></string>
|
||||
<string name="changelog_v3120">
|
||||
<![CDATA[ Changes: <br/>
|
||||
1. Pembetulan Cloud CSV tidak dapat diimport .<br/>
|
||||
2. Pembetulan service berhenti ketika keluar aplikasi.<br/>
|
||||
3. Pembetulan crash saat sinkronisasi .<br/>
|
||||
4. Pembetulan crash saat is_emergency mati . ]]>
|
||||
</string>
|
||||
<string name="changelog_v3130">
|
||||
<![CDATA[ Changes: <br/>
|
||||
1. Perbaikan issue user help.<br/>
|
||||
2. Tambah aksi panggil nomor telepon customer pada customer form.<br/>
|
||||
3. Perbaikan validasi tidak berjalan pada form dikarenakan regex.<br/>
|
||||
4. Tambah status Failed Draft dan Save Draft pada timeline SPV.<br/>
|
||||
5. Tambah tombol simpan pada form survey verification.<br/>
|
||||
6. Tambahkan teks contoh pada user help data dinamis.<br/>
|
||||
7. Perbaiki crash pada verification dikarenakan daftar task belum tersinkronisasi keseluruhan.<br/>
|
||||
8. Tambahkan penjagaan error untuk workflow by form pada halaman survey verification.<br/>
|
||||
]]>
|
||||
</string>
|
||||
<string name="changelog_v3140">
|
||||
<![CDATA[ Changes: <br/>
|
||||
1. Refactor beberapa kode.<br/>
|
||||
2. Perbaikan bug.<br/>]]>
|
||||
</string>
|
||||
|
||||
<string name="changelog_v3201">
|
||||
<![CDATA[ Changes: <br/>
|
||||
1. Penambahan Term and Condition.<br/>]]>
|
||||
</string>
|
||||
|
||||
<string name="changelog_v3202"><![CDATA[ Changes: <br/>
|
||||
1. Penambahan Privacy And Policy.<br/>]]></string>
|
||||
</resources>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="14dp"
|
||||
android:height="14dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@color/gradient_end"
|
||||
android:pathData="M9,11L7,11v2h2v-2zM13,11h-2v2h2v-2zM17,11h-2v2h2v-2zM19,4h-1L18,2h-2v2L8,4L8,2L6,2v2L5,4c-1.11,0 -1.99,0.9 -1.99,2L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,6c0,-1.1 -0.9,-2 -2,-2zM19,20L5,20L5,9h14v11z"/>
|
||||
</vector>
|
|
@ -0,0 +1,210 @@
|
|||
package com.adins.mss.coll.loyalti.pointacquisitionmonthly;
|
||||
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.adins.mss.coll.R;
|
||||
import com.adins.mss.coll.loyalti.barchart.LoyaltyBarChartRenderer;
|
||||
import com.adins.mss.coll.loyalti.barchart.NonScrollListView;
|
||||
import com.adins.mss.coll.loyalti.barchart.pointlegends.PointLegendsAdapter;
|
||||
import com.adins.mss.coll.loyalti.barchart.ranklegends.RankLegendsAdapter;
|
||||
import com.adins.mss.coll.models.loyaltymodels.PointDetail;
|
||||
import com.adins.mss.coll.models.loyaltymodels.RankDetail;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.foundation.UserHelp.UserHelp;
|
||||
import com.github.mikephil.charting.charts.BarChart;
|
||||
import com.github.mikephil.charting.components.XAxis;
|
||||
import com.github.mikephil.charting.components.YAxis;
|
||||
import com.github.mikephil.charting.data.BarData;
|
||||
import com.github.mikephil.charting.data.BarDataSet;
|
||||
import com.github.mikephil.charting.data.BarEntry;
|
||||
import com.github.mikephil.charting.formatter.IndexAxisValueFormatter;
|
||||
import com.github.mikephil.charting.formatter.ValueFormatter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.adins.mss.constant.Global.SHOW_USERHELP_DELAY_DEFAULT;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class DummyMonthlyPointView extends Fragment {
|
||||
|
||||
|
||||
protected BarChart barChart;
|
||||
protected NonScrollListView rankLegends;
|
||||
protected NonScrollListView pointLegends;
|
||||
|
||||
//legend colors
|
||||
protected int[] pointDetailColors = {Color.parseColor("#FBBA72")
|
||||
,Color.parseColor("#F86624"),
|
||||
Color.parseColor("#BA5624") ,
|
||||
Color.parseColor("#8F250C")};
|
||||
|
||||
protected int[] rankColors = {Color.parseColor("#FF0000"),
|
||||
Color.parseColor("#000000"),
|
||||
Color.parseColor("#32CD32"),
|
||||
Color.parseColor("#0000FF")};
|
||||
|
||||
public DummyMonthlyPointView() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if(item.getItemId() == com.adins.mss.base.R.id.mnGuide){
|
||||
if(!Global.BACKPRESS_RESTRICTION) {
|
||||
showUserHelp();
|
||||
}
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
protected UserHelp.OnShowSequenceFinish finishCallback = new UserHelp.OnShowSequenceFinish() {
|
||||
@Override
|
||||
public void onSequenceFinish() {
|
||||
Global.positionStack.pop();
|
||||
getActivity().getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
};
|
||||
|
||||
protected void showUserHelp(){
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UserHelp.showAllUserHelp(getActivity(),DummyMonthlyPointView.class.getSimpleName(),finishCallback);
|
||||
}
|
||||
}, SHOW_USERHELP_DELAY_DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_dummy_point_acquisition_view, container, false);
|
||||
barChart = view.findViewById(R.id.dummyMonthlyChart);
|
||||
rankLegends = view.findViewById(R.id.dummyLegendRanks);
|
||||
pointLegends = view.findViewById(R.id.dummyLegendPoints);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
Global.positionStack.push(1);
|
||||
showDummyChart();
|
||||
showUserHelp();
|
||||
}
|
||||
|
||||
protected void showDummyChart(){
|
||||
List<BarEntry> barEntryList = new ArrayList<>();
|
||||
float[][] dummyDataset = getDummyDataSet();
|
||||
for(int i = 0; i< dummyDataset.length; i++){
|
||||
barEntryList.add(new BarEntry(i, dummyDataset[i]));
|
||||
}
|
||||
|
||||
BarDataSet barDataSet = new BarDataSet(barEntryList,"");
|
||||
barDataSet.setColors(pointDetailColors);
|
||||
barDataSet.setDrawValues(false);
|
||||
BarData barData = new BarData(barDataSet);
|
||||
barData.setBarWidth(0.5f);
|
||||
|
||||
XAxis xAxis = barChart.getXAxis();
|
||||
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
|
||||
xAxis.setDrawGridLines(false);
|
||||
xAxis.setLabelCount(4);
|
||||
xAxis.setGranularity(1f);
|
||||
xAxis.setGranularityEnabled(true);
|
||||
xAxis.setValueFormatter(getXValueFormatter());
|
||||
xAxis.setTextSize(12f);
|
||||
|
||||
//right axis
|
||||
YAxis rYAxis = barChart.getAxisRight();
|
||||
rYAxis.setEnabled(false);
|
||||
rYAxis.setAxisMinimum(0f);
|
||||
rYAxis.setDrawGridLines(false);
|
||||
|
||||
//left axis
|
||||
YAxis lYAxis = barChart.getAxisLeft();
|
||||
lYAxis.setAxisMinimum(0f);
|
||||
|
||||
//use custom legends
|
||||
barChart.getLegend().setEnabled(false);
|
||||
barChart.setDescription(null);
|
||||
RankLegendsAdapter rankLegendsAdapter = new RankLegendsAdapter(getActivity(),getDummyRanksLegend());
|
||||
rankLegends.setAdapter(rankLegendsAdapter);
|
||||
PointLegendsAdapter pointLegendsAdapter = new PointLegendsAdapter(getActivity(),getDummyPointCategoriesLegend());
|
||||
pointLegends.setAdapter(pointLegendsAdapter);
|
||||
|
||||
//chart settings
|
||||
//custom render bar
|
||||
RankDetail[][] dummyRankDataSet = getDummyRankDataSet();
|
||||
LoyaltyBarChartRenderer renderer = new LoyaltyBarChartRenderer(barChart,dummyRankDataSet,0.3f,0);
|
||||
barChart.setRenderer(renderer);
|
||||
|
||||
barChart.setPinchZoom(false);
|
||||
barChart.setDoubleTapToZoomEnabled(false);
|
||||
barChart.setExtraOffsets(0,0,0,10f);
|
||||
barChart.setFitBars(true);
|
||||
barChart.setData(barData);
|
||||
}
|
||||
|
||||
protected RankDetail[][] getDummyRankDataSet() {
|
||||
RankDetail[][] dummyRanks = new RankDetail[4][];
|
||||
dummyRanks[0] = new RankDetail[]{new RankDetail("Level 1","3",rankColors[0])
|
||||
,new RankDetail("Level 2","12",rankColors[1])
|
||||
,new RankDetail("Level 3","20",rankColors[2])};
|
||||
dummyRanks[1] = new RankDetail[]{new RankDetail("Level 1","1",rankColors[0])
|
||||
,new RankDetail("Level 2","3",rankColors[1])
|
||||
,new RankDetail("Level 3","5",rankColors[2])};
|
||||
dummyRanks[2] = new RankDetail[]{new RankDetail("Level 1","5",rankColors[0])
|
||||
,new RankDetail("Level 2","10",rankColors[1])
|
||||
,new RankDetail("Level 3","15",rankColors[2])};
|
||||
dummyRanks[3] = new RankDetail[]{new RankDetail("Level 1","1",rankColors[0])
|
||||
,new RankDetail("Level 2","1",rankColors[1])
|
||||
,new RankDetail("Level 3","6",rankColors[2])};
|
||||
|
||||
return dummyRanks;
|
||||
}
|
||||
|
||||
protected float[][] getDummyDataSet() {
|
||||
float[][] dummyPoin = new float[4][];
|
||||
dummyPoin[0] = new float[]{10,40,20,12};
|
||||
dummyPoin[1] = new float[]{5,10,14,8};
|
||||
dummyPoin[2] = new float[]{20,25,13,6};
|
||||
dummyPoin[3] = new float[]{40,20,20,10};
|
||||
return dummyPoin;
|
||||
}
|
||||
|
||||
protected List<RankDetail> getDummyRanksLegend(){
|
||||
List<RankDetail> dummyRankLegend = new ArrayList<>();
|
||||
dummyRankLegend.add(new RankDetail("Level 1","3",rankColors[0]));
|
||||
dummyRankLegend.add(new RankDetail("Level 2","12",rankColors[1]));
|
||||
dummyRankLegend.add(new RankDetail("Level 3","20",rankColors[2]));
|
||||
return dummyRankLegend;
|
||||
}
|
||||
|
||||
protected List<PointDetail> getDummyPointCategoriesLegend(){
|
||||
List<PointDetail> dummyPointLegend = new ArrayList<>();
|
||||
dummyPointLegend.add(new PointDetail("Point Category 1","3",pointDetailColors[0]));
|
||||
dummyPointLegend.add(new PointDetail("Point Category 2","3",pointDetailColors[1]));
|
||||
dummyPointLegend.add(new PointDetail("Point Category 3","3",pointDetailColors[2]));
|
||||
return dummyPointLegend;
|
||||
}
|
||||
|
||||
protected ValueFormatter getXValueFormatter(){
|
||||
return new IndexAxisValueFormatter(new String[]{"Jan","Feb","Mar","Apr"});
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.adins.mss.coll.items;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.adins.mss.coll.R;
|
||||
import com.adins.mss.coll.networks.entities.ClosingTaskEntity;
|
||||
import com.androidquery.AQuery;
|
||||
|
||||
/**
|
||||
* Created by angga.permadi on 6/6/2016.
|
||||
*/
|
||||
public class ClosingTaskItem extends LinearLayout {
|
||||
|
||||
protected AQuery query;
|
||||
|
||||
public ClosingTaskItem(Context context) {
|
||||
super(context);
|
||||
inflate(context);
|
||||
|
||||
setId((int) (System.currentTimeMillis() / 1000));
|
||||
}
|
||||
|
||||
private void inflate(Context context) {
|
||||
View view = inflate(context, R.layout.item_closing_task, this);
|
||||
|
||||
if(query == null) {
|
||||
query = new AQuery(view);
|
||||
} else {
|
||||
query = query.recycle(view);
|
||||
}
|
||||
}
|
||||
|
||||
public void bind(ClosingTaskEntity entity) {
|
||||
if (entity == null) return;
|
||||
|
||||
query.id(R.id.tv_no_kontrak).text(entity.getNoKontrak());
|
||||
query.id(R.id.tv_customer_name).text(entity.getCustomerName());
|
||||
query.id(R.id.tv_no_lkp).text(entity.getNoLkp());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright 2010 Kevin Gaudin
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.acra.sender;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
||||
import org.acra.ACRA;
|
||||
import org.acra.ACRAConstants;
|
||||
import org.acra.ReportField;
|
||||
import org.acra.annotation.ReportsCrashes;
|
||||
import org.acra.collector.CrashReportData;
|
||||
|
||||
/**
|
||||
* Send reports through an email intent. The user will be asked to chose his
|
||||
* preferred email client. Included report fields can be defined using
|
||||
* {@link org.acra.annotation.ReportsCrashes#customReportContent()}. Crash receiving mailbox has to be
|
||||
* defined with {@link ReportsCrashes#mailTo()}.
|
||||
*/
|
||||
public class EmailIntentSender implements ReportSender {
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
public EmailIntentSender(Context ctx) {
|
||||
mContext = ctx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Context context, CrashReportData errorContent) throws ReportSenderException {
|
||||
|
||||
final String subject = mContext.getPackageName() + " Crash Report";
|
||||
final String body = buildBody(errorContent);
|
||||
|
||||
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SENDTO);
|
||||
emailIntent.setData(Uri.fromParts("mailto", ACRA.getConfig().mailTo(), null));
|
||||
emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
|
||||
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, body);
|
||||
mContext.startActivity(emailIntent);
|
||||
}
|
||||
|
||||
private String buildBody(CrashReportData errorContent) {
|
||||
ReportField[] fields = ACRA.getConfig().customReportContent();
|
||||
if (fields.length == 0) {
|
||||
fields = ACRAConstants.DEFAULT_MAIL_REPORT_FIELDS;
|
||||
}
|
||||
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
for (ReportField field : fields) {
|
||||
builder.append(field.toString()).append("=");
|
||||
builder.append(errorContent.get(field));
|
||||
builder.append('\n');
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.adins.mss.dao;
|
||||
|
||||
import com.adins.mss.base.util.ExcludeFromGson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
|
||||
/**
|
||||
* Entity mapped to table "TR_TASK_SUMMARY".
|
||||
*/
|
||||
public class TaskSummary {
|
||||
|
||||
/** Not-null value. */
|
||||
@SerializedName("uuid_task_summary")
|
||||
private String uuid_task_summary;
|
||||
@SerializedName("uuid_task_h")
|
||||
private String uuid_task_h;
|
||||
@SerializedName("uuid_user")
|
||||
private String uuid_user;
|
||||
@SerializedName("task_status")
|
||||
private String task_status;
|
||||
@SerializedName("dtm_crt")
|
||||
private java.util.Date dtm_crt;
|
||||
|
||||
public TaskSummary() {
|
||||
}
|
||||
|
||||
public TaskSummary(String uuid_task_summary) {
|
||||
this.uuid_task_summary = uuid_task_summary;
|
||||
}
|
||||
|
||||
public TaskSummary(String uuid_task_summary, String uuid_task_h, String uuid_user, String task_status, java.util.Date dtm_crt) {
|
||||
this.uuid_task_summary = uuid_task_summary;
|
||||
this.uuid_task_h = uuid_task_h;
|
||||
this.uuid_user = uuid_user;
|
||||
this.task_status = task_status;
|
||||
this.dtm_crt = dtm_crt;
|
||||
}
|
||||
|
||||
/** Not-null value. */
|
||||
public String getUuid_task_summary() {
|
||||
return uuid_task_summary;
|
||||
}
|
||||
|
||||
/** Not-null value; ensure this value is available before it is saved to the database. */
|
||||
public void setUuid_task_summary(String uuid_task_summary) {
|
||||
this.uuid_task_summary = uuid_task_summary;
|
||||
}
|
||||
|
||||
public String getUuid_task_h() {
|
||||
return uuid_task_h;
|
||||
}
|
||||
|
||||
public void setUuid_task_h(String uuid_task_h) {
|
||||
this.uuid_task_h = uuid_task_h;
|
||||
}
|
||||
|
||||
public String getUuid_user() {
|
||||
return uuid_user;
|
||||
}
|
||||
|
||||
public void setUuid_user(String uuid_user) {
|
||||
this.uuid_user = uuid_user;
|
||||
}
|
||||
|
||||
public String getTask_status() {
|
||||
return task_status;
|
||||
}
|
||||
|
||||
public void setTask_status(String task_status) {
|
||||
this.task_status = task_status;
|
||||
}
|
||||
|
||||
public java.util.Date getDtm_crt() {
|
||||
return dtm_crt;
|
||||
}
|
||||
|
||||
public void setDtm_crt(java.util.Date dtm_crt) {
|
||||
this.dtm_crt = dtm_crt;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,236 @@
|
|||
package com.adins.mss.coll.fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.adins.mss.base.PrintActivity;
|
||||
import com.adins.mss.coll.R;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.DepositReportD;
|
||||
import com.adins.mss.dao.DepositReportH;
|
||||
import com.adins.mss.dao.Lookup;
|
||||
import com.adins.mss.dao.TaskH;
|
||||
import com.adins.mss.foundation.db.dataaccess.LookupDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TaskHDataAccess;
|
||||
import com.adins.mss.foundation.formatter.Tool;
|
||||
import com.adins.mss.foundation.image.Utils;
|
||||
import com.adins.mss.foundation.image.ViewImageActivity;
|
||||
import com.androidquery.AQuery;
|
||||
|
||||
import org.acra.ACRA;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DepositReportACDetailActivity extends Activity {
|
||||
protected static DepositReportH report;
|
||||
protected int total = 0;
|
||||
List<DepositReportD> reportDs;
|
||||
String cashierName;
|
||||
String bankAccount;
|
||||
String typeDep;
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.deposit_report_detail_layout_ac);
|
||||
AQuery query = new AQuery(this);
|
||||
ACRA.getErrorReporter().putCustomData("LAST_CLASS_ACCESSED", getClass().getSimpleName());
|
||||
cashierName = report.getCashier_name();
|
||||
if (report.getBank_account() != null) {
|
||||
bankAccount = report.getBank_account() +"-"+ report.getBank_name();
|
||||
typeDep = "Transfer";
|
||||
} else {
|
||||
bankAccount = "-";
|
||||
typeDep = "Cash";
|
||||
}
|
||||
|
||||
reportDs = report.getDepositReportDList();
|
||||
|
||||
Lookup lookup = LookupDataAccess.getOneByCodeAndlovGroup(getApplicationContext(), "BRANCH", report.getBranch_payment());
|
||||
|
||||
|
||||
query.id(R.id.txtBatchId).text(report.getBatch_id());
|
||||
query.id(R.id.txtBankName).text(lookup.getValue());
|
||||
query.id(R.id.txtDepTipe).text(typeDep);
|
||||
query.id(R.id.txtBank).text(bankAccount);
|
||||
query.id(R.id.imgEvidenceTransfer).image(Utils.byteToBitmap(report.getImage())).clicked(this, "ViewImage");
|
||||
|
||||
// query.id(R.id.txtAccountNumber).text(report.getBank_account());
|
||||
|
||||
ImageButton btnPrintDepReport = (ImageButton)findViewById(R.id.btnPrintDepReport);
|
||||
btnPrintDepReport.setVisibility(View.GONE);
|
||||
btnPrintDepReport.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getApplicationContext(), PrintActivity.class);
|
||||
intent.putExtra("taskId", report.getBatch_id());
|
||||
intent.putExtra("isPrintDeposit", true);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
int no =1;
|
||||
TableLayout detailTable = (TableLayout)findViewById(R.id.tableLayout1);
|
||||
LayoutParams lp =new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,0.25f);
|
||||
|
||||
LinearLayout detail = new LinearLayout(this);
|
||||
detail.setOrientation(LinearLayout.HORIZONTAL);
|
||||
detail.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, 1.0f));
|
||||
detail.setBackgroundResource(R.color.tv_gray_light);
|
||||
|
||||
TextView lblDetail = new TextView(this);
|
||||
lblDetail.setText("Detail");
|
||||
lblDetail.setTextColor(Color.BLACK);
|
||||
lblDetail.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,0.25f));
|
||||
detail.addView(lblDetail);
|
||||
detailTable.addView(detail);
|
||||
|
||||
|
||||
for (int i = 0; i < reportDs.size(); i++) {
|
||||
try {
|
||||
DepositReportD reportD = reportDs.get(i);
|
||||
LinearLayout row = new LinearLayout(this);
|
||||
row.setOrientation(LinearLayout.HORIZONTAL);
|
||||
row.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, 1.0f));
|
||||
if (no%2 == 0){ //if even number, set to blue background
|
||||
row.setBackgroundResource(R.color.tv_gray_light);
|
||||
}
|
||||
else {
|
||||
row.setBackgroundResource(R.color.tv_gray);
|
||||
}
|
||||
|
||||
TextView lblNo = new TextView(this);
|
||||
lblNo.setText(no+ ". ");
|
||||
lblNo.setGravity(Gravity.CENTER_HORIZONTAL);
|
||||
lblNo.setTextColor(Color.BLACK);
|
||||
lblNo.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,0.4f));
|
||||
row.addView(lblNo);
|
||||
|
||||
TaskH taskHs= TaskHDataAccess.getOneHeader(getApplicationContext(), reportD.getUuid_task_h());
|
||||
String agreement_no = "";
|
||||
if(taskHs!=null)
|
||||
agreement_no = taskHs.getAppl_no();
|
||||
|
||||
TextView lblLabel = new TextView(this);
|
||||
lblLabel.setText(agreement_no);
|
||||
lblLabel.setTextColor(Color.BLACK);
|
||||
lblLabel.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,0.25f));
|
||||
row.addView(lblLabel);
|
||||
|
||||
TextView lblSpace = new TextView(this);
|
||||
lblSpace.setText(" : ");
|
||||
lblSpace.setTextColor(Color.BLACK);
|
||||
lblSpace.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
|
||||
row.addView(lblSpace);
|
||||
|
||||
try {
|
||||
TextView lblAnswer = new TextView(this);
|
||||
lblAnswer.setText(Tool.separateThousand(reportD.getDeposit_amt()));
|
||||
lblAnswer.setTextColor(Color.BLACK);
|
||||
lblAnswer.setGravity(Gravity.RIGHT);
|
||||
lblAnswer.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,0.25f));
|
||||
row.addView(lblAnswer, lp);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
detailTable.addView(row);
|
||||
no++;
|
||||
|
||||
}
|
||||
finally {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Keep
|
||||
public void ViewImage(View view){
|
||||
Global.isViewer =true;
|
||||
Bundle extras = new Bundle();
|
||||
extras.putByteArray(Global.BUND_KEY_IMAGE_BYTE, report.getImage());
|
||||
Intent intent = new Intent(this, ViewImageActivity.class);
|
||||
intent.putExtras(extras);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Keep
|
||||
private class RecapitulationListAdapter extends ArrayAdapter<DepositReportD> {
|
||||
|
||||
private final DepositReportD[] originalItems;
|
||||
|
||||
public RecapitulationListAdapter(Context context, DepositReportD[] objects) {
|
||||
super(context, R.layout.deposit_report_list_recap, objects);
|
||||
originalItems = objects;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return super.getCount() + 1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
View view = null;
|
||||
view = LayoutInflater.from(getContext()).inflate(R.layout.deposit_report_list_recap, parent, false);
|
||||
|
||||
|
||||
TextView label = (TextView) view.findViewById(R.id.itemLabel);
|
||||
TextView value = (TextView) view.findViewById(R.id.itemValue);
|
||||
TextView agreement= (TextView) view.findViewById(R.id.itemValueAgreement);
|
||||
RelativeLayout layout = (RelativeLayout)view.findViewById(R.id.agreementNumber_layout);
|
||||
LinearLayout backLayout = (LinearLayout)view.findViewById(R.id.itemBase);
|
||||
if(position%2==1)
|
||||
backLayout.setBackgroundResource(R.color.tv_gray);
|
||||
if (position == getCount() - 1) {
|
||||
label.setText("Total");
|
||||
value.setText(Tool.separateThousand(String.valueOf(sumOfItems())));
|
||||
layout.setVisibility(View.GONE);
|
||||
} else {
|
||||
DepositReportD item = getItem(position);
|
||||
TaskH taskHs= TaskHDataAccess.getOneHeader(getApplicationContext(), item.getUuid_task_h());
|
||||
String agreement_no = "";
|
||||
if(taskHs!=null)
|
||||
agreement_no = taskHs.getAppl_no();
|
||||
agreement.setText(agreement_no);
|
||||
value.setText(Tool.separateThousand(item.getDeposit_amt()));
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
private int sumOfItems() {
|
||||
int sum = 0;
|
||||
try {
|
||||
for (DepositReportD item : originalItems) {
|
||||
String value = item.getDeposit_amt();
|
||||
if(value==null || value.equals("")) value = "0";
|
||||
int finalValue = Integer.parseInt(value);
|
||||
sum += finalValue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
total = sum;
|
||||
// generatePrintResultDepReport(DepositReportDetailActivity.this, report);
|
||||
return sum;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.adins.mss.coll.networks.entities;
|
||||
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
|
||||
/**
|
||||
* Created by angga.permadi on 3/3/2016.
|
||||
*/
|
||||
public class ClosingTaskRequest extends MssRequestType {
|
||||
public transient static final String CLOSING_TASK_LIST = "0";
|
||||
public transient static final String CLOSING_TASK = "1";
|
||||
|
||||
private String flag;
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue