Subversion Repositories SmartDukaan

Rev

Rev 34091 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
30859 tejbeer 1
 
2
<script type="text/javascript">
3
 
4
    $(document).ready(function () {
34089 ranu 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
14
            },
15
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
16
        });
17
 
18
        // Initialize second table
19
        var sanctionTableApproved = $('#sanctiontable-approved').DataTable({
20
            "scrollX": true,
21
            "scrollY": "518px",
22
            scrollCollapse: true,
23
            "fixedHeader": true,
24
            "order": [[0, "desc"]],
25
            fixedColumns: {
26
                leftColumns: 3
27
            },
28
            dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
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
38
        });
30859 tejbeer 39
    });
34089 ranu 40
 
41
 
32121 tejbeer 42
    $('#sanctiontable').on('click', '.loanCount', function() {
43
		var fofoId = $(this).data('fofoid');
44
		doGetAjaxRequestHandler(context + "/getLoanSummary?fofoId="
45
			+ fofoId, function(response) {
46
				$('#loanSummarydetail .modal-content').html(response);
47
 
48
			});
32122 tejbeer 49
		});
33505 amit.gupta 50
 
34089 ranu 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
 
30859 tejbeer 60
</script>
61
 
62
 
63
 
64
<section class="wrapper">
65
	<div class="row">
66
		<div class="col-lg-12">
67
			<h3 class="page-header"><i class="icon_document_alt"></i>Sanction Request</h3>
68
			<ol class="breadcrumb">
69
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
32348 jai.hind 70
				<li><i class="icon_document_alt"></i>Sanction Request</li>
30859 tejbeer 71
 
72
			</ol>
73
		</div>
74
	</div>
34089 ranu 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>
30859 tejbeer 80
 
34089 ranu 81
        <div class="tab-content">
82
            <div id="pending" class="tab-pane fade in active">
83
                <div class="col-lg-12">
30859 tejbeer 84
 
34089 ranu 85
                    <table class="table table-border table-condensed table-bordered" id="sanctiontable"
86
                           style="width:100%">
32041 amit.gupta 87
 
34089 ranu 88
                        <thead class="row htable" style="background:#F5F5F5;">
32041 amit.gupta 89
 
34089 ranu 90
                        <tr style="color:black;">
91
                            <th>Id</th>
92
                            <th>Code</th>
93
                            <th>Partner Name</th>
94
                            <th>Lms</th>
95
                            <th>Lmtd</th>
96
                            <th>Mtd</th>
30859 tejbeer 97
 
34089 ranu 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>
30859 tejbeer 105
 
34089 ranu 106
                            <th>Risk</th>
107
                            <th>Total Investment</th>
30859 tejbeer 108
 
34089 ranu 109
                            <th>Short Investment</th>
110
                            <th>Wallet Amount</th>
111
                            <th>Requested By</th>
34360 ranu 112
                            <th>Approved By</th>
34089 ranu 113
                            <th>Req Amount</th>
114
                            <th>Approval Amount</th>
115
                            <th>Free days</th>
116
                            <th>Status</th>
117
                            <th>Hold Stock</th>
118
                            <th>Provider</th>
119
                            <th>Action</th>
120
                        </tr>
121
                        </thead>
122
                        <tbody>
123
                            #foreach($sanctionRequest in $sanctionRequests)
34091 ranu 124
                                #if($sanctionRequest.getStatus() == "PENDING")
125
                                <tr>
126
                                        #parse("sanction-request-row.vm")
34089 ranu 127
 
34091 ranu 128
                                </tr>
129
                                #end
34089 ranu 130
 
131
                            #end
132
 
133
                        </tbody>
134
 
135
                    </table>
136
                </div>
137
            </div>
138
            <div id="approved" class="tab-pane fade">
139
                <div class="col-lg-12">
140
 
141
                    <table class="table table-border table-condensed table-bordered" id="sanctiontable-approved"
142
                           style="width:100%">
143
 
144
                        <thead class="row htable" style="background:#F5F5F5;">
145
 
146
                        <tr style="color:black;">
147
                            <th>Id</th>
148
                            <th>Code</th>
149
                            <th>Partner Name</th>
150
                            <th>Lms</th>
151
                            <th>Lmtd</th>
152
                            <th>Mtd</th>
153
 
154
                            <th>limit</th>
155
                            <th>Available Limit</th>
156
                            <th>Utilization Amount</th>
157
                            <th>Interest</th>
158
                            <th>Credit Duration</th>
159
                            <th>Avg Credit Days</th>
160
                            <th>Active Loan</th>
161
 
162
                            <th>Risk</th>
163
                            <th>Total Investment</th>
164
 
165
                            <th>Short Investment</th>
166
                            <th>Wallet Amount</th>
167
                            <th>Requested By</th>
34360 ranu 168
                            <th>Approved By</th>
34089 ranu 169
                            <th>Req Amount</th>
170
                            <th>Approval Amount</th>
171
                            <th>Free days</th>
172
                            <th>Status</th>
173
                            <th>Hold Stock</th>
174
                            <th>Provider</th>
175
                            <th>Action</th>
176
                        </tr>
177
                        </thead>
178
                        <tbody>
179
                            #foreach($sanctionRequest in $sanctionRequests)
34090 ranu 180
                                #if($sanctionRequest.getStatus() == "APPROVED")
181
                                <tr>
182
                                        #parse("approved-sanction-request-row.vm")
34089 ranu 183
 
34090 ranu 184
                                </tr>
185
                                #end
34089 ranu 186
 
187
 
188
                            #end
189
 
190
                        </tbody>
191
 
192
                    </table>
193
                </div>
194
            </div>
195
        </div>
30859 tejbeer 196
    </div>
34089 ranu 197
 
198
 
32120 tejbeer 199
    <div id="loanSummarydetail" class="modal" role="dialog">
200
	  <div class="modal-dialog">
201
	    <div class="modal-content">
34089 ranu 202
 
203
        </div>
204
      </div>
32120 tejbeer 205
    </div>
30859 tejbeer 206
</section>