Subversion Repositories SmartDukaan

Rev

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)
34091 ranu 123
                                #if($sanctionRequest.getStatus() == "PENDING")
124
                                <tr>
125
                                        #parse("sanction-request-row.vm")
34089 ranu 126
 
34091 ranu 127
                                </tr>
128
                                #end
34089 ranu 129
 
130
                            #end
131
 
132
                        </tbody>
133
 
134
                    </table>
135
                </div>
136
            </div>
137
            <div id="approved" class="tab-pane fade">
138
                <div class="col-lg-12">
139
 
140
                    <table class="table table-border table-condensed table-bordered" id="sanctiontable-approved"
141
                           style="width:100%">
142
 
143
                        <thead class="row htable" style="background:#F5F5F5;">
144
 
145
                        <tr style="color:black;">
146
                            <th>Id</th>
147
                            <th>Code</th>
148
                            <th>Partner Name</th>
149
                            <th>Lms</th>
150
                            <th>Lmtd</th>
151
                            <th>Mtd</th>
152
 
153
                            <th>limit</th>
154
                            <th>Available Limit</th>
155
                            <th>Utilization Amount</th>
156
                            <th>Interest</th>
157
                            <th>Credit Duration</th>
158
                            <th>Avg Credit Days</th>
159
                            <th>Active Loan</th>
160
 
161
                            <th>Risk</th>
162
                            <th>Total Investment</th>
163
 
164
                            <th>Short Investment</th>
165
                            <th>Wallet Amount</th>
166
                            <th>Requested By</th>
167
                            <th>Req Amount</th>
168
                            <th>Approval Amount</th>
169
                            <th>Free days</th>
170
                            <th>Status</th>
171
                            <th>Hold Stock</th>
172
                            <th>Provider</th>
173
                            <th>Action</th>
174
                        </tr>
175
                        </thead>
176
                        <tbody>
177
                            #foreach($sanctionRequest in $sanctionRequests)
34090 ranu 178
                                #if($sanctionRequest.getStatus() == "APPROVED")
179
                                <tr>
180
                                        #parse("approved-sanction-request-row.vm")
34089 ranu 181
 
34090 ranu 182
                                </tr>
183
                                #end
34089 ranu 184
 
185
 
186
                            #end
187
 
188
                        </tbody>
189
 
190
                    </table>
191
                </div>
192
            </div>
193
        </div>
30859 tejbeer 194
    </div>
34089 ranu 195
 
196
 
32120 tejbeer 197
    <div id="loanSummarydetail" class="modal" role="dialog">
198
	  <div class="modal-dialog">
199
	    <div class="modal-content">
34089 ranu 200
 
201
        </div>
202
      </div>
32120 tejbeer 203
    </div>
30859 tejbeer 204
</section>