Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
Crm Attendance
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
Crm Attendance
Commits
257cb66a
Commit
257cb66a
authored
Jun 08, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed design
parent
77a3594d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
505 additions
and
258 deletions
+505
-258
arrow_up_down.png
assets/icons/arrow_up_down.png
+0
-0
api.dart
lib/api/api.dart
+7
-5
route_args.dart
lib/helper/arguments/route_args.dart
+7
-0
absent_camera.dart
lib/page/absent_camera/absent_camera.dart
+166
-50
absent_success.dart
lib/page/absent_success/absent_success.dart
+142
-37
home.dart
lib/page/home/home.dart
+175
-166
assets.dart
lib/resource/assets.dart
+2
-0
routes.dart
lib/resource/routes.dart
+6
-0
No files found.
assets/icons/arrow_up_down.png
0 → 100644
View file @
257cb66a
272 Bytes
lib/api/api.dart
View file @
257cb66a
...
...
@@ -8,6 +8,7 @@ import 'package:excelso_attendance/models/branch.dart';
import
'package:excelso_attendance/models/profile.dart'
;
import
'package:excelso_attendance/models/shift.dart'
;
import
'package:excelso_attendance/resource/strings.dart'
;
import
'package:geolocator/geolocator.dart'
;
import
'package:http/http.dart'
as
http
;
class
Api
{
...
...
@@ -135,14 +136,14 @@ class Api {
static
Future
<
ApiResponse
>
shiftIn
(
String
branchId
,
String
nik
,
String
shiftId
,
String
photoBase64
)
async
{
String
apiUrl
=
"
$baseUrl${endPoint}
clock_in"
;
Position
position
=
await
Geolocator
.
getCurrentPosition
();
try
{
Map
<
String
,
dynamic
>
data
=
{
"branch_id"
:
branchId
,
"nik"
:
nik
,
"shift_id"
:
shiftId
,
"user_lat"
:
getLatitude
()
,
"user_long"
:
getLongitude
()
,
"user_lat"
:
position
.
latitude
,
"user_long"
:
position
.
longitude
,
"photo_base64"
:
"data:image/jpeg;base64,
$photoBase64
"
,
};
String
bodies
=
jsonEncode
(
data
);
...
...
@@ -183,12 +184,13 @@ class Api {
String
branchId
,
String
nik
,
String
photoBase64
)
async
{
String
apiUrl
=
"
$baseUrl${endPoint}
clock_out"
;
Position
position
=
await
Geolocator
.
getCurrentPosition
();
try
{
Map
<
String
,
dynamic
>
data
=
{
"branch_id"
:
branchId
,
"nik"
:
nik
,
"user_lat"
:
getLatitude
()
,
"user_long"
:
getLongitude
()
,
"user_lat"
:
position
.
latitude
,
"user_long"
:
position
.
longitude
,
"photo_base64"
:
photoBase64
,
};
String
bodies
=
jsonEncode
(
data
);
...
...
lib/helper/arguments/route_args.dart
View file @
257cb66a
import
'package:excelso_attendance/models/absent.dart'
;
import
'package:excelso_attendance/models/branch.dart'
;
import
'package:excelso_attendance/models/profile.dart'
;
import
'package:excelso_attendance/models/shift.dart'
;
class
AbsentCameraArguments
{
final
bool
isIn
;
final
BranchModel
branchModel
;
final
ShiftModel
?
shiftModel
;
final
ProfileModel
profile
;
final
String
nik
;
AbsentCameraArguments
({
required
this
.
isIn
,
required
this
.
branchModel
,
required
this
.
nik
,
required
this
.
profile
,
this
.
shiftModel
,
});
}
...
...
@@ -28,10 +31,14 @@ class HomeArguments {
class
AbsentSuccessArguments
{
final
AbsentSuccessModel
absentSuccess
;
final
ProfileModel
profil
;
final
String
nik
;
final
bool
isIn
;
AbsentSuccessArguments
({
required
this
.
absentSuccess
,
required
this
.
profil
,
required
this
.
nik
,
required
this
.
isIn
,
});
}
lib/page/absent_camera/absent_camera.dart
View file @
257cb66a
This diff is collapsed.
Click to expand it.
lib/page/absent_success/absent_success.dart
View file @
257cb66a
import
'package:excelso_attendance/helper/component/button.dart'
;
import
'package:excelso_attendance/helper/global_function/date_time.dart'
;
import
'package:excelso_attendance/models/absent.dart'
;
import
'package:excelso_attendance/models/profile.dart'
;
import
'package:excelso_attendance/resource/assets.dart'
;
import
'package:excelso_attendance/resource/colors.dart'
;
import
'package:excelso_attendance/resource/font.dart'
;
...
...
@@ -11,9 +12,15 @@ import 'package:flutter/material.dart';
class
AbsentSuccessView
extends
StatelessWidget
{
const
AbsentSuccessView
(
{
super
.
key
,
required
this
.
absentSuccess
,
required
this
.
isIn
});
{
super
.
key
,
required
this
.
absentSuccess
,
required
this
.
isIn
,
required
this
.
nik
,
required
this
.
profil
});
final
AbsentSuccessModel
absentSuccess
;
final
ProfileModel
profil
;
final
String
nik
;
final
bool
isIn
;
@override
...
...
@@ -72,7 +79,7 @@ class AbsentSuccessView extends StatelessWidget {
),
),
const
SizedBox
(
height:
6
0
,
height:
2
0
,
),
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -103,7 +110,7 @@ Sukses''',
horizontal:
AppPadding
.
p20
,
),
child:
Image
(
height:
232
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.25
,
width:
double
.
infinity
,
image:
AssetImage
(
Assets
.
absentSuccess
,
...
...
@@ -140,24 +147,46 @@ Sukses''',
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
absentSuccess
.
branchCode
,
style:
getSemiBoldStyle
(
color:
ColorManager
.
fontBlack
,
fontSize:
FontSize
.
s20
,
fontFamily:
FontConstants
.
montserrat
,
),
),
SizedBox
(
height:
AppMargin
.
m10
,
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
absentSuccess
.
branchCode
,
Expanded
(
child:
Text
(
profil
.
name
,
style:
getSemiBoldStyle
(
color:
ColorManager
.
fontBlack
,
fontSize:
FontSize
.
s20
,
fontFamily:
FontConstants
.
montserrat
,
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
start
,
),
Text
(
"
${absentSuccess.time}
${absentSuccess.timeZone}
"
,
),
Expanded
(
child:
Text
(
nik
,
style:
getSemiBoldStyle
(
color:
ColorManager
.
fontBlack
,
fontSize:
FontSize
.
s20
,
fontFamily:
FontConstants
.
montserrat
,
),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
end
,
),
)
],
),
...
...
@@ -165,9 +194,49 @@ Sukses''',
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m10
,
),
child:
Row
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
AppPadding
.
p20
,
vertical:
AppPadding
.
p12
,
),
width:
double
.
infinity
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xffE7E7E7
).
withOpacity
(
0.5
),
border:
Border
.
all
(
width:
0.2
,
color:
ColorManager
.
grey
.
withOpacity
(
0.8
),
),
borderRadius:
BorderRadius
.
circular
(
9
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
const
Spacer
(),
Text
(
absentSuccess
.
branchName
,
style:
getSemiBoldStyle
(
color:
ColorManager
.
fontBlack
,
fontSize:
FontSize
.
s16
,
),
textAlign:
TextAlign
.
center
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
),
const
SizedBox
(
height:
4
,
),
Text
(
"
${absentSuccess.time}
${absentSuccess.timeZone}
"
,
style:
getMediumStyle
(
color:
ColorManager
.
fontBlack
,
fontSize:
FontSize
.
s20
,
),
textAlign:
TextAlign
.
center
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
),
const
SizedBox
(
height:
4
,
),
Text
(
DateFormatCustom
.
getDateLocal
(
fromApi:
true
,
...
...
@@ -175,18 +244,57 @@ Sukses''',
),
style:
getRegularStyle
(
color:
ColorManager
.
fontBlack
,
fontSize:
16
,
fontFamily:
FontConstants
.
montserrat
,
fontSize:
FontSize
.
s16
,
),
)
textAlign:
TextAlign
.
center
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
),
],
),
// child: Row(
// children: [
// const Spacer(),
// Text(
// DateFormatCustom.getDateLocal(
// fromApi: true,
// apiDate: absentSuccess.date,
// ),
// style: getRegularStyle(
// color: ColorManager.fontBlack,
// fontSize: 16,
// fontFamily: FontConstants.montserrat,
// ),
// )
// ],
// ),
),
// Container(
// margin: EdgeInsets.only(
// top: AppMargin.m16,
// left: AppMargin.m16,
// right: AppMargin.m16,
// ),
// child: CustomButton(
// text: "Kembali ke Beranda",
// onTap: () {
// Navigator.pushNamedAndRemoveUntil(
// context,
// Routes.onBoarding,
// (route) => false,
// );
// },
// ),
// )
],
),
),
SizedBox
(
height:
AppMargin
.
m16
,
),
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m16
,
left:
AppMargin
.
m16
,
right:
AppMargin
.
m16
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
AppMargin
.
m20
,
),
child:
CustomButton
(
text:
"Kembali ke Beranda"
,
...
...
@@ -201,9 +309,6 @@ Sukses''',
)
],
),
)
],
),
),
);
}
...
...
lib/page/home/home.dart
View file @
257cb66a
This diff is collapsed.
Click to expand it.
lib/resource/assets.dart
View file @
257cb66a
...
...
@@ -5,6 +5,7 @@ class Assets {
// images
static
String
excelso
=
"
${rootImage}
excelso.png"
;
static
String
excelsoLogo
=
"
${rootImage}
excelso_logo.png"
;
static
String
excelsoLogoGreen
=
"
${rootImage}
excelso_logo_green.png"
;
static
String
onboarding
=
"
${rootImage}
onboarding.png"
;
static
String
frameOverlay
=
"
${rootImage}
frame_overlay.png"
;
static
String
frameOverlay2
=
"
${rootImage}
frame_overlay2.png"
;
...
...
@@ -12,4 +13,5 @@ class Assets {
static
String
absentSuccess
=
"
${rootImage}
absent_success.png"
;
// icons
static
String
arrowUpDown
=
"
${rootIcon}
arrow_up_down.png"
;
}
lib/resource/routes.dart
View file @
257cb66a
...
...
@@ -42,6 +42,7 @@ class RouteGenerator {
isIn:
args
.
isIn
,
branchModel:
args
.
branchModel
,
shiftModel:
args
.
shiftModel
,
profile:
args
.
profile
,
nik:
args
.
nik
,
),
nameRoute:
Routes
.
absentCamera
,
...
...
@@ -53,6 +54,8 @@ class RouteGenerator {
return
pageRouteCustom
(
AbsentSuccessView
(
absentSuccess:
args
.
absentSuccess
,
profil:
args
.
profil
,
nik:
args
.
nik
,
isIn:
args
.
isIn
,
),
nameRoute:
Routes
.
absentSuccess
,
...
...
@@ -94,6 +97,7 @@ class RouteGenerator {
isIn:
args
.
isIn
,
branchModel:
args
.
branchModel
,
shiftModel:
args
.
shiftModel
,
profile:
args
.
profile
,
nik:
args
.
nik
,
),
transitionDuration:
Duration
.
zero
,
...
...
@@ -136,6 +140,8 @@ class RouteGenerator {
return
PageRouteBuilder
(
pageBuilder:
(
context
,
a
,
b
)
=>
AbsentSuccessView
(
absentSuccess:
args
.
absentSuccess
,
profil:
args
.
profil
,
nik:
args
.
nik
,
isIn:
args
.
isIn
,
),
transitionDuration:
Duration
.
zero
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment