Subversion Repositories SmartDukaan

Rev

Rev 33505 | Rev 34090 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33505 Rev 34089
Line 1... Line 1...
1
 
1
 
2
<script type="text/javascript">
2
<script type="text/javascript">
3
 
3
 
4
    $(document).ready(function () {
4
    $(document).ready(function () {
-
 
5
        // Initialize first table
-
 
6
        var sanctionTable = $('#sanctiontable').DataTable({
-
 
7
            "scrollX": true,
-
 
8
            "scrollY": "518px",
-
 
9
            scrollCollapse: true,
-
 
10
            "fixedHeader": true,
-
 
11
            "order": [[0, "desc"]],
-
 
12
            fixedColumns: {
-
 
13
                leftColumns: 3
5
    
14
            },
-
 
15
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
6
       
16
        });
7
		
17
 
-
 
18
        // Initialize second table
8
      var dtable = $('#sanctiontable').DataTable({
19
        var sanctionTableApproved = $('#sanctiontable-approved').DataTable({
9
             "scrollX": true,
20
            "scrollX": true,
10
             "scrollY": "518px",
21
            "scrollY": "518px",
11
              scrollCollapse: true,
22
            scrollCollapse: true,
12
             "fixedHeader": true,
23
            "fixedHeader": true,
13
             "order": [[ 0, "desc" ]],
24
            "order": [[0, "desc"]],
14
             fixedColumns:   {
25
            fixedColumns: {
15
             leftColumns: 3
26
                leftColumns: 3
16
        },
27
            },
-
 
28
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
17
       });
29
        });
-
 
30
 
-
 
31
        // Adjust columns when tab changes
-
 
32
        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
-
 
33
            // Wait for tab switch and then adjust columns
-
 
34
            setTimeout(function () {
-
 
35
                sanctionTable.columns.adjust().draw();
-
 
36
                sanctionTableApproved.columns.adjust().draw();
-
 
37
            }, 100); // Delay adjustment slightly to ensure tab switch is complete
18
    
38
        });
19
    });
39
    });
20
    
40
 
21
    
41
 
22
    $('#sanctiontable').on('click', '.loanCount', function() {
42
    $('#sanctiontable').on('click', '.loanCount', function() {
23
		var fofoId = $(this).data('fofoid');
43
		var fofoId = $(this).data('fofoid');
24
		doGetAjaxRequestHandler(context + "/getLoanSummary?fofoId="
44
		doGetAjaxRequestHandler(context + "/getLoanSummary?fofoId="
25
			+ fofoId, function(response) {
45
			+ fofoId, function(response) {
26
				$('#loanSummarydetail .modal-content').html(response);
46
				$('#loanSummarydetail .modal-content').html(response);
27
 
47
 
28
			});
48
			});
29
		});
49
		});
30
 
50
 
-
 
51
    $('#sanctiontable-approved').on('click', '.loanCount', function () {
-
 
52
        var fofoId = $(this).data('fofoid');
-
 
53
        doGetAjaxRequestHandler(context + "/getLoanSummary?fofoId="
-
 
54
                + fofoId, function (response) {
-
 
55
            $('#loanSummarydetail .modal-content').html(response);
-
 
56
 
-
 
57
        });
-
 
58
    });
-
 
59
 
31
</script>
60
</script>
32
 
61
 
33
 
62
 
34
 
63
 
35
<section class="wrapper">
64
<section class="wrapper">
Line 41... Line 70...
41
				<li><i class="icon_document_alt"></i>Sanction Request</li>
70
				<li><i class="icon_document_alt"></i>Sanction Request</li>
42
							  	
71
							  	
43
			</ol>
72
			</ol>
44
		</div>
73
		</div>
45
	</div>
74
	</div>
-
 
75
    <div class="col-lg-12">
-
 
76
        <ul class="nav nav-tabs">
-
 
77
            <li class="active"><a data-toggle="tab" href="#pending">Pending</a></li>
-
 
78
            <li><a data-toggle="tab" href="#approved">Approved</a></li>
-
 
79
        </ul>
46
	
80
 
-
 
81
        <div class="tab-content">
-
 
82
            <div id="pending" class="tab-pane fade in active">
47
	    <div class="col-lg-12">
83
                <div class="col-lg-12">
-
 
84
 
48
        <table class="table table-border table-condensed table-bordered" id="sanctiontable" style="width:100%">
85
                    <table class="table table-border table-condensed table-bordered" id="sanctiontable"
-
 
86
                           style="width:100%">
49
 
87
 
50
            <thead class="row htable" style="background:#F5F5F5;">
88
                        <thead class="row htable" style="background:#F5F5F5;">
51
 
89
 
52
            <tr style="color:black;">
90
                        <tr style="color:black;">
53
                <th>Id</th>
91
                            <th>Id</th>
54
                <th>Code</th>
92
                            <th>Code</th>
55
                <th>Partner Name</th>
93
                            <th>Partner Name</th>
56
	            <th>Lms</th>
94
                            <th>Lms</th>
-
 
95
                            <th>Lmtd</th>
-
 
96
                            <th>Mtd</th>
-
 
97
 
-
 
98
                            <th>limit</th>
-
 
99
                            <th>Available Limit</th>
-
 
100
                            <th>Utilization Amount</th>
-
 
101
                            <th>Interest</th>
-
 
102
                            <th>Credit Duration</th>
-
 
103
                            <th>Avg Credit Days</th>
-
 
104
                            <th>Active Loan</th>
-
 
105
 
-
 
106
                            <th>Risk</th>
-
 
107
                            <th>Total Investment</th>
-
 
108
 
-
 
109
                            <th>Short Investment</th>
-
 
110
                            <th>Wallet Amount</th>
-
 
111
                            <th>Requested By</th>
-
 
112
                            <th>Req Amount</th>
-
 
113
                            <th>Approval Amount</th>
-
 
114
                            <th>Free days</th>
-
 
115
                            <th>Status</th>
-
 
116
                            <th>Hold Stock</th>
-
 
117
                            <th>Provider</th>
-
 
118
                            <th>Action</th>
57
	            <th>Lmtd</th>
119
                        </tr>
-
 
120
                        </thead>
-
 
121
                        <tbody>
-
 
122
                            #foreach($sanctionRequest in $sanctionRequests)
-
 
123
 
-
 
124
                            <tr>
-
 
125
                                    #parse("sanction-request-row.vm")
-
 
126
 
-
 
127
                            </tr>
-
 
128
 
-
 
129
                            #end
-
 
130
 
-
 
131
                        </tbody>
-
 
132
 
58
	            <th>Mtd</th>
133
                    </table>
-
 
134
                </div>
59
	        
135
            </div>
-
 
136
            <div id="approved" class="tab-pane fade">
-
 
137
                <div class="col-lg-12">
-
 
138
 
-
 
139
                    <table class="table table-border table-condensed table-bordered" id="sanctiontable-approved"
-
 
140
                           style="width:100%">
-
 
141
 
-
 
142
                        <thead class="row htable" style="background:#F5F5F5;">
-
 
143
 
-
 
144
                        <tr style="color:black;">
-
 
145
                            <th>Id</th>
-
 
146
                            <th>Code</th>
-
 
147
                            <th>Partner Name</th>
-
 
148
                            <th>Lms</th>
-
 
149
                            <th>Lmtd</th>
-
 
150
                            <th>Mtd</th>
-
 
151
 
60
                <th>limit</th>
152
                            <th>limit</th>
61
                <th>Available Limit</th>
153
                            <th>Available Limit</th>
62
                <th>Utilization Amount</th>
154
                            <th>Utilization Amount</th>
63
                <th>Interest</th>
155
                            <th>Interest</th>
64
                <th>Credit Duration</th>
156
                            <th>Credit Duration</th>
65
                <th>Avg Credit Days</th>
157
                            <th>Avg Credit Days</th>
66
                <th>Active Loan</th>
158
                            <th>Active Loan</th>
67
 
159
 
68
                <th>Risk</th>
160
                            <th>Risk</th>
69
                <th>Total Investment</th>
161
                            <th>Total Investment</th>
70
 
162
 
71
                <th>Short Investment</th>
163
                            <th>Short Investment</th>
72
                <th>Wallet Amount</th>
164
                            <th>Wallet Amount</th>
73
                <th>Requested By</th>
165
                            <th>Requested By</th>
74
                <th>Req Amount</th>
166
                            <th>Req Amount</th>
75
                <th>Approval Amount</th>
167
                            <th>Approval Amount</th>
76
                <th>Free days</th>
168
                            <th>Free days</th>
77
                <th>Status</th>
169
                            <th>Status</th>
78
                <th>Hold Stock</th>
170
                            <th>Hold Stock</th>
79
                <th>Provider</th>
171
                            <th>Provider</th>
80
                <th>Action</th>
172
                            <th>Action</th>
81
            </tr>
173
                        </tr>
82
            </thead>
174
                        </thead>
83
            <tbody>
175
                        <tbody>
84
                #foreach($sanctionRequest in $sanctionRequests)
176
                            #foreach($sanctionRequest in $sanctionRequests)
-
 
177
 
85
                
178
                            <tr>
-
 
179
                                    #parse("approved-sanction-request-row.vm")
86
 
180
 
87
                 <tr>
181
                            </tr>
-
 
182
 
-
 
183
                            #end
-
 
184
 
88
                   #parse("sanction-request-row.vm")
185
                        </tbody>
89
 
186
 
-
 
187
                    </table>
90
                </tr>
188
                </div>
91
             
189
            </div>
92
                #end
190
        </div>
-
 
191
    </div>
93
 
192
 
94
            </tbody>
-
 
95
 
193
 
96
        </table>
-
 
97
    </div>
-
 
98
    
-
 
99
    <div id="loanSummarydetail" class="modal" role="dialog">
194
    <div id="loanSummarydetail" class="modal" role="dialog">
100
	  <div class="modal-dialog">
195
	  <div class="modal-dialog">
101
	    <div class="modal-content">
196
	    <div class="modal-content">
-
 
197
 
-
 
198
        </div>
102
	     
199
      </div>
103
    </div>
200
    </div>
104
   </div>
-
 
105
 </div>
-
 
106
</section>
201
</section>
107
202