Subversion Repositories SmartDukaan

Rev

Rev 33618 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33618 Rev 33845
Line 1... Line -...
1
$(function () {
-
 
2
    $(document).on('click', ".create-service", function () {
1
$(document).on('click', ".create-service", function () {
3
        loadService("main-content");
2
    loadService("main-content");
4
    });
-
 
5
 
-
 
6
    $(document).on('click', ".add-brand", function () {
-
 
7
        loadaddBrandToService("main-content");
-
 
8
    });
3
});
9
 
-
 
10
    $(document).on('click', ".notApplicableBrandService",
-
 
11
        function () {
-
 
12
            naCommentService = $(this).data('nacommentservice');
-
 
13
            console.log(naCommentService);
-
 
14
            var dialog = bootbox.dialog({
-
 
15
                message: "<h4 style='color:red'>NOTAPPLICABLE</h4><p>"
-
 
16
                    + naCommentService + "</p>",
-
 
17
                closeButton: true
-
 
18
            });
-
 
19
            dialog.modal('show');
-
 
20
 
4
 
-
 
5
$(document).on('click', ".add-brand", function () {
-
 
6
    loadaddBrandToService("main-content");
-
 
7
});
-
 
8
$(document).on('click', ".wod-fin-mapping-report", function () {
-
 
9
    doGetAjaxRequestHandler(`${context}/wodFinMappingReport`,
-
 
10
        function (response) {
-
 
11
            $('#' + 'main-content').html(response);
21
        });
12
        });
22
    $(document).on('click', ".add-brand", function () {
-
 
23
        loadaddBrandToService("main-content");
-
 
24
    });
13
});
25
    $(document).on('click', ".activate-brand-service-modal", function () {
-
 
26
        console.log("activate-brand-service-modal clicked");
-
 
27
        serviceId = $(this).data('serviceid');
-
 
28
        fofoId = $("#partnerName").val();
-
 
29
        serviceBrandId = $(this).data('servicebrandid');
-
 
30
        console.log(fofoId);
-
 
31
        console.log(serviceId);
-
 
32
        console.log(serviceBrandId);
-
 
33
        var params = {
-
 
34
            "serviceId": serviceId,
-
 
35
            "fofoId": fofoId,
-
 
36
            "serviceBrandId": serviceBrandId
-
 
37
 
-
 
38
        }
-
 
39
        doPostAjaxRequestWithParamsHandler(context
-
 
40
            + "/activatePartnerbrandServiceModal", params, function (response) {
-
 
41
 
14
 
42
            $('#myServiceActivateBrand').html(response);
-
 
43
 
15
 
-
 
16
$(document).on('click', ".notApplicableBrandService",
-
 
17
    function () {
-
 
18
        naCommentService = $(this).data('nacommentservice');
-
 
19
        console.log(naCommentService);
-
 
20
        var dialog = bootbox.dialog({
-
 
21
            message: "<h4 style='color:red'>NOTAPPLICABLE</h4><p>"
-
 
22
                + naCommentService + "</p>",
-
 
23
            closeButton: true
44
        });
24
        });
45
 
-
 
-
 
25
        dialog.modal('show');
46
 
26
 
47
    });
27
    });
-
 
28
$(document).on('click', ".add-brand", function () {
-
 
29
    loadaddBrandToService("main-content");
-
 
30
});
-
 
31
$(document).on('click', ".activate-brand-service-modal", function () {
-
 
32
    console.log("activate-brand-service-modal clicked");
-
 
33
    serviceId = $(this).data('serviceid');
-
 
34
    fofoId = $("#partnerName").val();
-
 
35
    serviceBrandId = $(this).data('servicebrandid');
-
 
36
    console.log(fofoId);
-
 
37
    console.log(serviceId);
-
 
38
    console.log(serviceBrandId);
-
 
39
    var params = {
-
 
40
        "serviceId": serviceId,
-
 
41
        "fofoId": fofoId,
-
 
42
        "serviceBrandId": serviceBrandId
-
 
43
 
-
 
44
    }
-
 
45
    doPostAjaxRequestWithParamsHandler(context
-
 
46
        + "/activatePartnerbrandServiceModal", params, function (response) {
48
 
47
 
49
    $(document).on('click', ".submit-brand-not-available", function () {
48
        $('#myServiceActivateBrand').html(response);
50
 
49
 
51
        console.log("submit-brand-not-available");
-
 
52
        serviceId = $(this).data('serviceid');
-
 
53
        fofoId = $("#partnerName").val();
-
 
54
        serviceBrandId = $(this).data('servicebrandid');
-
 
55
        na_comment = $('input[name="reasonBrandNotAvailable"]').val();
-
 
56
        active = false;
50
    });
57
        partnerStatus = "NOTWORKING";
-
 
58
        applicableType = "NO";
-
 
59
 
51
 
60
        if (na_comment == "" || na_comment == undefined) {
-
 
61
            alert("Na_comment can't be empty");
-
 
62
            return;
-
 
63
        }
-
 
64
 
52
 
65
        addPartnerServiceBrandDetails(fofoId, serviceId,
-
 
66
            serviceBrandId, applicableType, active,
-
 
67
            partnerStatus, na_comment);
-
 
68
        $('#myServiceActivateBrand').modal('hide');
-
 
69
        $('.modal-backdrop').remove();
53
});
70
 
54
 
71
    });
-
 
-
 
55
$(document).on('click', ".submit-brand-not-available", function () {
72
 
56
 
-
 
57
    console.log("submit-brand-not-available");
-
 
58
    serviceId = $(this).data('serviceid');
-
 
59
    fofoId = $("#partnerName").val();
-
 
60
    serviceBrandId = $(this).data('servicebrandid');
73
    $(document).on('click', ".reason-brand-service-not-activates", function () {
61
    na_comment = $('input[name="reasonBrandNotAvailable"]').val();
-
 
62
    active = false;
-
 
63
    partnerStatus = "NOTWORKING";
-
 
64
    applicableType = "NO";
-
 
65
 
-
 
66
    if (na_comment == "" || na_comment == undefined) {
-
 
67
        alert("Na_comment can't be empty");
-
 
68
        return;
-
 
69
    }
-
 
70
 
-
 
71
    addPartnerServiceBrandDetails(fofoId, serviceId,
-
 
72
        serviceBrandId, applicableType, active,
-
 
73
        partnerStatus, na_comment);
-
 
74
    $('#myServiceActivateBrand').modal('hide');
-
 
75
    $('.modal-backdrop').remove();
74
 
76
 
75
        console.log("reason-brand-service-not-activates clicked");
-
 
76
        serviceId = $(this).data('serviceid');
-
 
77
        fofoId = $("#partnerName").val();
-
 
78
        serviceBrandId = $(this).data('servicebrandid');
-
 
79
        var serviceBrandComment = $('input[name="reasonBrandServiceNotActivate"]').val();
-
 
80
        console.log(fofoId);
77
});
81
        console.log(serviceId);
-
 
82
        console.log(serviceBrandId);
-
 
83
        console.log(serviceBrandComment);
-
 
84
        reasonPartnerbrandServiceNotActivate(fofoId, serviceId, serviceBrandId, serviceBrandComment);
-
 
85
 
78
 
86
    });
-
 
-
 
79
$(document).on('click', ".reason-brand-service-not-activates", function () {
87
 
80
 
-
 
81
    console.log("reason-brand-service-not-activates clicked");
-
 
82
    serviceId = $(this).data('serviceid');
-
 
83
    fofoId = $("#partnerName").val();
-
 
84
    serviceBrandId = $(this).data('servicebrandid');
-
 
85
    var serviceBrandComment = $('input[name="reasonBrandServiceNotActivate"]').val();
-
 
86
    console.log(fofoId);
-
 
87
    console.log(serviceId);
-
 
88
    console.log(serviceBrandId);
-
 
89
    console.log(serviceBrandComment);
-
 
90
    reasonPartnerbrandServiceNotActivate(fofoId, serviceId, serviceBrandId, serviceBrandComment);
88
 
91
 
89
    $(document).on('click', ".service-comment", function () {
-
 
90
        serviceId = $(this).data('serviceid');
-
 
91
        fofoId = $(this).data('fofoid');
-
 
92
        var row = $(this).closest("tr");
-
 
-
 
92
});
93
 
93
 
-
 
94
 
-
 
95
$(document).on('click', ".service-comment", function () {
-
 
96
    serviceId = $(this).data('serviceid');
-
 
97
    fofoId = $(this).data('fofoid');
-
 
98
    var row = $(this).closest("tr");
-
 
99
 
94
        bootbox.dialog({
100
    bootbox.dialog({
95
            title: "Comment!",
101
        title: "Comment!",
96
            message: "<div class=form-inline'>"
102
        message: "<div class=form-inline'>"
97
                + "<label for='code'>comment :</label>"
103
            + "<label for='code'>comment :</label>"
98
                + "<input class='form-control' type='text' id='naTextComment'/>"
104
            + "<input class='form-control' type='text' id='naTextComment'/>"
99
                + "</div>",
105
            + "</div>",
100
            buttons: {
106
        buttons: {
101
                cancel: {
107
            cancel: {
102
                    label: "CANCEL",
108
                label: "CANCEL",
103
                    className: 'btn-danger',
109
                className: 'btn-danger',
-
 
110
                callback: function () {
-
 
111
                    return;
-
 
112
                }
-
 
113
            },
-
 
114
            ok: {
-
 
115
                label: "OK",
-
 
116
                className: 'btn-info',
104
                    callback: function () {
117
                callback: function () {
-
 
118
                    naText = $('#naTextComment').val();
-
 
119
                    if (naText == "" || naText == undefined || naText == null) {
-
 
120
                        alert("Comment text can't be empty");
105
                        return;
121
                        return;
106
                    }
122
                    }
107
                },
-
 
108
                ok: {
-
 
109
                    label: "OK",
-
 
110
                    className: 'btn-info',
-
 
111
                    callback: function () {
-
 
112
                        naText = $('#naTextComment').val();
-
 
113
                        if (naText == "" || naText == undefined || naText == null) {
-
 
114
                            alert("Comment text can't be empty");
-
 
115
                            return;
-
 
116
                        }
-
 
117
                        var params = {
123
                    var params = {
118
                            "serviceId": serviceId,
124
                        "serviceId": serviceId,
119
                            "fofoId": fofoId,
125
                        "fofoId": fofoId,
120
                            "naText": naText
126
                        "naText": naText
121
                        }
-
 
122
                        doPostAjaxRequestWithJsonHandler(context + "/addPartnerServiceGenComment",
-
 
123
                            JSON.stringify(params), function (response) {
-
 
124
                                alert("Successfully Submitted");
-
 
125
                                row.html(response);
-
 
126
 
-
 
127
                            });
-
 
128
                    }
127
                    }
-
 
128
                    doPostAjaxRequestWithJsonHandler(context + "/addPartnerServiceGenComment",
-
 
129
                        JSON.stringify(params), function (response) {
-
 
130
                            alert("Successfully Submitted");
-
 
131
                            row.html(response);
-
 
132
 
-
 
133
                        });
129
                }
134
                }
130
            }
135
            }
131
        });
136
        }
132
    });
137
    });
-
 
138
});
133
 
139
 
134
 
140
 
135
    $(document).on('click', ".follow-up-date", function () {
141
$(document).on('click', ".follow-up-date", function () {
136
        serviceId = $(this).data('serviceid');
142
    serviceId = $(this).data('serviceid');
137
        fofoId = $(this).data('fofoid');
143
    fofoId = $(this).data('fofoid');
138
        name = $(this).data('name');
144
    name = $(this).data('name');
139
        gencomment = $(this).data('gencomment');
145
    gencomment = $(this).data('gencomment');
140
        console.log("fofoId" + fofoId);
146
    console.log("fofoId" + fofoId);
141
        console.log("name -" + name);
147
    console.log("name -" + name);
142
        var row = $(this).closest("tr");
148
    var row = $(this).closest("tr");
143
        doGetAjaxRequestHandler(`${context}/brandWiseFollowupDetails?fofoId=${fofoId}&serviceId=${serviceId}`, function (response) {
149
    doGetAjaxRequestHandler(`${context}/brandWiseFollowupDetails?fofoId=${fofoId}&serviceId=${serviceId}`, function (response) {
144
            var tableBodyContent = [];
150
        var tableBodyContent = [];
145
            console.log("response - ", response);
151
        console.log("response - ", response);
146
            var result = JSON.parse(response);
152
        var result = JSON.parse(response);
147
            result.forEach(function (item) {
153
        result.forEach(function (item) {
148
                console.log("Item - ", item);
154
            console.log("Item - ", item);
149
 
155
 
150
                tableBodyContent.push(`<tr>
156
            tableBodyContent.push(`<tr>
151
            <td>${item.brand}</td>
157
            <td>${item.brand}</td>
152
            <td>${item.followUpDate}</td>
158
            <td>${item.followUpDate}</td>
153
        </tr>`);
159
        </tr>`);
154
            });
160
        });
155
            bootbox.dialog({
161
        bootbox.dialog({
156
                title: `<span style='color:black; font-size: medium'>${name}</span>`,
162
            title: `<span style='color:black; font-size: medium'>${name}</span>`,
157
                message: `<div class=form-inline'>
163
            message: `<div class=form-inline'>
158
 
164
 
159
                        <table class="table table-bordered ">
165
                        <table class="table table-bordered ">
160
                            <thead>
166
                            <thead>
161
                                <tr>
167
                                <tr>
162
                                    <th>Brands</th>
168
                                    <th>Brands</th>
Line 178... Line 184...
178
                                <option value="Xiaomi">Xiaomi</option>
184
                                <option value="Xiaomi">Xiaomi</option>
179
                            </select>
185
                            </select>
180
                         <label for='followUpDate'>Follow Up Date:</label>
186
                         <label for='followUpDate'>Follow Up Date:</label>
181
                         <input class='form-control' type='date' id='followUpDate'/>
187
                         <input class='form-control' type='date' id='followUpDate'/>
182
                      </div>`,
188
                      </div>`,
183
                buttons: {
-
 
184
                    cancel: {
-
 
185
                        label: "CANCEL",
-
 
186
                        className: 'btn-danger',
-
 
187
                        callback: function () {
-
 
188
                            return;
-
 
189
                        }
-
 
190
                    },
-
 
191
                    ok: {
-
 
192
                        label: "OK",
-
 
193
                        className: 'btn-info',
-
 
194
                        callback: function () {
-
 
195
                            followUpBrand = $('#followUpBrand').val();
-
 
196
                            followUpDate = $('#followUpDate').val();
-
 
197
 
-
 
198
 
-
 
199
                            var params = {
-
 
200
                                "serviceId": serviceId,
-
 
201
                                "fofoId": fofoId,
-
 
202
                                "naText": gencomment,
-
 
203
                                "followUpDate": followUpDate,
-
 
204
                                "followUpBrand": followUpBrand
-
 
205
 
-
 
206
                            };
-
 
207
 
-
 
208
 
-
 
209
						doPostAjaxRequestWithJsonHandler(context + "/addPartnerServiceFollowupDate",
-
 
210
							JSON.stringify(params), function (response) {
-
 
211
								alert("Successfully Submit");
-
 
212
								row.html(response);
-
 
213
 
-
 
214
                            });
-
 
215
                        }
-
 
216
                    }
-
 
217
                }
-
 
218
            });
-
 
219
        });
-
 
220
 
-
 
221
 
-
 
222
    });
-
 
223
 
-
 
224
    $(document).on('click', ".service-mark-not-active", function () {
-
 
225
        serviceId = $(this).data('serviceid');
-
 
226
        fofoId = $(this).data('fofoid');
-
 
227
        var row = $(this).closest("tr");
-
 
228
 
-
 
229
        bootbox.dialog({
-
 
230
            title: "Mark Not Applicable!",
-
 
231
            message: "<div class=form-inline'>"
-
 
232
                + "<label for='code'>Not Applicable Reason:</label>"
-
 
233
                + "<input class='form-control' type='text' id='naText'/>"
-
 
234
                + "</div>",
-
 
235
            buttons: {
189
            buttons: {
236
                cancel: {
190
                cancel: {
237
                    label: "CANCEL",
191
                    label: "CANCEL",
238
                    className: 'btn-danger',
192
                    className: 'btn-danger',
239
                    callback: function () {
193
                    callback: function () {
Line 242... Line 196...
242
                },
196
                },
243
                ok: {
197
                ok: {
244
                    label: "OK",
198
                    label: "OK",
245
                    className: 'btn-info',
199
                    className: 'btn-info',
246
                    callback: function () {
200
                    callback: function () {
247
                        naText = $('#naText').val();
201
                        followUpBrand = $('#followUpBrand').val();
248
                        if (naText == "" || naText == undefined || naText == null) {
-
 
249
                            alert("NA text can't be empty");
202
                        followUpDate = $('#followUpDate').val();
250
                            return;
-
 
251
                        }
-
 
-
 
203
 
-
 
204
 
252
                        var params = {
205
                        var params = {
253
                            "serviceId": serviceId,
206
                            "serviceId": serviceId,
254
                            "fofoId": fofoId,
207
                            "fofoId": fofoId,
255
                            "naText": naText
208
                            "naText": gencomment,
-
 
209
                            "followUpDate": followUpDate,
-
 
210
                            "followUpBrand": followUpBrand
-
 
211
 
256
                        }
212
                        };
-
 
213
 
-
 
214
 
257
                        doPostAjaxRequestWithJsonHandler(context + "/addPartnerServiceNotavailable",
215
                        doPostAjaxRequestWithJsonHandler(context + "/addPartnerServiceFollowupDate",
258
                            JSON.stringify(params), function (response) {
216
                            JSON.stringify(params), function (response) {
259
                                alert("Successfully Marked NA");
217
                                alert("Successfully Submit");
260
                                row.html(response);
218
                                row.html(response);
261
 
219
 
262
                            });
220
                            });
263
                    }
221
                    }
264
                }
222
                }
265
            }
223
            }
266
        });
224
        });
267
    });
225
    });
268
 
226
 
-
 
227
 
-
 
228
});
-
 
229
 
269
    $(document).on('click', ".markNA", function () {
230
$(document).on('click', ".service-mark-not-active", function () {
270
        let fofoId = $('#partnerName').val();
231
    serviceId = $(this).data('serviceid');
271
        let serviceId = $(this).data("serviceid");
232
    fofoId = $(this).data('fofoid');
-
 
233
    var row = $(this).closest("tr");
-
 
234
 
272
        bootbox.dialog({
235
    bootbox.dialog({
273
            title: "Mark Not Applicable!",
236
        title: "Mark Not Applicable!",
274
            message: "<div class=form-inline'>"
237
        message: "<div class=form-inline'>"
275
                + "<label for='code'>Not Applicable Reason:</label>"
238
            + "<label for='code'>Not Applicable Reason:</label>"
276
                + "<input class='form-control' type='text' id='naText'/>"
239
            + "<input class='form-control' type='text' id='naText'/>"
277
                + "</div>",
240
            + "</div>",
278
            buttons: {
241
        buttons: {
279
                cancel: {
242
            cancel: {
280
                    label: "CANCEL",
243
                label: "CANCEL",
281
                    className: 'btn-danger',
244
                className: 'btn-danger',
-
 
245
                callback: function () {
-
 
246
                    return;
-
 
247
                }
-
 
248
            },
-
 
249
            ok: {
-
 
250
                label: "OK",
-
 
251
                className: 'btn-info',
282
                    callback: function () {
252
                callback: function () {
-
 
253
                    naText = $('#naText').val();
-
 
254
                    if (naText == "" || naText == undefined || naText == null) {
-
 
255
                        alert("NA text can't be empty");
283
                        return;
256
                        return;
284
                    }
257
                    }
285
                },
-
 
286
                ok: {
-
 
287
                    label: "OK",
-
 
288
                    className: 'btn-info',
-
 
289
                    callback: function () {
-
 
290
                        naText = $('#naText').val();
-
 
291
                        if (naText == "" || naText == undefined || naText == null) {
-
 
292
                            alert("NA text can't be empty");
-
 
293
                            return;
-
 
294
                        }
-
 
295
                        var params = {
258
                    var params = {
296
                            "serviceId": serviceId,
259
                        "serviceId": serviceId,
297
                            "fofoId": fofoId,
260
                        "fofoId": fofoId,
298
                            "naText": naText
261
                        "naText": naText
299
                        }
-
 
300
                        doPostAjaxRequestWithJsonHandler(context + "/partnerservice/applicable",
-
 
301
                            JSON.stringify(params), function (response) {
-
 
302
                                alert("Successfully Marked NA");
-
 
303
                                loadAdminPartnerService("main-content", fofoId);
-
 
304
                            });
-
 
305
                    }
262
                    }
-
 
263
                    doPostAjaxRequestWithJsonHandler(context + "/addPartnerServiceNotavailable",
-
 
264
                        JSON.stringify(params), function (response) {
-
 
265
                            alert("Successfully Marked NA");
-
 
266
                            row.html(response);
-
 
267
 
-
 
268
                        });
306
                }
269
                }
307
            }
270
            }
308
        });
-
 
309
    });
-
 
310
    $(document).on('click', ".markApplicable", function () {
-
 
311
        let serviceId = $(this).data("serviceid");
-
 
312
        if (confirm("Confirm?")) {
-
 
313
            let fofoId = $('#partnerName').val();
-
 
314
            var params = {
-
 
315
                "serviceId": serviceId,
-
 
316
                "fofoId": fofoId,
-
 
317
                "naText": null
-
 
318
            }
-
 
319
            doPostAjaxRequestWithJsonHandler(context + "/partnerservice/applicable", JSON.stringify(params), function (response) {
-
 
320
                alert("successfully Marked Applicable");
-
 
321
                loadAdminPartnerService("main-content", fofoId);
-
 
322
            });
-
 
323
 
-
 
324
        }
271
        }
325
    });
272
    });
-
 
273
});
326
 
274
 
327
    $(document).on('click', ".add-service-details-for-partner",
275
$(document).on('click', ".markNA", function () {
328
        function () {
-
 
329
            fofoId = $("#partnerName").val();
276
    let fofoId = $('#partnerName').val();
330
            serviceId = $("#serviceName").val();
277
    let serviceId = $(this).data("serviceid");
331
            applicableType = $("#applicableService").val();
-
 
332
            code = $("#code").val();
278
    bootbox.dialog({
333
            partnerStatus = $("#partnerStatusTypeServices").val();
-
 
334
            na_comment = $("#na_comment_services").val();
-
 
335
            partnerCommentStatus = $("#partner_comment_status").val();
-
 
336
            if (applicableType == "" || applicableType == null
279
        title: "Mark Not Applicable!",
337
                || applicableType == undefined) {
280
        message: "<div class=form-inline'>"
338
                alert("select appropriate applicableType");
281
            + "<label for='code'>Not Applicable Reason:</label>"
339
            } else if (applicableType == 'NO') {
282
            + "<input class='form-control' type='text' id='naText'/>"
340
                if (na_comment == "" || na_comment == undefined) {
283
            + "</div>",
341
                    alert("Na_comment can't be empty");
284
        buttons: {
342
                    return;
285
            cancel: {
343
                }
286
                label: "CANCEL",
344
                if (fofoId == "" || fofoId == null || fofoId == undefined) {
287
                className: 'btn-danger',
345
                    alert("select appropriate partnerName");
288
                callback: function () {
346
                    return;
289
                    return;
347
                }
290
                }
348
                if (serviceId == "" || serviceId == null
291
            },
349
                    || serviceId == undefined) {
292
            ok: {
350
                    alert("select appropriate serviceName");
293
                label: "OK",
351
                    return;
294
                className: 'btn-info',
352
                }
295
                callback: function () {
353
            } else {
296
                    naText = $('#naText').val();
354
                if (fofoId == "" || fofoId == null || fofoId == undefined) {
297
                    if (naText == "" || naText == undefined || naText == null) {
355
                    alert("select appropriate partnerName");
298
                        alert("NA text can't be empty");
356
                    return;
299
                        return;
357
                }
300
                    }
358
                if (serviceId == "" || serviceId == null
301
                    var params = {
359
                    || serviceId == undefined) {
302
                        "serviceId": serviceId,
360
                    alert("select appropriate serviceName");
303
                        "fofoId": fofoId,
361
                    return;
304
                        "naText": naText
362
                }
305
                    }
-
 
306
                    doPostAjaxRequestWithJsonHandler(context + "/partnerservice/applicable",
363
                if (code == "" || code == null
307
                        JSON.stringify(params), function (response) {
364
                    || code == undefined) {
308
                            alert("Successfully Marked NA");
365
                    alert("enter appropriate code")
309
                            loadAdminPartnerService("main-content", fofoId);
366
                    return;
310
                        });
367
                }
311
                }
368
            }
312
            }
-
 
313
        }
-
 
314
    });
-
 
315
});
-
 
316
$(document).on('click', ".markApplicable", function () {
-
 
317
    let serviceId = $(this).data("serviceid");
-
 
318
    if (confirm("Confirm?")) {
369
            console.log(fofoId, serviceId, applicableType, code,
319
        let fofoId = $('#partnerName').val();
370
                partnerStatus);
320
        var params = {
371
            addPartnerServiceDetails(fofoId, serviceId, applicableType,
321
            "serviceId": serviceId,
372
                code, partnerStatus, na_comment,
322
            "fofoId": fofoId,
373
                partnerCommentStatus);
323
            "naText": null
374
 
324
        }
-
 
325
        doPostAjaxRequestWithJsonHandler(context + "/partnerservice/applicable", JSON.stringify(params), function (response) {
-
 
326
            alert("successfully Marked Applicable");
-
 
327
            loadAdminPartnerService("main-content", fofoId);
375
        });
328
        });
-
 
329
 
-
 
330
    }
-
 
331
});
-
 
332
 
376
    $(document).on('click', ".add-brand-service-details-for-partner",
333
$(document).on('click', ".add-service-details-for-partner",
377
        function () {
334
    function () {
378
            fofoId = $("#partnerName").val();
335
        fofoId = $("#partnerName").val();
379
            serviceId = $("#serviceName").val();
336
        serviceId = $("#serviceName").val();
380
            serviceBrandId = $("#serviceBrandName").val();
-
 
381
            applicableType = $("#applicableService").val();
337
        applicableType = $("#applicableService").val();
382
            active = $("#activeServiceBrand").val();
338
        code = $("#code").val();
383
            partnerStatus = $("#partnerStatusTypeServices").val();
339
        partnerStatus = $("#partnerStatusTypeServices").val();
384
            na_comment = $("#na_comment_services").val();
340
        na_comment = $("#na_comment_services").val();
385
            partnerCommentStatus = $("#partner_comment_status").val();
341
        partnerCommentStatus = $("#partner_comment_status").val();
-
 
342
        if (applicableType == "" || applicableType == null
-
 
343
            || applicableType == undefined) {
-
 
344
            alert("select appropriate applicableType");
386
            if (applicableType == "NO") {
345
        } else if (applicableType == 'NO') {
387
                if (na_comment == "" || na_comment == undefined) {
346
            if (na_comment == "" || na_comment == undefined) {
388
                    alert("Na_comment can't be empty");
347
                alert("Na_comment can't be empty");
389
                    return;
348
                return;
390
                }
-
 
391
            }
349
            }
392
            if (fofoId == "" || fofoId == null || fofoId == undefined) {
350
            if (fofoId == "" || fofoId == null || fofoId == undefined) {
393
                alert("select appropriate partnerName");
351
                alert("select appropriate partnerName");
394
                return;
352
                return;
-
 
353
            }
395
            } else if (serviceBrandId == "" || serviceBrandId == null
354
            if (serviceId == "" || serviceId == null
396
                || serviceBrandId == undefined) {
355
                || serviceId == undefined) {
397
                alert("select appropriate serviceBrandId");
356
                alert("select appropriate serviceName");
398
                return;
357
                return;
399
            } else if (applicableType == "" || applicableType == null
-
 
400
                || applicableType == undefined) {
-
 
401
                alert("select appropriate applicableType");
-
 
402
            } else if (active == "" || active == null
-
 
403
                || active == undefined) {
-
 
404
                alert("select appropriate active")
-
 
405
            } else if (partnerStatus == "" || partnerStatus == null
-
 
406
                || partnerStatus == undefined) {
-
 
407
                alert("select appropriate partnerStatus");
-
 
408
            } else {
-
 
409
                console.log(fofoId, serviceBrandId, applicableType, active,
-
 
410
                    partnerStatus);
-
 
411
                addPartnerServiceBrandDetails(fofoId, serviceId,
-
 
412
                    serviceBrandId, applicableType, active,
-
 
413
                    partnerStatus, na_comment, partnerCommentStatus);
-
 
414
            }
358
            }
415
        });
359
        } else {
416
    $(document).on('click', ".partner-service", function () {
360
            if (fofoId == "" || fofoId == null || fofoId == undefined) {
417
        loadpartnerService("main-content");
361
                alert("select appropriate partnerName");
-
 
362
                return;
418
    });
363
            }
419
    $(document).on('click', ".admin-partner-service", function () {
364
            if (serviceId == "" || serviceId == null
420
        loadAdminPartnerService("main-content", 0);
365
                || serviceId == undefined) {
-
 
366
                alert("select appropriate serviceName");
-
 
367
                return;
421
    });
368
            }
422
 
-
 
-
 
369
            if (code == "" || code == null
423
    $(document).on('click', ".partner-finance-services", function () {
370
                || code == undefined) {
424
        showFinanceServices("main-content");
371
                alert("enter appropriate code")
-
 
372
                return;
425
 
373
            }
426
    });
374
        }
-
 
375
        console.log(fofoId, serviceId, applicableType, code,
-
 
376
            partnerStatus);
-
 
377
        addPartnerServiceDetails(fofoId, serviceId, applicableType,
-
 
378
            code, partnerStatus, na_comment,
-
 
379
            partnerCommentStatus);
427
 
380
 
428
    $(document).on('click', ".add-partner-service-details", function () {
-
 
429
        loadaddPartnerServiceDetails("main-content");
-
 
430
    });
-
 
431
    $(document).on('click', ".add-partner-brand-service-details", function () {
-
 
432
        loadaddPartnerBrandServiceDetails("main-content");
-
 
433
    });
381
    });
434
    $(document).on('click', ".service-mark-active", function () {
382
$(document).on('click', ".add-brand-service-details-for-partner",
-
 
383
    function () {
-
 
384
        fofoId = $("#partnerName").val();
435
        serviceId = $(this).data('serviceid');
385
        serviceId = $("#serviceName").val();
436
        fofoId = $(this).data('fofoid');
386
        serviceBrandId = $("#serviceBrandName").val();
-
 
387
        applicableType = $("#applicableService").val();
437
        var row = $(this).closest("tr");
388
        active = $("#activeServiceBrand").val();
-
 
389
        partnerStatus = $("#partnerStatusTypeServices").val();
-
 
390
        na_comment = $("#na_comment_services").val();
-
 
391
        partnerCommentStatus = $("#partner_comment_status").val();
-
 
392
        if (applicableType == "NO") {
-
 
393
            if (na_comment == "" || na_comment == undefined) {
-
 
394
                alert("Na_comment can't be empty");
438
        console.log(fofoId);
395
                return;
-
 
396
            }
-
 
397
        }
-
 
398
        if (fofoId == "" || fofoId == null || fofoId == undefined) {
-
 
399
            alert("select appropriate partnerName");
-
 
400
            return;
-
 
401
        } else if (serviceBrandId == "" || serviceBrandId == null
-
 
402
            || serviceBrandId == undefined) {
439
        console.log(serviceId);
403
            alert("select appropriate serviceBrandId");
440
        console.log(row);
404
            return;
-
 
405
        } else if (applicableType == "" || applicableType == null
-
 
406
            || applicableType == undefined) {
-
 
407
            alert("select appropriate applicableType");
-
 
408
        } else if (active == "" || active == null
-
 
409
            || active == undefined) {
-
 
410
            alert("select appropriate active")
-
 
411
        } else if (partnerStatus == "" || partnerStatus == null
-
 
412
            || partnerStatus == undefined) {
-
 
413
            alert("select appropriate partnerStatus");
-
 
414
        } else {
-
 
415
            console.log(fofoId, serviceBrandId, applicableType, active,
-
 
416
                partnerStatus);
441
        activateFinanceServices(fofoId, serviceId, row);
417
            addPartnerServiceBrandDetails(fofoId, serviceId,
-
 
418
                serviceBrandId, applicableType, active,
-
 
419
                partnerStatus, na_comment, partnerCommentStatus);
-
 
420
        }
442
    });
421
    });
-
 
422
$(document).on('click', ".partner-service", function () {
-
 
423
    loadpartnerService("main-content");
-
 
424
});
-
 
425
$(document).on('click', ".admin-partner-service", function () {
-
 
426
    loadAdminPartnerService("main-content", 0);
-
 
427
});
443
 
428
 
-
 
429
$(document).on('click', ".partner-finance-services", function () {
-
 
430
    showFinanceServices("main-content");
444
 
431
 
445
    $(document).on('click', ".activate-service", function () {
-
 
446
        serviceId = $(this).data('serviceid');
-
 
447
        fofoId = $("#partnerName").val();
-
 
448
        console.log(fofoId);
-
 
449
        console.log(serviceId);
-
 
450
        activatePartnerService(fofoId, serviceId);
-
 
451
    });
432
});
452
    $(document).on('click', ".deactivate-service", function () {
-
 
453
        serviceId = $(this).data('serviceid');
-
 
454
        fofoId = $("#partnerName").val();
-
 
455
        console.log(fofoId);
-
 
456
        console.log(serviceId);
-
 
457
        deActivatePartnerService(fofoId, serviceId);
-
 
458
    });
-
 
459
    $(document).on('click', ".activate-brand-service", function () {
-
 
460
        console.log("activate-brand-servicel clicked");
-
 
461
        serviceId = $(this).data('serviceid');
-
 
462
        fofoId = $("#partnerName").val();
-
 
463
        serviceBrandId = $(this).data('servicebrandid');
-
 
464
        console.log(fofoId);
-
 
465
        console.log(serviceId);
-
 
466
        console.log(serviceBrandId);
-
 
467
        activatePartnerBrandService(fofoId, serviceId, serviceBrandId);
-
 
468
 
433
 
-
 
434
$(document).on('click', ".add-partner-service-details", function () {
-
 
435
    loadaddPartnerServiceDetails("main-content");
469
    });
436
});
470
    $(document).on('click', ".deactivate-brand-service", function () {
437
$(document).on('click', ".add-partner-brand-service-details", function () {
471
        console.log("activate-brand-service clicked");
438
    loadaddPartnerBrandServiceDetails("main-content");
-
 
439
});
-
 
440
$(document).on('click', ".service-mark-active", function () {
472
        serviceId = $(this).data('serviceid');
441
    serviceId = $(this).data('serviceid');
473
        fofoId = $("#partnerName").val();
442
    fofoId = $(this).data('fofoid');
474
        var serviceBrandComment = $('input[name="reasonBrandServiceNotActivate"]').val();
-
 
475
        serviceBrandId = $(this).data('servicebrandid');
443
    var row = $(this).closest("tr");
476
        console.log(fofoId);
444
    console.log(fofoId);
477
        console.log(serviceId);
445
    console.log(serviceId);
478
        console.log(serviceBrandId);
446
    console.log(row);
479
        console.log(serviceBrandComment);
-
 
480
        deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId, serviceBrandComment);
447
    activateFinanceServices(fofoId, serviceId, row);
-
 
448
});
481
 
449
 
482
    });
-
 
483
    $(document).on('click', ".partner-not-interested-service", function () {
-
 
484
 
450
 
-
 
451
$(document).on('click', ".activate-service", function () {
485
        serviceId = $(this).data('serviceid');
452
    serviceId = $(this).data('serviceid');
486
        fofoId = $("#partnerName").val();
453
    fofoId = $("#partnerName").val();
-
 
454
    console.log(fofoId);
-
 
455
    console.log(serviceId);
-
 
456
    activatePartnerService(fofoId, serviceId);
-
 
457
});
-
 
458
$(document).on('click', ".deactivate-service", function () {
-
 
459
    serviceId = $(this).data('serviceid');
-
 
460
    fofoId = $("#partnerName").val();
-
 
461
    console.log(fofoId);
-
 
462
    console.log(serviceId);
-
 
463
    deActivatePartnerService(fofoId, serviceId);
-
 
464
});
-
 
465
$(document).on('click', ".activate-brand-service", function () {
-
 
466
    console.log("activate-brand-servicel clicked");
-
 
467
    serviceId = $(this).data('serviceid');
-
 
468
    fofoId = $("#partnerName").val();
-
 
469
    serviceBrandId = $(this).data('servicebrandid');
-
 
470
    console.log(fofoId);
-
 
471
    console.log(serviceId);
-
 
472
    console.log(serviceBrandId);
487
        var partnerNotInterestedComment = $('input[name="reasonPartnerNotInterested"]').val();
473
    activatePartnerBrandService(fofoId, serviceId, serviceBrandId);
488
 
474
 
-
 
475
});
-
 
476
$(document).on('click', ".deactivate-brand-service", function () {
-
 
477
    console.log("activate-brand-service clicked");
-
 
478
    serviceId = $(this).data('serviceid');
-
 
479
    fofoId = $("#partnerName").val();
-
 
480
    var serviceBrandComment = $('input[name="reasonBrandServiceNotActivate"]').val();
-
 
481
    serviceBrandId = $(this).data('servicebrandid');
489
        console.log(fofoId);
482
    console.log(fofoId);
490
        console.log(serviceId);
483
    console.log(serviceId);
-
 
484
    console.log(serviceBrandId);
491
        console.log(partnerNotInterestedComment);
485
    console.log(serviceBrandComment);
-
 
486
    deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId, serviceBrandComment);
492
 
487
 
-
 
488
});
493
        if (partnerNotInterestedComment == "" || partnerNotInterestedComment == undefined) {
489
$(document).on('click', ".partner-not-interested-service", function () {
494
            alert("Comment Should Be Filled");
-
 
495
            return;
-
 
496
        }
-
 
497
 
490
 
-
 
491
    serviceId = $(this).data('serviceid');
-
 
492
    fofoId = $("#partnerName").val();
-
 
493
    var partnerNotInterestedComment = $('input[name="reasonPartnerNotInterested"]').val();
498
 
494
 
-
 
495
    console.log(fofoId);
-
 
496
    console.log(serviceId);
499
        deActivatePartnerServiceByPartner(fofoId, serviceId, partnerNotInterestedComment);
497
    console.log(partnerNotInterestedComment);
500
 
498
 
-
 
499
    if (partnerNotInterestedComment == "" || partnerNotInterestedComment == undefined) {
-
 
500
        alert("Comment Should Be Filled");
-
 
501
        return;
501
    });
502
    }
502
 
503
 
503
 
504
 
504
    $(document).on('click', ".service-mark-pni", function () {
505
    deActivatePartnerServiceByPartner(fofoId, serviceId, partnerNotInterestedComment);
505
 
506
 
506
        serviceId = $(this).data('serviceid');
-
 
507
        fofoId = $(this).data('fofoid');
-
 
508
        var partnerNotInterestedComment = "Partner Not Interested"
-
 
509
        var row = $(this).closest("tr");
-
 
510
        console.log(fofoId);
-
 
511
        console.log(serviceId);
-
 
512
        console.log(row);
507
});
513
 
508
 
514
 
509
 
515
        deActivateFinanceServicePartnerNotInterested(fofoId, serviceId, partnerNotInterestedComment, row);
510
$(document).on('click', ".service-mark-pni", function () {
516
 
511
 
-
 
512
    serviceId = $(this).data('serviceid');
-
 
513
    fofoId = $(this).data('fofoid');
-
 
514
    var partnerNotInterestedComment = "Partner Not Interested"
-
 
515
    var row = $(this).closest("tr");
-
 
516
    console.log(fofoId);
-
 
517
    console.log(serviceId);
517
    });
518
    console.log(row);
518
 
519
 
519
    $(document).on('click', ".action-on-brand", function () {
-
 
520
        serviceId = $(this).data('serviceid');
-
 
521
        fofoId = $(this).data('fofoid');
-
 
522
        brandid = $(this).data('brandid');
-
 
523
        var row = $(this).closest("tr");
-
 
524
 
520
 
525
        console.log(fofoId);
-
 
526
        console.log(serviceId);
-
 
527
        console.log(brandid);
-
 
528
        actionFinanceBrandService(fofoId, serviceId, brandid, row);
521
    deActivateFinanceServicePartnerNotInterested(fofoId, serviceId, partnerNotInterestedComment, row);
529
 
522
 
530
    });
523
});
531
 
524
 
-
 
525
$(document).on('click', ".action-on-brand", function () {
-
 
526
    serviceId = $(this).data('serviceid');
-
 
527
    fofoId = $(this).data('fofoid');
-
 
528
    brandid = $(this).data('brandid');
-
 
529
    var row = $(this).closest("tr");
-
 
530
 
-
 
531
    console.log(fofoId);
-
 
532
    console.log(serviceId);
-
 
533
    console.log(brandid);
-
 
534
    actionFinanceBrandService(fofoId, serviceId, brandid, row);
532
 
535
 
533
    $(document).on('click', ".deactivate-brand-service-modal", function () {
-
 
534
        console.log("activate-brand-service clicked");
-
 
535
        serviceId = $(this).data('serviceid');
-
 
536
        fofoId = $("#partnerName").val();
-
 
537
        serviceBrandId = $(this).data('servicebrandid');
-
 
538
        console.log(fofoId);
536
});
539
        console.log(serviceId);
-
 
540
        console.log(serviceBrandId);
-
 
541
        var params = {
-
 
542
            "serviceId": serviceId,
-
 
543
            "fofoId": fofoId,
-
 
544
            "serviceBrandId": serviceBrandId
-
 
545
 
537
 
546
        }
-
 
547
        doPostAjaxRequestWithParamsHandler(context
-
 
548
            + "/deactivatePartnerbrandServiceModal", params, function (response) {
-
 
549
 
538
 
-
 
539
$(document).on('click', ".deactivate-brand-service-modal", function () {
-
 
540
    console.log("activate-brand-service clicked");
-
 
541
    serviceId = $(this).data('serviceid');
-
 
542
    fofoId = $("#partnerName").val();
-
 
543
    serviceBrandId = $(this).data('servicebrandid');
-
 
544
    console.log(fofoId);
-
 
545
    console.log(serviceId);
-
 
546
    console.log(serviceBrandId);
-
 
547
    var params = {
-
 
548
        "serviceId": serviceId,
-
 
549
        "fofoId": fofoId,
-
 
550
        "serviceBrandId": serviceBrandId
-
 
551
 
-
 
552
    }
-
 
553
    doPostAjaxRequestWithParamsHandler(context
-
 
554
        + "/deactivatePartnerbrandServiceModal", params, function (response) {
-
 
555
 
550
            $('#myServiceDeActivateBrand').html(response);
556
        $('#myServiceDeActivateBrand').html(response);
551
 
557
 
552
        });
-
 
553
    });
558
    });
-
 
559
});
554
 
560
 
555
    $(document).on('click', ".notApplicableByPartner", function () {
561
$(document).on('click', ".notApplicableByPartner", function () {
556
        console.log("notApplicableByPartner");
562
    console.log("notApplicableByPartner");
557
 
563
 
558
        serviceId = $(this).data('serviceid');
564
    serviceId = $(this).data('serviceid');
559
        fofoId = $("#partnerName").val();
565
    fofoId = $("#partnerName").val();
560
 
566
 
561
        console.log(fofoId);
567
    console.log(fofoId);
562
        console.log(serviceId);
568
    console.log(serviceId);
563
 
569
 
564
        var params = {
570
    var params = {
565
            "serviceId": serviceId,
571
        "serviceId": serviceId,
566
            "fofoId": fofoId,
572
        "fofoId": fofoId,
567
 
573
 
568
        }
574
    }
569
        doPostAjaxRequestWithParamsHandler(context
575
    doPostAjaxRequestWithParamsHandler(context
570
            + "/deactivatePartnerbrandServiceModal", params, function (response) {
576
        + "/deactivatePartnerbrandServiceModal", params, function (response) {
571
 
577
 
572
            $('#serviceDeactivateByPartnerModal').html(response);
578
        $('#serviceDeactivateByPartnerModal').html(response);
573
 
579
 
574
        });
-
 
575
    });
580
    });
-
 
581
});
576
 
582
 
577
 
583
 
578
    $(document).on('click', ".create-service-button",
584
$(document).on('click', ".create-service-button",
579
        function () {
585
    function () {
580
            console.log("create-service-button clicked");
586
        console.log("create-service-button clicked");
581
            var serviceName = $('#createserviceName').val();
587
        var serviceName = $('#createserviceName').val();
582
            if (serviceName === "" || serviceName === undefined
588
        if (serviceName === "" || serviceName === undefined
583
                || serviceName == null) {
589
            || serviceName == null) {
584
                alert("Input field can't be empty");
590
            alert("Input field can't be empty");
585
                return;
-
 
586
            }
-
 
587
            if (confirm("Are you sure you want to create Service!") == true) {
-
 
588
                createService("main-content", serviceName);
-
 
589
            }
-
 
590
        });
-
 
591
    $(document).on('click', ".partner-service-search-button",
-
 
592
        function () {
-
 
593
            var fofoId = $('#partnerName').val();
-
 
594
            if (fofoId === "" || fofoId === undefined || fofoId == null) {
-
 
595
                alert("select appropriate partner");
-
 
596
                return;
-
 
597
            }
-
 
598
            doGetAjaxRequestHandler(context + "/getPartnerServices?fofoId="
-
 
599
                + fofoId, function (response) {
-
 
600
                $('#' + "partnerServicesByID").html(response);
-
 
601
            });
-
 
602
        });
-
 
603
    $(document).on('click', "#remove-added-brand-button",
-
 
604
        function () {
-
 
605
            var serviceId = $(this).data('id');
-
 
606
            var brand = $(this).data('brand');
-
 
607
            console.log(serviceId);
-
 
608
            console.log(brand)
-
 
609
            if (confirm("Are you sure you want to remove brand from Service!") == true) {
-
 
610
                removeBrandFromService("main-content", serviceId,
-
 
611
                    brand);
-
 
612
            }
-
 
613
        });
-
 
614
    $(document).on('click', ".service-brand-button", function () {
-
 
615
        var brands = $('#tag-listing-brands').val();
-
 
616
        var serviceId = $('#serviceName').val();
-
 
617
        console.log(brands);
-
 
618
        console.log(serviceId);
-
 
619
        if (serviceId === "" || serviceId === undefined) {
-
 
620
            alert("service not selected");
-
 
621
            return;
591
            return;
622
        }
592
        }
623
        if (!brands) {
593
        if (confirm("Are you sure you want to create Service!") == true) {
624
            alert("select brand");
594
            createService("main-content", serviceName);
625
            return;
-
 
626
        }
595
        }
-
 
596
    });
-
 
597
$(document).on('click', ".partner-service-search-button",
-
 
598
    function () {
-
 
599
        var fofoId = $('#partnerName').val();
627
        if (confirm("Are you sure you want to add brand!") == true) {
600
        if (fofoId === "" || fofoId === undefined || fofoId == null) {
628
            addBrandToService("main-content", brands, serviceId);
601
            alert("select appropriate partner");
-
 
602
            return;
629
        }
603
        }
-
 
604
        doGetAjaxRequestHandler(context + "/getPartnerServices?fofoId="
-
 
605
            + fofoId, function (response) {
-
 
606
            $('#' + "partnerServicesByID").html(response);
-
 
607
        });
630
    });
608
    });
631
    $(document).on('change', '#serviceName', function () {
609
$(document).on('click', "#remove-added-brand-button",
-
 
610
    function () {
632
        // $('#tag-listing-brand-value').text($(this).text());
611
        var serviceId = $(this).data('id');
633
        loadBrandsByServiceId("service-container", $(this).val());
612
        var brand = $(this).data('brand');
-
 
613
        console.log(serviceId);
-
 
614
        console.log(brand)
-
 
615
        if (confirm("Are you sure you want to remove brand from Service!") == true) {
634
        loadaddedBrandsbyserviceId("added-brand-to-service", $(this).val())
616
            removeBrandFromService("main-content", serviceId,
-
 
617
                brand);
-
 
618
        }
635
    });
619
    });
-
 
620
$(document).on('click', ".service-brand-button", function () {
-
 
621
    var brands = $('#tag-listing-brands').val();
-
 
622
    var serviceId = $('#serviceName').val();
-
 
623
    console.log(brands);
-
 
624
    console.log(serviceId);
-
 
625
    if (serviceId === "" || serviceId === undefined) {
-
 
626
        alert("service not selected");
-
 
627
        return;
-
 
628
    }
-
 
629
    if (!brands) {
-
 
630
        alert("select brand");
-
 
631
        return;
-
 
632
    }
-
 
633
    if (confirm("Are you sure you want to add brand!") == true) {
-
 
634
        addBrandToService("main-content", brands, serviceId);
-
 
635
    }
-
 
636
});
-
 
637
$(document).on('change', '#serviceName', function () {
-
 
638
    // $('#tag-listing-brand-value').text($(this).text());
-
 
639
    loadBrandsByServiceId("service-container", $(this).val());
-
 
640
    loadaddedBrandsbyserviceId("added-brand-to-service", $(this).val())
636
});
641
});
637
 
642
 
-
 
643
 
638
function addPartnerServiceDetails(fofoId, serviceId, applicableType, code,
644
function addPartnerServiceDetails(fofoId, serviceId, applicableType, code,
639
                                  partnerStatus, na_comment, partnerCommentStatus) {
645
                                  partnerStatus, na_comment, partnerCommentStatus) {
640
    if (confirm("Are you sure you want to add services details!") == true) {
646
    if (confirm("Are you sure you want to add services details!") == true) {
641
        var params = {
647
        var params = {
642
            "serviceId": serviceId,
648
            "serviceId": serviceId,