Odyssey
lnappportal.i
1 <?php
2  /**
3  * File: lnappportal.i
4  * Description: This script will show the current loans started, processed and completed.
5  */
6  /*
7  * Local Variables
8  */
9  // *** LOAD FRAGMENT for the MENU OF PORTAL SCREEN
10  $fragFileName = '/home/' . strtolower($DMSAPP_CURRENTCUCODE) . '/public_html/lnappCuPortal.html';
11 
12 ?>
13 <style>
14  #grid .k-grid-content,
15  .local-overflow-action {
16  overflow: visible !important;
17  }
18 
19  #grid .k-grid-content table tbody tr td:nth-child(2) {
20  display: none !important;
21  }
22  #grid .k-grid-content table tbody tr td:nth-child(4) {
23  display: none !important;
24  }
25  #grid .k-grid-content table tbody tr td:nth-child(1) {
26  text-align: center;
27  }
28  @media (min-width: 768px) {
29  #grid .k-grid-header .k-grid-header-wrap table tr th:nth-child(2) {
30  display: block !important;
31  }
32  #grid .k-grid-header .k-grid-header-wrap table tr th:nth-child(4) {
33  display: block !important;
34  }
35  #grid .k-grid-content table tbody tr td:nth-child(2) {
36  display: table-cell !important;
37  }
38  #grid .k-grid-content table tbody tr td:nth-child(4) {
39  display: table-cell !important;
40  }
41  }
42 </style>
43 <div class="container-fluid">
44 
45  <?php
46  // Place a message section top of the screen
47 
48  $loadedValues['lnappportal'] = Array();
49  HCU_ImportVars($loadedValues, "lnappportal", array("msg" => array('filter' => FILTER_UNSAFE_RAW)));
50  if (hcu_array_key_exists("msg", $loadedValues['lnappportal'])) {
51  ?>
52  <div class="col-lg-4">
53  <div class="alert alert-success" role="alert">
54  <div>
55  <span><?php echo hcu_array_key_value("msg", $loadedValues['lnappportal']); ?></span>
56  </div>
57  </div>
58  </div>
59  <?php
60  }
61 
62  /*
63  * MAIN SECTION OF LOAN APP PORTAL
64  */
65 
66  /*
67  * PREVIOUS LOAN ENTRIES
68  */
69 
70  $userLoans = GetAllUserLoans($HB_ENV, $DMSAPP_CURRENTUSERID);
71  if ($userLoans['code'] == '000' && count(HCU_array_key_value('data', $userLoans)) > 0) {
72  // ** SUCCESS - LOANS EXIST -- SHOW
73  // Translate array into json data
74  $userLoanData = $userLoans['data'];
75  $jsonDataAry = Array();
76  foreach ($userLoanData as $dataIdx => $recData) {
77 
78 
79  }
80 ?>
81  <div class="row">
82  <div class="col-sm-offset-1 col-sm-10">
83 
84  <div id="grid"></div>
85 
86  </div>
87  </div>
88  <script>
89  var loanDataJson = <?php echo HCU_jsonencode($userLoanData); ?>;
90  $(document).ready(function () {
91  $("#grid").kendoGrid({
92  dataSource: {
93  data: loanDataJson
94  },
95  rowTemplate: kendo.template($("#row-action-template").html()),
96  altRowTemplate: kendo.template($("#row-action-template").html()),
97  columns: [{
98  templatexx: kendo.template($("#cell-action-template").html()),
99  field: "action",
100  title: "&nbsp;",
101  width: '17%'
102  }, {
103  field: "LoanName",
104  title: "Loan For",
105  hidden: true
106  }, {
107  field: "LoanType",
108  title: "Loan Description"
109  }, {
110  field: "LoanStartOn",
111  title: "Started On",
112  format: "{0:MM/dd/yyyy h:mm}",
113  hidden: true
114  }, {
115  field: "LoanSubmitOn",
116  title: "Submitted On",
117  format: "{0:MM/dd/yyyy h:mm}"
118  }, {
119  field: "CuLoanResp",
120  title: "Status"
121  }]
122  });
123  });
124  </script>
125  <script type="text/x-kendo-template" id="row-action-template">
126  <tr role="row">
127  <td class="local-overflow-action" role="gridcell">
128  <div class="dropdown">
129  <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">
130 
131  <div class="visible-xs-inline-block">
132  <i class="fa fa-ellipsis-v" aria-hidden="true"></i>
133  </div>
134  <span class="hidden-xs">
135  Action
136  </span>
137  <span class="caret"></span>
138  </button>
139  <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
140  # if (action.edit) { #
141  <li>
142  <a href="<?php echo $self_full_url; ?>?f=entry&load=#= LoanRespId #">Edit</a>
143  </li>
144  # } #
145  # if (action.delete) { #
146  <li>
147  <a href="<?php echo $self_full_url; ?>?f=loandelete&remove=#= LoanRespId #">Delete</a>
148  </li>
149  # } #
150  # if (action.view) { #
151  <li>
152  <a href="<?php echo $self_full_url; ?>?f=viewapplication&viewapp=#= LoanRespId #" target="_new">View</a>
153  </li>
154  # } #
155  </ul>
156  </div>
157  </td>
158  <td class="" role="gridcell">
159  #= LoanName #
160  </td>
161  <td class="" role="gridcell">
162  #= LoanType #
163  </td>
164  <td class="" role="gridcell">
165  #= LoanStartOn #
166  </td>
167  <td class="" role="gridcell">
168  #= LoanSubmitOn #
169  </td>
170  <td class="" role="gridcell">
171  #= CuLoanResp #
172  </td>
173  </tr>
174  </script>
175  <script type="text/x-kendo-template" id="cell-action-template">
176 <!--<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
177 <i class="fa fa-trash-o" aria-hidden="true"></i>
178 <i class="fa fa-info-circle" aria-hidden="true"></i>-->
179 <b>#= action.view #</b>
180 
181  </script>
182 
183  <div class="row">
184  <div class="col-sm-offset-1 col-sm-10">
185  <br/>
186  </div>
187  </div>
188 
189 <?php
190  } else {
191  // ** NO LOANS TO SHOW
192  ?>
193  <div class="row">
194  <div class="col-sm-offset-1 col-sm-10">
195  <div class="panel panel-default">
196  <div class="panel-body">
197  You currently do not have any loan applications started.
198  </div>
199  </div>
200  </div>
201  </div>
202  <?php
203  }
204 
205 
206 
207 
208 
209  if (is_readable($fragFileName)) {
210 
211  include($fragFileName);
212  }
213 ?>
214 </div>
215 
216