fix translation.
parent
1ef3783fb9
commit
57bf34a93a
@ -1,94 +0,0 @@
|
||||
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:mohem_flutter_app/api/api_client.dart';
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/classes/consts.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_contacts.model.dart';
|
||||
import 'package:mohem_flutter_app/models/payslip/get_deductions_list.dart';
|
||||
import 'package:mohem_flutter_app/models/payslip/get_earnings_list.dart';
|
||||
import 'package:mohem_flutter_app/models/payslip/get_payment_information.dart';
|
||||
import 'package:mohem_flutter_app/models/payslip/get_payslip.dart';
|
||||
import 'package:mohem_flutter_app/models/payslip/get_summary_of_payment.dart';
|
||||
|
||||
|
||||
class PayslipApiClient {
|
||||
static final PayslipApiClient _instance = PayslipApiClient._internal();
|
||||
|
||||
PayslipApiClient._internal();
|
||||
|
||||
factory PayslipApiClient() => _instance;
|
||||
|
||||
Future<List<GetPayslipList>> getPayslip() async {
|
||||
String url = "${ApiConsts.erpRest}GET_PAYSLIP";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
print(responseData);
|
||||
return responseData.getPayslipList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<List<GetSummaryOfPaymentList>> getSummaryOfPayment() async {
|
||||
String url = "${ApiConsts.erpRest}GET_SUMMARY_OF_PAYMENT";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_ACTION_CONTEXT_ID": 188844253,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
print(responseData);
|
||||
return responseData.getSummaryOfPaymentList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<List<GetPaymentInformationList>> getPaymentInfo() async {
|
||||
String url = "${ApiConsts.erpRest}GET_PAYMENT_INFORMATION";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_ACTION_CONTEXT_ID": 188844253,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
print(responseData);
|
||||
return responseData.getPaymentInformationList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<List<GetDeductionsList>> getDeductionsList() async {
|
||||
String url = "${ApiConsts.erpRest}GET_DEDUCTIONS";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_ACTION_CONTEXT_ID": 188844253,
|
||||
"P_PAGE_LIMIT": 100,
|
||||
"P_PAGE_NUM": 1
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
print(responseData);
|
||||
return responseData.getDeductionsList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
|
||||
Future<List<GetEarningsList>> getEarningsList() async {
|
||||
String url = "${ApiConsts.erpRest}GET_EARNINGS";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_ACTION_CONTEXT_ID": 188844253,
|
||||
"P_PAGE_LIMIT": 100,
|
||||
"P_PAGE_NUM": 1
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
print(responseData);
|
||||
return responseData.getEarningsList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue