Subversion Repositories SmartDukaan

Rev

Rev 33505 | Rev 34090 | Go to most recent revision | 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>
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>
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
 
133
                    </table>
134
                </div>
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
 
152
                            <th>limit</th>
153
                            <th>Available Limit</th>
154
                            <th>Utilization Amount</th>
155
                            <th>Interest</th>
156
                            <th>Credit Duration</th>
157
                            <th>Avg Credit Days</th>
158
                            <th>Active Loan</th>
159
 
160
                            <th>Risk</th>
161
                            <th>Total Investment</th>
162
 
163
                            <th>Short Investment</th>
164
                            <th>Wallet Amount</th>
165
                            <th>Requested By</th>
166
                            <th>Req Amount</th>
167
                            <th>Approval Amount</th>
168
                            <th>Free days</th>
169
                            <th>Status</th>
170
                            <th>Hold Stock</th>
171
                            <th>Provider</th>
172
                            <th>Action</th>
173
                        </tr>
174
                        </thead>
175
                        <tbody>
176
                            #foreach($sanctionRequest in $sanctionRequests)
177
 
178
                            <tr>
179
                                    #parse("approved-sanction-request-row.vm")
180
 
181
                            </tr>
182
 
183
                            #end
184
 
185
                        </tbody>
186
 
187
                    </table>
188
                </div>
189
            </div>
190
        </div>
30859 tejbeer 191
    </div>
34089 ranu 192
 
193
 
32120 tejbeer 194
    <div id="loanSummarydetail" class="modal" role="dialog">
195
	  <div class="modal-dialog">
196
	    <div class="modal-content">
34089 ranu 197
 
198
        </div>
199
      </div>
32120 tejbeer 200
    </div>
30859 tejbeer 201
</section>