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
462b1b21
Commit
462b1b21
authored
Jun 19, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final desiign
parent
ba68464a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
764 additions
and
364 deletions
+764
-364
K2D-Bold.ttf
assets/fonts/k2d/K2D-Bold.ttf
+0
-0
K2D-Light.ttf
assets/fonts/k2d/K2D-Light.ttf
+0
-0
K2D-Medium.ttf
assets/fonts/k2d/K2D-Medium.ttf
+0
-0
K2D-Regular.ttf
assets/fonts/k2d/K2D-Regular.ttf
+0
-0
K2D-SemiBold.ttf
assets/fonts/k2d/K2D-SemiBold.ttf
+0
-0
api.dart
lib/api/api.dart
+9
-0
route_args.dart
lib/helper/arguments/route_args.dart
+12
-0
pref.dart
lib/helper/pref.dart
+9
-0
profile.dart
lib/models/profile.dart
+9
-0
absent_camera.dart
lib/page/absent_camera/absent_camera.dart
+318
-53
absent_success.dart
lib/page/absent_success/absent_success.dart
+172
-133
home.dart
lib/page/home/home.dart
+206
-168
colors.dart
lib/resource/colors.dart
+1
-0
constanta_string.dart
lib/resource/constanta_string.dart
+2
-0
font.dart
lib/resource/font.dart
+1
-0
routes.dart
lib/resource/routes.dart
+12
-10
size.dart
lib/resource/size.dart
+1
-0
pubspec.yaml
pubspec.yaml
+12
-0
No files found.
assets/fonts/k2d/K2D-Bold.ttf
0 → 100644
View file @
462b1b21
File added
assets/fonts/k2d/K2D-Light.ttf
0 → 100644
View file @
462b1b21
File added
assets/fonts/k2d/K2D-Medium.ttf
0 → 100644
View file @
462b1b21
File added
assets/fonts/k2d/K2D-Regular.ttf
0 → 100644
View file @
462b1b21
File added
assets/fonts/k2d/K2D-SemiBold.ttf
0 → 100644
View file @
462b1b21
File added
lib/api/api.dart
View file @
462b1b21
...
@@ -30,6 +30,7 @@ class Api {
...
@@ -30,6 +30,7 @@ class Api {
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
}
else
{
}
else
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
print
(
jsonObject
);
List
<
BranchModel
>
branchList
=
[];
List
<
BranchModel
>
branchList
=
[];
List
<
dynamic
>
branchs
=
jsonObject
[
'data'
][
'branch_list'
];
List
<
dynamic
>
branchs
=
jsonObject
[
'data'
][
'branch_list'
];
...
@@ -42,6 +43,10 @@ class Api {
...
@@ -42,6 +43,10 @@ class Api {
}
}
ConstantString
.
outletDistance
=
ConstantString
.
outletDistance
=
jsonObject
[
'data'
][
'max_distance'
].
toString
();
jsonObject
[
'data'
][
'max_distance'
].
toString
();
ConstantString
.
logoUrlHome
=
jsonObject
[
'data'
][
'logo_attendance_home'
];
ConstantString
.
logoUrlCamera
=
jsonObject
[
'data'
][
'logo_attendance_camera'
];
return
ApiResponse
(
return
ApiResponse
(
error:
false
,
error:
false
,
msg:
Strings
.
succesGetData
,
msg:
Strings
.
succesGetData
,
...
@@ -110,6 +115,7 @@ class Api {
...
@@ -110,6 +115,7 @@ class Api {
Map
<
String
,
dynamic
>
data
=
{
Map
<
String
,
dynamic
>
data
=
{
"branch_id"
:
branchId
,
"branch_id"
:
branchId
,
"nik"
:
nik
,
"nik"
:
nik
,
"brand_code"
:
brandCode
,
};
};
String
bodies
=
jsonEncode
(
data
);
String
bodies
=
jsonEncode
(
data
);
dynamic
jsonObject
=
dynamic
jsonObject
=
...
@@ -118,6 +124,7 @@ class Api {
...
@@ -118,6 +124,7 @@ class Api {
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
}
else
{
}
else
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
print
(
jsonObject
);
Map
<
String
,
dynamic
>
user
=
jsonObject
[
'data'
][
'user'
];
Map
<
String
,
dynamic
>
user
=
jsonObject
[
'data'
][
'user'
];
return
ApiResponse
(
return
ApiResponse
(
error:
false
,
error:
false
,
...
@@ -143,6 +150,7 @@ class Api {
...
@@ -143,6 +150,7 @@ class Api {
try
{
try
{
Map
<
String
,
dynamic
>
data
=
{
Map
<
String
,
dynamic
>
data
=
{
"branch_id"
:
branchId
,
"branch_id"
:
branchId
,
"brand_code"
:
brandCode
,
"nik"
:
nik
,
"nik"
:
nik
,
"shift_id"
:
shiftId
,
"shift_id"
:
shiftId
,
"user_lat"
:
position
.
latitude
,
"user_lat"
:
position
.
latitude
,
...
@@ -196,6 +204,7 @@ class Api {
...
@@ -196,6 +204,7 @@ class Api {
try
{
try
{
Map
<
String
,
dynamic
>
data
=
{
Map
<
String
,
dynamic
>
data
=
{
"branch_id"
:
branchId
,
"branch_id"
:
branchId
,
"brand_code"
:
brandCode
,
"nik"
:
nik
,
"nik"
:
nik
,
"user_lat"
:
position
.
latitude
,
"user_lat"
:
position
.
latitude
,
"user_long"
:
position
.
longitude
,
"user_long"
:
position
.
longitude
,
...
...
lib/helper/arguments/route_args.dart
View file @
462b1b21
...
@@ -9,13 +9,19 @@ class AbsentCameraArguments {
...
@@ -9,13 +9,19 @@ class AbsentCameraArguments {
final
ShiftModel
?
shiftModel
;
final
ShiftModel
?
shiftModel
;
final
ProfileModel
profile
;
final
ProfileModel
profile
;
final
String
nik
;
final
String
nik
;
final
String
shiftNameSelected
;
final
String
shiftStartTime
;
final
String
shiftEndTime
;
AbsentCameraArguments
({
AbsentCameraArguments
({
required
this
.
isIn
,
required
this
.
isIn
,
required
this
.
branchModel
,
required
this
.
branchModel
,
required
this
.
nik
,
required
this
.
nik
,
required
this
.
profile
,
required
this
.
profile
,
required
this
.
shiftStartTime
,
required
this
.
shiftEndTime
,
this
.
shiftModel
,
this
.
shiftModel
,
required
this
.
shiftNameSelected
,
});
});
}
}
...
@@ -34,11 +40,17 @@ class AbsentSuccessArguments {
...
@@ -34,11 +40,17 @@ class AbsentSuccessArguments {
final
ProfileModel
profil
;
final
ProfileModel
profil
;
final
String
nik
;
final
String
nik
;
final
bool
isIn
;
final
bool
isIn
;
final
String
shiftStart
;
final
String
shiftEnd
;
final
String
shiftName
;
AbsentSuccessArguments
({
AbsentSuccessArguments
({
required
this
.
absentSuccess
,
required
this
.
absentSuccess
,
required
this
.
profil
,
required
this
.
profil
,
required
this
.
nik
,
required
this
.
nik
,
required
this
.
isIn
,
required
this
.
isIn
,
required
this
.
shiftStart
,
required
this
.
shiftEnd
,
required
this
.
shiftName
,
});
});
}
}
lib/helper/pref.dart
View file @
462b1b21
...
@@ -3,6 +3,7 @@ import 'package:excelso_attendance/main.dart';
...
@@ -3,6 +3,7 @@ import 'package:excelso_attendance/main.dart';
const
String
_latitude
=
'laU'
;
const
String
_latitude
=
'laU'
;
const
String
_longitude
=
'loU'
;
const
String
_longitude
=
'loU'
;
const
String
_listAbsent
=
'listAbsent'
;
const
String
_listAbsent
=
'listAbsent'
;
const
String
_outletLogo
=
'_logo'
;
String
?
getLatitude
()
{
String
?
getLatitude
()
{
return
prefs
.
getString
(
_latitude
);
return
prefs
.
getString
(
_latitude
);
...
@@ -29,3 +30,11 @@ Future<void> setListAbsentUser(List<String> value) async {
...
@@ -29,3 +30,11 @@ Future<void> setListAbsentUser(List<String> value) async {
List
<
String
>
getListAbsentUser
()
{
List
<
String
>
getListAbsentUser
()
{
return
prefs
.
getStringList
(
_listAbsent
)
??
[];
return
prefs
.
getStringList
(
_listAbsent
)
??
[];
}
}
Future
<
void
>
setLogo
(
String
value
)
async
{
await
prefs
.
setString
(
_outletLogo
,
value
);
}
String
getLogo
(
)
{
return
prefs
.
getString
(
_outletLogo
)
??
""
;
}
lib/models/profile.dart
View file @
462b1b21
...
@@ -4,6 +4,9 @@ class ProfileModel {
...
@@ -4,6 +4,9 @@ class ProfileModel {
String
name
;
String
name
;
bool
attendanceIn
;
bool
attendanceIn
;
bool
attendanceOut
;
bool
attendanceOut
;
String
shiftSelectedName
;
String
shiftStart
;
String
shiftEnd
;
ProfileModel
({
ProfileModel
({
required
this
.
id
,
required
this
.
id
,
...
@@ -11,6 +14,9 @@ class ProfileModel {
...
@@ -11,6 +14,9 @@ class ProfileModel {
required
this
.
name
,
required
this
.
name
,
required
this
.
attendanceIn
,
required
this
.
attendanceIn
,
required
this
.
attendanceOut
,
required
this
.
attendanceOut
,
required
this
.
shiftSelectedName
,
required
this
.
shiftStart
,
required
this
.
shiftEnd
,
});
});
factory
ProfileModel
.
json
(
Map
<
String
,
dynamic
>
json
)
{
factory
ProfileModel
.
json
(
Map
<
String
,
dynamic
>
json
)
{
...
@@ -20,6 +26,9 @@ class ProfileModel {
...
@@ -20,6 +26,9 @@ class ProfileModel {
name:
json
[
'name'
],
name:
json
[
'name'
],
attendanceIn:
json
[
'today_attendance_in'
],
attendanceIn:
json
[
'today_attendance_in'
],
attendanceOut:
json
[
'today_attendance_out'
],
attendanceOut:
json
[
'today_attendance_out'
],
shiftSelectedName:
json
[
'shift_name'
]
??
""
,
shiftStart:
json
[
'shift_start'
]
??
""
,
shiftEnd:
json
[
'shift_end'
]
??
""
,
);
);
}
}
}
}
lib/page/absent_camera/absent_camera.dart
View file @
462b1b21
This diff is collapsed.
Click to expand it.
lib/page/absent_success/absent_success.dart
View file @
462b1b21
This diff is collapsed.
Click to expand it.
lib/page/home/home.dart
View file @
462b1b21
This diff is collapsed.
Click to expand it.
lib/resource/colors.dart
View file @
462b1b21
...
@@ -8,5 +8,6 @@ class ColorManager {
...
@@ -8,5 +8,6 @@ class ColorManager {
static
Color
grey
=
const
Color
(
0xff595959
);
static
Color
grey
=
const
Color
(
0xff595959
);
static
Color
softGreen
=
const
Color
(
0xffA4D8C8
);
static
Color
softGreen
=
const
Color
(
0xffA4D8C8
);
static
Color
green
=
const
Color
(
0xff3CA786
);
static
Color
green
=
const
Color
(
0xff3CA786
);
static
Color
green2
=
const
Color
(
0xff219653
);
static
Color
fontBlack
=
const
Color
(
0xff444444
);
static
Color
fontBlack
=
const
Color
(
0xff444444
);
}
}
lib/resource/constanta_string.dart
View file @
462b1b21
class
ConstantString
{
class
ConstantString
{
static
String
outletDistance
=
''
;
static
String
outletDistance
=
''
;
static
String
logoUrlHome
=
''
;
static
String
logoUrlCamera
=
''
;
}
}
lib/resource/font.dart
View file @
462b1b21
...
@@ -4,6 +4,7 @@ class FontConstants {
...
@@ -4,6 +4,7 @@ class FontConstants {
static
const
String
openSans
=
"Open Sans"
;
static
const
String
openSans
=
"Open Sans"
;
static
const
String
montserrat
=
"Montserrat"
;
static
const
String
montserrat
=
"Montserrat"
;
static
const
String
poppins
=
"Poppins"
;
static
const
String
poppins
=
"Poppins"
;
static
const
String
k2d
=
"K2D"
;
}
}
class
FontWeightManager
{
class
FontWeightManager
{
...
...
lib/resource/routes.dart
View file @
462b1b21
...
@@ -46,6 +46,9 @@ class RouteGenerator {
...
@@ -46,6 +46,9 @@ class RouteGenerator {
shiftModel:
args
.
shiftModel
,
shiftModel:
args
.
shiftModel
,
profile:
args
.
profile
,
profile:
args
.
profile
,
nik:
args
.
nik
,
nik:
args
.
nik
,
shiftNameSelected:
args
.
shiftNameSelected
,
shiftStartTime:
args
.
shiftStartTime
,
shiftEndTime:
args
.
shiftEndTime
,
),
),
nameRoute:
Routes
.
absentCamera
,
nameRoute:
Routes
.
absentCamera
,
routeSettings:
routeSettings
,
routeSettings:
routeSettings
,
...
@@ -59,6 +62,9 @@ class RouteGenerator {
...
@@ -59,6 +62,9 @@ class RouteGenerator {
profil:
args
.
profil
,
profil:
args
.
profil
,
nik:
args
.
nik
,
nik:
args
.
nik
,
isIn:
args
.
isIn
,
isIn:
args
.
isIn
,
shiftEnd:
args
.
shiftEnd
,
shiftStart:
args
.
shiftStart
,
shiftName:
args
.
shiftName
,
),
),
nameRoute:
Routes
.
absentSuccess
,
nameRoute:
Routes
.
absentSuccess
,
routeSettings:
routeSettings
,
routeSettings:
routeSettings
,
...
@@ -107,6 +113,9 @@ class RouteGenerator {
...
@@ -107,6 +113,9 @@ class RouteGenerator {
shiftModel:
args
.
shiftModel
,
shiftModel:
args
.
shiftModel
,
profile:
args
.
profile
,
profile:
args
.
profile
,
nik:
args
.
nik
,
nik:
args
.
nik
,
shiftNameSelected:
args
.
shiftNameSelected
,
shiftStartTime:
args
.
shiftStartTime
,
shiftEndTime:
args
.
shiftEndTime
,
),
),
transitionDuration:
Duration
.
zero
,
transitionDuration:
Duration
.
zero
,
reverseTransitionDuration:
Duration
.
zero
,
reverseTransitionDuration:
Duration
.
zero
,
...
@@ -146,22 +155,15 @@ class RouteGenerator {
...
@@ -146,22 +155,15 @@ class RouteGenerator {
profil:
args
.
profil
,
profil:
args
.
profil
,
nik:
args
.
nik
,
nik:
args
.
nik
,
isIn:
args
.
isIn
,
isIn:
args
.
isIn
,
shiftEnd:
args
.
shiftEnd
,
shiftStart:
args
.
shiftStart
,
shiftName:
args
.
shiftName
,
),
),
transitionDuration:
Duration
.
zero
,
transitionDuration:
Duration
.
zero
,
reverseTransitionDuration:
Duration
.
zero
,
reverseTransitionDuration:
Duration
.
zero
,
// settings: RouteSettings(
// settings: RouteSettings(
// name: nameRoute.replaceFirst("/", ""), arguments: args),
// name: nameRoute.replaceFirst("/", ""), arguments: args),
);
);
}
else
if
(
nameRoute
==
Routes
.
notFoundPage
)
{
ErrorWidgetArguments
args
=
routeSettings
!.
arguments
as
ErrorWidgetArguments
;
return
PageRouteBuilder
(
pageBuilder:
(
context
,
a
,
b
)
=>
ErrorWidgetView
(
messageError:
args
.
errorMessage
,
),
transitionDuration:
Duration
.
zero
,
reverseTransitionDuration:
Duration
.
zero
,
);
}
else
{
}
else
{
return
PageRouteBuilder
(
return
PageRouteBuilder
(
pageBuilder:
(
context
,
a
,
b
)
=>
target
,
pageBuilder:
(
context
,
a
,
b
)
=>
target
,
...
...
lib/resource/size.dart
View file @
462b1b21
...
@@ -15,6 +15,7 @@ class AppPadding {
...
@@ -15,6 +15,7 @@ class AppPadding {
static
double
p12
=
12
;
static
double
p12
=
12
;
static
double
p14
=
14
;
static
double
p14
=
14
;
static
double
p15
=
15
;
static
double
p15
=
15
;
static
double
p16
=
16
;
static
double
p20
=
20
;
static
double
p20
=
20
;
}
}
...
...
pubspec.yaml
View file @
462b1b21
...
@@ -93,6 +93,18 @@ flutter:
...
@@ -93,6 +93,18 @@ flutter:
weight
:
600
weight
:
600
-
asset
:
assets/fonts/poppins/Poppins-Bold.ttf
-
asset
:
assets/fonts/poppins/Poppins-Bold.ttf
weight
:
700
weight
:
700
-
family
:
K2D
fonts
:
-
asset
:
assets/fonts/k2d/K2D-Light.ttf
weight
:
300
-
asset
:
assets/fonts/k2d/K2D-Regular.ttf
weight
:
400
-
asset
:
assets/fonts/k2d/K2D-Medium.ttf
weight
:
500
-
asset
:
assets/fonts/k2d/K2D-SemiBold.ttf
weight
:
600
-
asset
:
assets/fonts/k2d/K2D-Bold.ttf
weight
:
700
# The following line ensures that the Material Icons font is
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# included with your application, so that you can use the icons in
...
...
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