Subversion Repositories SmartDukaan

Rev

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

Rev 33894 Rev 34355
Line 9... Line 9...
9
    $(document).on('click', ".sanction-request", function () {
9
    $(document).on('click', ".sanction-request", function () {
10
 
10
 
11
        loadSanctionRequest("main-content");
11
        loadSanctionRequest("main-content");
12
    });
12
    });
13
 
13
 
-
 
14
    $(document).on('click', ".rbm-sanction-request", function () {
-
 
15
 
-
 
16
        loadRBML2SanctionRequest("main-content");
-
 
17
    });
-
 
18
 
14
 
19
 
15
    $(document).on('click', ".loan-summary", function () {
20
    $(document).on('click', ".loan-summary", function () {
16
 
21
 
17
        loadLoanDetail("main-content");
22
        loadLoanDetail("main-content");
18
    });
23
    });
Line 170... Line 175...
170
        }
175
        }
171
 
176
 
172
 
177
 
173
    })
178
    })
174
 
179
 
-
 
180
    $(document).on('click', '.l2-sanction-approval-send', function () {
-
 
181
        var row = $(this).closest("tr");
-
 
182
        console.log(row);
-
 
183
        var rowIndex = $(this).closest('tr').prevAll().length;
-
 
184
        console.log(rowIndex);
-
 
185
        var id = $(row).find("td:eq(0)").text();
-
 
186
 
-
 
187
 
-
 
188
        var approvalAmount = $(row).find(".approveamount input[type='text']").val();
-
 
189
        var freedays = $(row).find(".freedays input[type='text']").val();
-
 
190
 
-
 
191
 
-
 
192
        var status = $(row).find(".sanctionstatus option:selected").val();
-
 
193
 
-
 
194
        var stockHold = $(row).find(".stockholdcheckbox input[type='checkbox']").is(":checked") ? true : false;
-
 
195
 
-
 
196
 
-
 
197
        console.log(freedays)
-
 
198
 
-
 
199
        var sanctionReq = {};
-
 
200
        sanctionReq['id'] = id
-
 
201
        sanctionReq['status'] = status
-
 
202
        sanctionReq['approvalAmount'] = approvalAmount
-
 
203
        sanctionReq['freeDays'] = freedays
-
 
204
 
-
 
205
        sanctionReq['stockHold'] = stockHold
-
 
206
 
-
 
207
 
-
 
208
        var jsonObject = JSON.stringify(sanctionReq);
-
 
209
 
-
 
210
        console.log(jsonObject);
-
 
211
        if (confirm("Are you sure you want to submit the request") == true) {
-
 
212
            doAjaxRequestWithJsonHandler(context + "/rbmL2ApprovalSanctionRequest", "POST", jsonObject, function (response) {
-
 
213
                row.html(response);
-
 
214
                row.css("background-color", "#F8F8FF");
-
 
215
 
-
 
216
            });
-
 
217
        }
-
 
218
 
-
 
219
 
-
 
220
    })
-
 
221
 
175
 
222
 
176
    $(document).on('click', '.sanction-request-unhold', function () {
223
    $(document).on('click', '.sanction-request-unhold', function () {
177
        var row = $(this).closest("tr");
224
        var row = $(this).closest("tr");
178
        console.log(row);
225
        console.log(row);
179
        var transactionId = $(row).find("td:eq(3)").text();
226
        var transactionId = $(row).find("td:eq(3)").text();
Line 207... Line 254...
207
        response) {
254
        response) {
208
        $('#' + domId).html(response);
255
        $('#' + domId).html(response);
209
    });
256
    });
210
}
257
}
211
 
258
 
-
 
259
function loadRBML2SanctionRequest(domId) {
-
 
260
    doGetAjaxRequestHandler(context + "/getRbmL2SanctionRequest", function (
-
 
261
        response) {
-
 
262
        $('#' + domId).html(response);
-
 
263
    });
-
 
264
}
-
 
265
 
212
function loadLoanDetail(domId) {
266
function loadLoanDetail(domId) {
213
 
267
 
214
    doGetAjaxRequestHandler(context + "/getLoans", function (
268
    doGetAjaxRequestHandler(context + "/getLoans", function (
215
        response) {
269
        response) {
216
        $('#' + domId).html(response);
270
        $('#' + domId).html(response);