Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5/UI attedance dashboard #7

Open
wants to merge 25 commits into
base: 1/feature-intergrate-id-pass
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ buildscript {
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}


Expand Down Expand Up @@ -51,13 +54,14 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'


//UI
implementation 'com.params.stepview:stepview:1.0.2'

//debug libs
implementation 'com.facebook.stetho:stetho:1.4.2'
implementation 'com.facebook.stetho:stetho-okhttp3:1.4.2'
Expand All @@ -76,5 +80,7 @@ dependencies {
implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') {
transitive = true
}

implementation 'org.idpass.mobile.api:idpass-mobile-api:0.0.2'

}
20 changes: 13 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".login.LoginActivity"
android:exported="true">
<activity android:name=".settings.SettingsActivity"></activity>
<activity android:name=".splash.SplashScreenActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:windowSoftInputMode="adjustResize"
android:name=".newstaff.NewStaffActivity" />
android:name=".login.LoginActivity"
android:exported="true" />
<activity
android:name=".attendence.AttendanceViewPagerActivity"
/>
android:name=".newstaff.NewStaffActivity"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".attendence.AttendanceViewPagerActivity" />
<activity android:name=".jobs.SyncHistoryActivity" />
<activity
android:name=".attedancedashboard.AttendancesDashboardActivity"
android:exported="true" />
<activity android:name=".attendence.v2.AttedanceActivity" />
<activity android:name=".PreferencesActivity" />

<meta-data
android:name="io.fabric.ApiKey"
android:value="61f1ab9eb40ae0d7b3fdbc3417ad1ee196453e82" />
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class StaffListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
private HashMap<Integer, String> selectedStaffHashMap = new HashMap<>();


StaffListAdapter(Context mContext, List<TeamMemberResposne> staffList, boolean enablePersonSelection, List<String> attedanceIds, OnStaffItemClickListener listener) {
public StaffListAdapter(Context mContext, List<TeamMemberResposne> staffList, boolean enablePersonSelection, List<String> attedanceIds, OnStaffItemClickListener listener) {
this.mContext = mContext;
this.staffList = staffList;
this.filetredsitelist = staffList;
Expand Down Expand Up @@ -68,7 +68,8 @@ public void onBindViewHolder(final RecyclerView.ViewHolder holder, final int pos

staffVH.rootLayout.setEnabled(enablePersonSelection);
staffVH.staffName.setText(staff.getFirstName());
staffVH.staffType.setText(staff.getTeamName());
staffVH.staffPost.setText(staff.getDesignationLabel());

staffVH.iconText.setVisibility(View.VISIBLE);
staffVH.imgProfile.setImageResource(R.drawable.circle_blue);
staffVH.iconText.setText(staff.getFirstName().substring(0, 1));
Expand Down Expand Up @@ -180,6 +181,7 @@ private void applyIconAnimation(StaffVH holder, int position, boolean shouldHigh

holder.staffStatus.setText(holder.rootLayout.getContext().getString(R.string.attedance_absent));


holder.rootLayout.setActivated(!shouldHightlight);
holder.iconBack.setVisibility(View.GONE);
resetIconYAxis(holder.iconFront);
Expand Down Expand Up @@ -238,12 +240,13 @@ public ArrayList<String> getSelectedStaffID() {


public class StaffVH extends RecyclerView.ViewHolder {
private TextView staffName, staffStatus, siteAddress, sitePhone, staffType, sitePendingFormsNumber, site, iconText, timestamp, tvTagOfflineSite;
private TextView staffName, staffStatus, siteAddress, sitePhone, staffType, sitePendingFormsNumber, site, iconText, timestamp, tvTagOfflineSite,staffPost;
private ImageView iconImp, imgProfile;
private RelativeLayout iconContainer, iconBack, iconFront;
private RelativeLayout rootLayout;
private CardView card;


public StaffVH(View view) {
super(view);
card = view.findViewById(R.id.card_site_lst_row);
Expand All @@ -254,6 +257,7 @@ public StaffVH(View view) {
staffStatus = view.findViewById(R.id.staff_list_row_status);

staffName = view.findViewById(R.id.staff_list_row_name);
staffPost = view.findViewById(R.id.staff_list_row_post);
siteAddress = view.findViewById(R.id.staff_list_row_email);
sitePhone = view.findViewById(R.id.staff_list_row_phone);
staffType = view.findViewById(R.id.staff_list_row_type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ public ArrayList<MyTeamResponse> call(ArrayList<MyTeamResponse> myTeamResponses)

teamMemberResposne.setTeamID(myTeamResponse.getId());
teamMemberResposne.setTeamName(myTeamResponse.getName());
StaffDao.getInstance().saveStaff(teamMemberResposne);

long status = StaffDao.getInstance().saveStaff(teamMemberResposne);
Timber.d("Staff insert status %s", status);
})
.toList());

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package np.com.naxa.staffattendance.attedancedashboard

import np.com.naxa.staffattendance.attedancedashboard.base.IRow

data class AddItemButton(val uuid: String) : IRow
Loading