Commit a43d48f3 by Kunj Gupta

Added two options - Create and View HR case.

parent 91424b51
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
android:name="com.vsoft.servicenow.ui.NotificationScreen" android:name="com.vsoft.servicenow.ui.NotificationScreen"
android:screenOrientation="portrait"/> android:screenOrientation="portrait"/>
<activity
android:name="com.vsoft.servicenow.ui.CreateHRCaseScreen"
android:screenOrientation="portrait"/>
<activity
android:name="com.vsoft.servicenow.ui.ViewHRCaseScreen"
android:screenOrientation="portrait"/>
<service android:name=".service.NotificationInstanceIdService" <service android:name=".service.NotificationInstanceIdService"
android:exported="false"> android:exported="false">
<intent-filter> <intent-filter>
......
package com.vsoft.servicenow; package com.vsoft.servicenow;
import com.vsoft.servicenow.menu.ChatMenuItemData; import com.vsoft.servicenow.menu.ChatMenuItemData;
import com.vsoft.servicenow.menu.CreateHRCaseMenuItemData;
import com.vsoft.servicenow.menu.HomeScreenMenuItemData; import com.vsoft.servicenow.menu.HomeScreenMenuItemData;
import com.vsoft.servicenow.menu.MyIncidentMenuItemData; import com.vsoft.servicenow.menu.MyIncidentMenuItemData;
import com.vsoft.servicenow.menu.MyRequestMenuItemData; import com.vsoft.servicenow.menu.MyRequestMenuItemData;
import com.vsoft.servicenow.menu.NotificationMenuItemData; import com.vsoft.servicenow.menu.NotificationMenuItemData;
import com.vsoft.servicenow.menu.OrderServicesMenuItemData; import com.vsoft.servicenow.menu.OrderServicesMenuItemData;
import com.vsoft.servicenow.menu.ReportIncidentMenuItemData; import com.vsoft.servicenow.menu.ReportIncidentMenuItemData;
import com.vsoft.servicenow.menu.ViewHRCaseMenuItemData;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -33,6 +35,14 @@ public class MenuProvider { ...@@ -33,6 +35,14 @@ public class MenuProvider {
.setTitle(R.string.home_screen_report_incident_title) .setTitle(R.string.home_screen_report_incident_title)
.setMenuIconResId(R.string.home_screen_my_request_icon) .setMenuIconResId(R.string.home_screen_my_request_icon)
.build(), .build(),
new CreateHRCaseMenuItemData.Builder()
.setTitle(R.string.home_screen_create_hr_case_title)
.setMenuIconResId(R.string.home_screen_create_hr_case_icon)
.build(),
new ViewHRCaseMenuItemData.Builder()
.setTitle(R.string.home_screen_view_hr_case_title)
.setMenuIconResId(R.string.home_screen_view_hr_case_icon)
.build(),
new ChatMenuItemData.Builder() new ChatMenuItemData.Builder()
.setTitle(R.string.home_screen_chat_title) .setTitle(R.string.home_screen_chat_title)
.setMenuIconResId(R.string.home_screen_chat_icon) .setMenuIconResId(R.string.home_screen_chat_icon)
......
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
<string name="home_screen_my_request_title">My Requests</string> <string name="home_screen_my_request_title">My Requests</string>
<string name="home_screen_my_request_icon">my_requests</string> <string name="home_screen_my_request_icon">my_requests</string>
<string name="home_screen_create_hr_case_title">Create HR Case</string>
<string name="home_screen_create_hr_case_icon">create_hr_case</string>
<string name="home_screen_view_hr_case_title">View HR Case</string>
<string name="home_screen_view_hr_case_icon">view_hr_case</string>
<string name="home_screen_chat_title">Chatbot</string> <string name="home_screen_chat_title">Chatbot</string>
<string name="home_screen_chat_icon">chatbot</string> <string name="home_screen_chat_icon">chatbot</string>
......
...@@ -45,7 +45,7 @@ public class ChatMenuItemData extends HomeScreenMenuItemData implements Parcelab ...@@ -45,7 +45,7 @@ public class ChatMenuItemData extends HomeScreenMenuItemData implements Parcelab
public Builder() { public Builder() {
item = new ChatMenuItemData(); item = new ChatMenuItemData();
setFragment(ChatActivity.class); setActivity(ChatActivity.class);
} }
} }
} }
package com.vsoft.servicenow.menu;
import android.os.Parcel;
import android.os.Parcelable;
import com.vsoft.servicenow.ui.CreateHRCaseScreen;
import com.vsoft.servicenow.ui.ReportIncidentScreen;
/**
* Created by Kunj on 23/03/18.
*/
public class CreateHRCaseMenuItemData extends HomeScreenMenuItemData implements Parcelable {
protected CreateHRCaseMenuItemData() {
}
protected CreateHRCaseMenuItemData(Parcel in) {
super(in);
}
public static final Creator<CreateHRCaseMenuItemData> CREATOR = new Creator<CreateHRCaseMenuItemData>() {
@Override
public CreateHRCaseMenuItemData createFromParcel(Parcel in) {
return new CreateHRCaseMenuItemData(in);
}
@Override
public CreateHRCaseMenuItemData[] newArray(int size) {
return new CreateHRCaseMenuItemData[size];
}
};
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
}
@Override
public int describeContents() {
return 0;
}
public static class Builder extends HomeScreenMenuItemData.Builder<Builder> {
public Builder() {
item = new CreateHRCaseMenuItemData();
setActivity(CreateHRCaseScreen.class);
}
}
}
...@@ -75,8 +75,8 @@ public class HomeScreenMenuItemData implements Parcelable { ...@@ -75,8 +75,8 @@ public class HomeScreenMenuItemData implements Parcelable {
return (T) this; return (T) this;
} }
public T setFragment(Class fragment) { public T setActivity(Class activity) {
item.activity = fragment; item.activity = activity;
return (T) this; return (T) this;
} }
......
...@@ -46,7 +46,7 @@ public class MyIncidentMenuItemData extends HomeScreenMenuItemData implements Pa ...@@ -46,7 +46,7 @@ public class MyIncidentMenuItemData extends HomeScreenMenuItemData implements Pa
public Builder() { public Builder() {
item = new MyIncidentMenuItemData(); item = new MyIncidentMenuItemData();
setFragment(MyIncidentScreen.class); setActivity(MyIncidentScreen.class);
} }
} }
} }
...@@ -46,7 +46,7 @@ public class MyRequestMenuItemData extends HomeScreenMenuItemData implements Par ...@@ -46,7 +46,7 @@ public class MyRequestMenuItemData extends HomeScreenMenuItemData implements Par
public Builder() { public Builder() {
item = new MyRequestMenuItemData(); item = new MyRequestMenuItemData();
setFragment(MyRequestActivity.class); setActivity(MyRequestActivity.class);
} }
} }
} }
...@@ -45,7 +45,7 @@ public class NotificationMenuItemData extends HomeScreenMenuItemData implements ...@@ -45,7 +45,7 @@ public class NotificationMenuItemData extends HomeScreenMenuItemData implements
public Builder() { public Builder() {
item = new NotificationMenuItemData(); item = new NotificationMenuItemData();
setFragment(NotificationScreen.class); setActivity(NotificationScreen.class);
} }
} }
} }
...@@ -46,7 +46,7 @@ public class OrderServicesMenuItemData extends HomeScreenMenuItemData implements ...@@ -46,7 +46,7 @@ public class OrderServicesMenuItemData extends HomeScreenMenuItemData implements
public Builder() { public Builder() {
item = new OrderServicesMenuItemData(); item = new OrderServicesMenuItemData();
setFragment(CatalogueScreen.class); setActivity(CatalogueScreen.class);
} }
} }
} }
...@@ -45,7 +45,7 @@ public class ReportIncidentMenuItemData extends HomeScreenMenuItemData implement ...@@ -45,7 +45,7 @@ public class ReportIncidentMenuItemData extends HomeScreenMenuItemData implement
public Builder() { public Builder() {
item = new ReportIncidentMenuItemData(); item = new ReportIncidentMenuItemData();
setFragment(ReportIncidentScreen.class); setActivity(ReportIncidentScreen.class);
} }
} }
} }
package com.vsoft.servicenow.menu;
import android.os.Parcel;
import android.os.Parcelable;
import com.vsoft.servicenow.ui.ReportIncidentScreen;
import com.vsoft.servicenow.ui.ViewHRCaseScreen;
/**
* Created by Kunj on 23/03/18.
*/
public class ViewHRCaseMenuItemData extends HomeScreenMenuItemData implements Parcelable {
protected ViewHRCaseMenuItemData() {
}
protected ViewHRCaseMenuItemData(Parcel in) {
super(in);
}
public static final Creator<ViewHRCaseMenuItemData> CREATOR = new Creator<ViewHRCaseMenuItemData>() {
@Override
public ViewHRCaseMenuItemData createFromParcel(Parcel in) {
return new ViewHRCaseMenuItemData(in);
}
@Override
public ViewHRCaseMenuItemData[] newArray(int size) {
return new ViewHRCaseMenuItemData[size];
}
};
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
}
@Override
public int describeContents() {
return 0;
}
public static class Builder extends HomeScreenMenuItemData.Builder<Builder> {
public Builder() {
item = new ViewHRCaseMenuItemData();
setActivity(ViewHRCaseScreen.class);
}
}
}
package com.vsoft.servicenow.ui;
import android.support.v7.app.AppCompatActivity;
/**
* Created by chaukadev on 4/9/18.
*/
public class CreateHRCaseScreen extends AppCompatActivity {
}
package com.vsoft.servicenow.ui;
import android.support.v7.app.AppCompatActivity;
/**
* Created by chaukadev on 4/9/18.
*/
public class ViewHRCaseScreen extends AppCompatActivity {
}
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 sign in to comment