Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
71979213
authored
Sep 23, 2016
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UOFLMA-33 - Fix - description is not showing same as website.
parent
ceab0740
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
14 deletions
app/src/main/java/com/vsoft/uoflservicenow/adapters/MyRequestAdapter.java
app/src/main/java/com/vsoft/uoflservicenow/api/interfaces/MyRequestApi.java
app/src/main/java/com/vsoft/uoflservicenow/api/managers/MyRequestApiManager.java
app/src/main/java/com/vsoft/uoflservicenow/db/models/MyRequest.java
app/src/main/java/com/vsoft/uoflservicenow/db/models/MyRequestCatItem.java
app/src/main/java/com/vsoft/uoflservicenow/utils/Util.java
app/src/main/java/com/vsoft/uoflservicenow/adapters/MyRequestAdapter.java
View file @
71979213
...
@@ -74,7 +74,7 @@ public class MyRequestAdapter extends BaseAdapter {
...
@@ -74,7 +74,7 @@ public class MyRequestAdapter extends BaseAdapter {
MyRequest
req
=
mReqList
.
get
(
position
);
MyRequest
req
=
mReqList
.
get
(
position
);
holder
.
number
.
setText
(
req
.
getNumber
());
holder
.
number
.
setText
(
req
.
getNumber
());
holder
.
shortDescription
.
setText
(
req
.
get
ShotrDescription
());
holder
.
shortDescription
.
setText
(
req
.
get
CatItem
().
getDisplayValue
());
if
(!
req
.
getApproval
().
isEmpty
())
{
if
(!
req
.
getApproval
().
isEmpty
())
{
if
(
req
.
getApproval
().
equalsIgnoreCase
(
"requested"
))
{
if
(
req
.
getApproval
().
equalsIgnoreCase
(
"requested"
))
{
...
...
app/src/main/java/com/vsoft/uoflservicenow/api/interfaces/MyRequestApi.java
View file @
71979213
...
@@ -16,8 +16,8 @@ import retrofit2.http.Query;
...
@@ -16,8 +16,8 @@ import retrofit2.http.Query;
public
interface
MyRequestApi
{
public
interface
MyRequestApi
{
// Get Catalogue API
// Get Catalogue API
@GET
(
Constants
.
URL_GET_MYREQUEST
)
@GET
(
Constants
.
URL_GET_MYREQUEST
)
Call
<
ResponseBody
>
getMy
request
(
@Query
(
Constants
.
URL_PARAM_SYSPRM_QUERY
)
String
sysparmQuery
);
Call
<
ResponseBody
>
getMy
Request
(
@Query
(
Constants
.
URL_PARAM_SYSPRM_QUERY
)
String
sysparmQuery
,
@Query
(
Constants
.
URL_PARAM_SYSPRM_DISPLAY_VALUE
)
String
sysparmDisplayValue
);
}
}
...
...
app/src/main/java/com/vsoft/uoflservicenow/api/managers/MyRequestApiManager.java
View file @
71979213
...
@@ -36,7 +36,7 @@ public class MyRequestApiManager {
...
@@ -36,7 +36,7 @@ public class MyRequestApiManager {
stringBuilder
.
append
(
MyRequest
.
Json
.
URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE
);
stringBuilder
.
append
(
MyRequest
.
Json
.
URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE
);
final
Retrofit
retrofit
=
RestClient
.
getInitializedRestAdapter
(
Constants
.
API_AUTH_PARAM_USER_NAME
,
Constants
.
API_AUTH_PARAM_PASSWORD
);
final
Retrofit
retrofit
=
RestClient
.
getInitializedRestAdapter
(
Constants
.
API_AUTH_PARAM_USER_NAME
,
Constants
.
API_AUTH_PARAM_PASSWORD
);
Call
<
ResponseBody
>
call
=
retrofit
.
create
(
MyRequestApi
.
class
).
getMy
request
(
stringBuilder
.
toString
()
);
Call
<
ResponseBody
>
call
=
retrofit
.
create
(
MyRequestApi
.
class
).
getMy
Request
(
stringBuilder
.
toString
(),
"true"
);
try
{
try
{
//Retrofit synchronous call
//Retrofit synchronous call
Response
<
ResponseBody
>
response
=
call
.
execute
();
Response
<
ResponseBody
>
response
=
call
.
execute
();
...
...
app/src/main/java/com/vsoft/uoflservicenow/db/models/MyRequest.java
View file @
71979213
...
@@ -19,15 +19,14 @@ public class MyRequest {
...
@@ -19,15 +19,14 @@ public class MyRequest {
@SerializedName
(
"sys_updated_on"
)
@SerializedName
(
"sys_updated_on"
)
// @Expose
// @Expose
private
long
updateOn
;
private
long
updateOn
;
@SerializedName
(
"short_description"
)
@Expose
private
String
shotrDescription
;
@SerializedName
(
"approval"
)
@SerializedName
(
"approval"
)
@Expose
@Expose
String
approval
;
String
approval
;
@SerializedName
(
"cat_item"
)
@Expose
MyRequestCatItem
catItem
;
public
String
getNumber
()
{
public
String
getNumber
()
{
return
number
;
return
number
;
}
}
...
@@ -44,12 +43,12 @@ public class MyRequest {
...
@@ -44,12 +43,12 @@ public class MyRequest {
this
.
updateOn
=
updateOn
;
this
.
updateOn
=
updateOn
;
}
}
public
String
getShotrDescription
()
{
public
MyRequestCatItem
getCatItem
()
{
return
shotrDescription
;
return
catItem
;
}
}
public
void
set
ShotrDescription
(
String
shotrDescription
)
{
public
void
set
CatItem
(
MyRequestCatItem
catItem
)
{
this
.
shotrDescription
=
shotrDescription
;
this
.
catItem
=
catItem
;
}
}
public
String
getApproval
()
{
public
String
getApproval
()
{
...
...
app/src/main/java/com/vsoft/uoflservicenow/db/models/MyRequestCatItem.java
0 → 100644
View file @
71979213
package
com
.
vsoft
.
uoflservicenow
.
db
.
models
;
import
com.google.gson.annotations.Expose
;
import
com.google.gson.annotations.SerializedName
;
/**
* Created by kvemulavada on 8/30/2016.
*/
public
class
MyRequestCatItem
{
@SerializedName
(
"display_value"
)
@Expose
private
String
displayValue
;
@SerializedName
(
"link"
)
@Expose
private
String
link
;
public
String
getDisplayValue
()
{
return
displayValue
;
}
public
void
setDisplayValue
(
String
displayValue
)
{
this
.
displayValue
=
displayValue
;
}
public
String
getLink
()
{
return
link
;
}
public
void
setLink
(
String
link
)
{
this
.
link
=
link
;
}
}
app/src/main/java/com/vsoft/uoflservicenow/utils/Util.java
View file @
71979213
...
@@ -303,7 +303,7 @@ public class Util {
...
@@ -303,7 +303,7 @@ public class Util {
}
}
public
static
long
getDateTimeForMyRequestFromString
(
String
strDate
)
{
public
static
long
getDateTimeForMyRequestFromString
(
String
strDate
)
{
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"
yyyy-MM-dd
HH:mm:ss"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"
MM/dd/yyyy
HH:mm:ss"
);
Date
date
=
null
;
Date
date
=
null
;
try
{
try
{
date
=
df
.
parse
(
strDate
);
date
=
df
.
parse
(
strDate
);
...
...
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