Commit 3107e9e1 authored by Dio Maulana's avatar Dio Maulana

fixe update

parent 203de10f
......@@ -44,7 +44,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.tour_agency"
applicationId "com.example.tour_agent"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 19
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agency">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agent">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agency">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agent">
<application android:label="tour_travel_agr" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
......
package com.example.tour_agency
package com.example.tour_agent
import io.flutter.embedding.android.FlutterActivity
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agency">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agent">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
......
......@@ -365,6 +365,7 @@ class Api {
dateLocal(DateTime.now().toLocal().toString())))
: getOnlyDate(toInternationFormat(dateTo)),
"brand": brandCode,
"brand_code": brandCode,
};
String bodies = jsonEncode(data);
dynamic jsonObject = await httpRequest(
......@@ -446,16 +447,15 @@ class Api {
}
}
static Future<ApiResponse> changeProfile(
String name, String nik, String phone, String? photo) async {
static Future<ApiResponse> changeProfile(String name, String? photo) async {
String apiUrl = "$baseUrl${endPoint}profile/edit";
try {
Map<String, dynamic> data = {
"session_id": getSessionId(),
"brand_code": brandCode,
"name": name,
"nik": nik,
"mobile_phone": phone,
"nik": "",
"mobile_phone": "",
"photo_base64": photo,
};
String bodies = jsonEncode(data);
......
......@@ -8,7 +8,7 @@ import 'package:url_strategy/url_strategy.dart';
late SharedPreferences prefs;
bool debug = true;
String titleApp = 'Tour & Travel Agency';
String titleApp = 'Tour & Travel Agent';
String brandCode = 'AGR';
String baseUrl = "https://neo-agr.ravku.com/";
String endPoint = "agency/api/";
......
class ReimburseModel {
String date;
String agencyName;
String agencyNik;
String agentName;
String agentNik;
int transactionCount;
String transactionAmount;
String comissionAmount;
......@@ -9,8 +9,8 @@ class ReimburseModel {
ReimburseModel({
required this.date,
required this.agencyName,
required this.agencyNik,
required this.agentName,
required this.agentNik,
required this.transactionCount,
required this.transactionAmount,
required this.comissionAmount,
......@@ -20,8 +20,8 @@ class ReimburseModel {
factory ReimburseModel.json(Map<String, dynamic> json) {
return ReimburseModel(
date: json['date'],
agencyName: json['agency_name'],
agencyNik: json['agency_nik'],
agentName: json['agent_name'],
agentNik: json['agent_nik'],
transactionCount: json['transaction_count'],
transactionAmount: json['transaction_amount'],
comissionAmount: json['commission_amount'],
......
......@@ -236,8 +236,7 @@ class _BodyWidgetState extends State<BodyWidget> {
iconColor: ColorManager.softGreen,
countText: (transactions == null)
? null
: parsingAmountBackend(
"Rp ${transactions?.totalTransaction}"),
: "Rp ${parsingAmountBackend(transactions!.totalTransaction)}",
countTextColor: ColorManager.green,
),
],
......@@ -286,7 +285,7 @@ class _BodyWidgetState extends State<BodyWidget> {
title:
transactions!.listTransaction[index].brandCode,
subtitle:
"Rp ${transactions!.listTransaction[index].total}",
"Rp ${parsingAmountBackend(transactions!.listTransaction[index].total)}",
);
},
),
......@@ -369,15 +368,17 @@ class WidgetHead extends StatelessWidget {
),
Row(
children: [
const Spacer(),
(countText != null)
? Text(
? Expanded(
child: Text(
countText!,
style: getSemiBoldStyle(
color: countTextColor,
fontSize: 16,
fontFamily: FontConstants.openSans,
),
textAlign: TextAlign.end,
),
)
: Shimmer.fromColors(
baseColor: ColorManager.baseColorShimmer,
......
......@@ -240,7 +240,7 @@ class _BodyWIdgetState extends State<BodyWIdget> {
child: CardSectionHome(
title: "Profile",
subtitle:
"List Report Harian, mingguan dan Bulanan",
"List Report Harian, Mingguan dan Bulanan",
logo: Assets.profileIcon,
),
),
......
......@@ -146,6 +146,7 @@ class _EditProfileViewState extends State<EditProfileView> {
labelText: "NIK",
labelColor: ColorManager.primary,
borderSideActive: true,
enabled: false,
hintText: "Nomor Induk Kependudukan",
marginTop: 12,
),
......@@ -154,6 +155,7 @@ class _EditProfileViewState extends State<EditProfileView> {
labelText: "Nomor Handphone",
labelColor: ColorManager.primary,
borderSideActive: true,
enabled: false,
hintText: "628....",
marginTop: 12,
inputType: TextInputType.number,
......@@ -169,8 +171,6 @@ class _EditProfileViewState extends State<EditProfileView> {
);
Api.changeProfile(
nameController.text,
nikController.text,
hpController.text,
base64Image,
).then((apiResponse) {
EasyLoading.dismiss();
......
......@@ -215,18 +215,33 @@ class _BodyWidgetState extends State<BodyWidget> {
? Container(
width: 120,
height: 120,
padding: (profile!.avatarUrl == "")
? const EdgeInsets.all(20)
: null,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
100,
),
image: (profile!.avatarUrl == "")
? DecorationImage(
fit: BoxFit.fill,
image: AssetImage(Assets.profileSample),
color: (profile!.avatarUrl == "")
? const Color(0xffD9D9D9)
: null,
),
child: (profile!.avatarUrl == "")
? ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Image(
width: 40,
height: 40,
image: AssetImage(
Assets.profileSample,
),
),
)
: DecorationImage(
: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Image.network(
profile!.avatarUrl,
fit: BoxFit.fill,
image: NetworkImage(profile!.avatarUrl),
),
),
)
......
......@@ -170,6 +170,17 @@ class _RegisterViewState extends State<RegisterView> {
);
return;
}
if (nikController.text.length != 16) {
modalDialogGlobal(
context: context,
size: MediaQuery.of(context).size,
title: "Informasi",
contentBody: "Silakan masukkan NIK yang valid",
buttonText: "Ok",
tapButton: () => Navigator.pop(context),
);
return;
}
if (passwordController.text !=
confirmPasswordController.text) {
// ignore: use_build_context_synchronously
......
......@@ -11,7 +11,6 @@ class Assets {
static String forgotPassword = "${rootImage}forgot_password.png";
static String resetPassword = "${rootImage}reset_password.png";
static String homeBanner = "${rootImage}home_banner.png";
static String profileSample = "${rootImage}profile.jpg";
static String editProfileSample = "${rootImage}edit_profile.png";
static String resetSuccess = "${rootImage}reset_success.png";
......@@ -27,6 +26,7 @@ class Assets {
static String calenderIcon = "${rootIcon}calender.png";
static String moneyIcon = "${rootIcon}money.png";
static String transactionIcon = "${rootIcon}transaction.png";
static String profileSample = "${rootIcon}profile_default.png";
static String totalIcon = "${rootIcon}total.png";
static String crossIcon = "${rootIcon}cross.png";
}
......@@ -125,7 +125,7 @@ class RouteGenerator {
ErrorWidgetView(
messageError: Strings.notFoundPage,
),
nameRoute: Routes.notFoundRoute,
nameRoute: routeSettings.name!,
routeSettings: routeSettings,
);
}
......
......@@ -7,7 +7,7 @@ project(runner LANGUAGES CXX)
set(BINARY_NAME "tour_travel_agr")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.example.tour_agency")
set(APPLICATION_ID "com.example.tour_agent")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
......
......@@ -20,22 +20,19 @@
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta
name="description"
content="Ravintola Tour &amp; Travel Agency For Agrinesia."
content="Ravintola Tour &amp; Travel Agent For Agrinesia."
/>
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta
name="apple-mobile-web-app-title"
content="Tour &amp; Travel Agency"
/>
<meta name="apple-mobile-web-app-title" content="Tour &amp; Travel Agent" />
<link rel="apple-touch-icon" href="icons/Icon-192.png" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="agr_icon.png" />
<title>Tour &amp; Travel Agency</title>
<title>Tour &amp; Travel Agent</title>
<link rel="manifest" href="manifest.json" />
<script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment