Commit bcb5168a authored by ymohite's avatar ymohite

Changes done for Tag count , Vision UI change, JsonData Method updated in Dashbaord util,

subtitle  change in Landing Dashbord.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@207744 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 06f840ba
......@@ -6,10 +6,8 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.naming.InitialContext;
......@@ -288,6 +286,12 @@ public class DashboardUtil
try
{
JSONObject valueObj = new JSONObject(value);
if(userInfo != null)
{
String transDB = userInfo.getTransDB();
String enterprise = userInfo.getEnterprise();
valueObj = updateJsonData(valueObj, transDB, enterprise);
}
JSONArray quicklinks = valueObj.optJSONArray("quicklinks");
JSONArray quicklinksFinal=new JSONArray();
for(int i = 0, size = quicklinks.length(); i < size; i++) {
......@@ -1321,5 +1325,75 @@ public class DashboardUtil
}
return conn;
}
private JSONObject updateJsonData(JSONObject valueObj, String transDB, String enterprise)
{
System.out.println("indside get updateJsonData");
PreparedStatement pstmt = null;
ResultSet rs = null;
Connection conn = null;
System.out.println("transdb ::::::::::" + transDB);
System.out.println("enterprise" + enterprise);
ConnDriver connDriver = new ConnDriver();
StringBuffer sql = new StringBuffer();
sql.append("SELECT enterprise_descr, ent_tagline, ent_logo")
.append(" FROM enterprise ")
.append(" WHERE enterprise ='" + enterprise + "'");
System.out.println("Enterprise sql :::: " + sql);
try
{
conn = connDriver.getConnectDB(transDB);
pstmt = conn.prepareStatement(sql.toString());
rs = pstmt.executeQuery();
if (rs.next())
{
String enterpriseDescription = checkNull(rs.getString("enterprise_descr") );
String enterpriseTagline = checkNull(rs.getString("ent_tagline") );
String enterpriselogo = checkNull(rs.getString("ent_logo") );
System.out.println("enterprise _Description " + enterpriseDescription);
System.out.println("ENTERPRISE_TAGLINE " + enterpriseTagline);
System.out.println("enterprise_logo " + enterpriselogo);
valueObj.put("image", enterpriselogo);
valueObj.put("title", enterpriseDescription);
valueObj.put("subtitle", enterpriseTagline);
}
}
catch (SQLException | JSONException e)
{
System.out.println("Exception in updateJsonData::: " + e.getMessage());
e.printStackTrace();
}
catch (Exception e)
{
System.out.println("Exception in updateJsonData::: " + e.getMessage());
e.printStackTrace();
}
finally {
try {
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
if (rs != null) {
rs.close();
rs = null;
}
if (conn != null) {
conn.close();
conn = null;
}
} catch (Exception e) {
System.out.println("Exception in finally updateJsonData :: " + e.getMessage());
e.printStackTrace();
}
}
System.out.println("updateJsonData ::: " + valueObj);
return valueObj;
}
}
......@@ -22,7 +22,7 @@
"title" : "My Places",
"count" : " getUserActSummary('PTE_COUNT') ",
"summary" : " getUserActSummary('PTE_MSG') ",
"execFunction" :"openTransactionGWT('place_time_entity','place-time-entity','A','Place Time Entity');"
"execFunction" :"openTransactionGWT('place_time_entity','place-time-entity','A','My Places');"
},
{
"bgImage":"linear-gradient(-45deg, #7053cc, #c3b3f7)",
......@@ -30,7 +30,7 @@
"title" : "My Contents",
"count" : "getUserActSummary('CLM_COUNT')",
"summary" : "getUserActSummary('CLM_MSG')",
"execFunction" : "openTransactionGWT('content_library','dashboard_contentLibrary','A','Content Library');"
"execFunction" : "openTransactionGWT('content_library','dashboard_contentLibrary','A','My Contents');"
},
{
"bgImage":"linear-gradient(-45deg, #01a27f, #00e1af)",
......@@ -38,7 +38,7 @@
"title" : "Jobs In Progress",
"count" : " getUserActSummary('JOBS_COUNT') ",
"summary" : "getUserActSummary('JOBS_MSG')",
"execFunction" : "openTransactionGWT('background_job_status','dashboard_backgroundJobStatus','A','Background Job');"
"execFunction" : "openTransactionGWT('background_job_status','dashboard_backgroundJobStatus','A','Jobs In Progress');"
},
{
"bgImage":"linear-gradient(-45deg, #e47842, #ffac83)",
......@@ -55,6 +55,7 @@
"image" : "wallet.svg",
"title" : "My Wallet",
"subtitle1" : " 'My Wallet' ",
"execFunction" : "openTransactionGWT('myexpensedata','dashboard_myexpensedata','A','My Wallet');",
"obj_name_rights" : "my_expense"
},
{
......@@ -84,7 +85,9 @@
"preloadDashboardData({'url' : '/ibase/rest/dashboard/userActSummary', 'value' : 'UserActSummary', 'type' : 'servlet'});"
]
}]]></datasource>
<view id='1' name='Default' type='flatonly'>
<component datasource='1' id='1' type='FEED'>
<component_icon><![CDATA[]]>
</component_icon>
......@@ -142,12 +145,12 @@
.quicklink {
display: block;
position: relative;
margin: 4px;
margin: 5px;
border-radius: 4px;
cursor: pointer;
height: 200px;
padding: 0px !important;
box-shadow: 0px 0px 4px -1px rgba(0,0,0,.1);
box-shadow: 0px 0px 4px 1px rgba(0,0,0,.1);
}
.quicklink-dashboard .quicklink-icon img {
......@@ -233,8 +236,6 @@
display: block;
}
.quick-row,
.kpi-row {
margin: auto;
......@@ -244,9 +245,9 @@
.kpi-box {
height: 114px;
max-height: 114px;
box-shadow: 0px 0px 4px -1px rgba(0,0,0,.1);
box-shadow: 0px 0px 4px 1px rgba(0,0,0,.1);
position: relative;
margin: 4px;
margin: 5px;
border-radius: 4px;
cursor: pointer;
display: flex;
......@@ -340,48 +341,47 @@
@media (min-width:320px) {
.kpi-card {
width: calc(100% - 8px) ;
width: calc(100% - 10px) ;
}
.quick-card {
width: calc(100% - 8px) ;
width: calc(100% - 10px) ;
}
}
@media (min-width:576px) {
.kpi-card {
width: calc(50% - 8px) ;
width: calc(50% - 10px) ;
}
.quick-card {
width: calc(50% - 8px) ;
width: calc(50% - 10px) ;
}
}
@media (min-width:768px) {
.kpi-card {
width: calc(25% - 8px) ;
width: calc(25% - 10px) ;
}
.quick-card {
width: calc(33.33333% - 8px) ;
width: calc(33.33333% - 10px) ;
}
}
@media (min-width:992px) {
.kpi-card {
width: calc(25% - 8px) ;
width: calc(25% - 10px) ;
}
.quick-card {
width: calc(33.33333% - 8px) ;
width: calc(33.33333% - 10px) ;
}
}
@media (min-width:1200px) {
.kpi-card {
width: calc(25% - 8px);
width: calc(25% - 10px);
}
.quick-card {
width: calc(33.33333% - 8px) ;
width: calc(33.33333% - 10px) ;
}
}
</style>
<div class="quicklink-dashboard">
<div class="quicklink-dashboard">
<div class="qd-header">
<div class="qd-header-content">
<span class="icon-circle"><img src='angplugin/assets/images/{{context.image}}' /></span>
......@@ -434,7 +434,7 @@
<img src='angplugin/assets/images/svg/{{quicklink.image}}' [ngClass]="evalFunction(quicklink.imageFunction)" />
</div>
<div *ngIf="quicklink.image.indexOf('/') != -1 " class="kpi-icon">
<img src='{{quicklink.image}}' [ngClass]="evalFunction(quicklink.imageFunction)" />
<img src='{{quicklink.image}}' [ngClass]="evalFunction(quicklink.imageFunction)"/>
</div>
<div class="kpi-title">{{quicklink.title}}</div>
</div>
......@@ -444,6 +444,7 @@
</div>
</div>
</ng-template>
]]></html>
</layout>
</component>
......
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 to comment