Subversion Repositories SmartDukaan

Rev

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

Rev 35335 Rev 35396
Line 69... Line 69...
69
            });
69
            });
70
        }
70
        }
71
    </script>
71
    </script>
72
 
72
 
73
    <style type="text/css">
73
    <style type="text/css">
74
        .select2-container{
74
        .select2-container {
75
            display: block !important;
75
            display: block !important;
76
        }
76
        }
-
 
77
 
77
        #sidebar {
78
        #sidebar {
78
            z-index: 999;
79
            z-index: 999;
79
        }
80
        }
-
 
81
 
80
        .loading {
82
        .loading {
81
            display: none;
83
            display: none;
82
        }
84
        }
83
 
85
 
84
        .breadcrumb {
86
        .breadcrumb {
Line 1101... Line 1103...
1101
 
1103
 
1102
 
1104
 
1103
    </script>
1105
    </script>
1104
    #parse("include-scripts.vm")
1106
    #parse("include-scripts.vm")
1105
 
1107
 
1106
    <script>
1108
        <script>
1107
 
1109
 
1108
        //knob
1110
            //knob
1109
        $(function () {
1111
            $(function () {
1110
            /*$(".knob").knob({
1112
            /*$(".knob").knob({
1111
              'draw' : function () {
1113
              'draw' : function () {
1112
                $(this.i).val(this.cv + '%')
1114
                $(this.i).val(this.cv + '%')
1113
              }
1115
              }
1114
            });*/
1116
            });*/
1115
            $.fn.dataTable.moment('DD/MM/YYYY');
1117
            $.fn.dataTable.moment('DD/MM/YYYY');
1116
            $.fn.dataTable.moment('DD/MM/YYYY hh:mm');
1118
            $.fn.dataTable.moment('DD/MM/YYYY hh:mm');
1117
            $('.currency').each(function (index, ele) {
1119
            $('.currency').each(function (index, ele) {
1118
                if (!isNaN(parseInt($(ele).html()))) {
1120
            if (!isNaN(parseInt($(ele).html()))) {
1119
                    $(ele).html(numberToComma($(ele).html()));
1121
            $(ele).html(numberToComma($(ele).html()));
1120
                }
1122
        }
1121
            });
1123
        });
1122
        });
1124
        });
1123
 
1125
 
1124
        $(function () {
1126
            $(function () {
1125
            var profile = localStorage.getItem('profile');
1127
            var profile = localStorage.getItem('profile');
1126
            if (profile) {
1128
            if (profile) {
1127
                $("#photo").attr("src", JSON.parse(profile).image_url);
1129
            $("#photo").attr("src", JSON.parse(profile).image_url);
1128
                $("#fofo_name").text(JSON.parse(profile).name);
1130
            $("#fofo_name").text(JSON.parse(profile).name);
1129
            } else {
1131
        } else {
1130
                $("#photo").attr("src", "");
1132
            $("#photo").attr("src", "");
1131
                $("#fofo_name").text("Welcome, User");
1133
            $("#fofo_name").text("Welcome, User");
1132
            }
1134
        }
1133
        });
1135
        });
1134
 
1136
 
1135
 
1137
 
1136
        $(function () {
1138
            $(function () {
1137
            loaderDialogObj = bootbox.dialog({
1139
            loaderDialogObj = bootbox.dialog({
1138
                message: '<div class="container text-center"><i class="fa fa-spin fa-spinner"></i>Loading...</div>',
1140
                message: '<div class="container text-center"><i class="fa fa-spin fa-spinner"></i>Loading...</div>',
1139
                show: false
1141
                show: false
1140
            });
1142
            });
1141
        });
1143
        });
1142
 
1144
 
1143
        $(document).ready(function () {
1145
            $(document).ready(function () {
1144
 
1146
 
1145
            $(".clickshwograph").click();
1147
            $(".clickshwograph").click();
1146
 
1148
 
1147
            $(".mobile_based").click();
1149
            $(".mobile_based").click();
1148
 
1150
 
1149
            $('div.message-filter').on('click', 'button', function () {
1151
            $('div.message-filter').on('click', 'button', function () {
1150
                messageType = $(this).data("messagetype");
1152
            messageType = $(this).data("messagetype");
1151
                if ($(this).hasClass('btn-pressed')) {
1153
            if ($(this).hasClass('btn-pressed')) {
1152
                    messageType = "";
1154
            messageType = "";
1153
                    $('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
1155
            $('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
1154
                } else {
1156
        } else {
1155
                    $('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
1157
            $('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
1156
                    $(this).addClass('btn-pressed').removeClass('btn-default');
1158
            $(this).addClass('btn-pressed').removeClass('btn-default');
1157
                }
1159
        }
1158
                notifyTypeChange(messageType);
1160
            notifyTypeChange(messageType);
1159
            });
1161
        });
1160
            notifyTypeChange("");
1162
            notifyTypeChange("");
1161
        });
1163
        });
1162
 
1164
 
1163
 
1165
 
1164
        $(document).on("click", ".mobile_based",
1166
            $(document).on("click", ".mobile_based",
1165
                function () {
1167
            function () {
1166
 
1168
 
1167
                    $(".ba").css("color", "blue");
1169
            $(".ba").css("color", "blue");
1168
                    $(".ba").css("background-color", "white");
1170
            $(".ba").css("background-color", "white");
1169
                    $(".la").css("color", "white");
1171
            $(".la").css("color", "white");
1170
                    $(".la").css("background-color", "#C0C0C0");
1172
            $(".la").css("background-color", "#C0C0C0");
1171
                    $(".as").css("color", "white");
1173
            $(".as").css("color", "white");
1172
                    $(".as").css("background-color", "#C0C0C0");
1174
            $(".as").css("background-color", "#C0C0C0");
1173
 
1175
 
1174
                    $(".au").css("color", "white");
1176
            $(".au").css("color", "white");
1175
                    $(".au").css("background-color", "#C0C0C0");
1177
            $(".au").css("background-color", "#C0C0C0");
1176
 
1178
 
1177
                    doGetAjaxRequestHandler(context + "/getMobileBrandWise", function (response) {
1179
            doGetAjaxRequestHandler(context + "/getMobileBrandWise", function (response) {
1178
                        $('.reportContainer').html(response);
1180
            $('.reportContainer').html(response);
1179
                    });
1181
        });
1180
                });
1182
        });
1181
 
1183
 
1182
        $(document).on("click", ".accessories_based",
1184
            $(document).on("click", ".accessories_based",
1183
                function () {
1185
            function () {
1184
 
1186
 
1185
                    $(".ba").css("color", "white");
1187
            $(".ba").css("color", "white");
1186
                    $(".ba").css("background-color", "#C0C0C0");
1188
            $(".ba").css("background-color", "#C0C0C0");
1187
                    $(".la").css("color", "blue");
1189
            $(".la").css("color", "blue");
1188
                    $(".la").css("background-color", "white");
1190
            $(".la").css("background-color", "white");
1189
                    $(".as").css("color", "white");
1191
            $(".as").css("color", "white");
1190
                    $(".as").css("background-color", "#C0C0C0");
1192
            $(".as").css("background-color", "#C0C0C0");
1191
 
1193
 
1192
                    $(".au").css("color", "white");
1194
            $(".au").css("color", "white");
1193
                    $(".au").css("background-color", "#C0C0C0");
1195
            $(".au").css("background-color", "#C0C0C0");
1194
                    doGetAjaxRequestHandler(context + "/getAccessoriesBrandWise", function (response) {
1196
            doGetAjaxRequestHandler(context + "/getAccessoriesBrandWise", function (response) {
1195
                        $('.reportContainer').html(response);
1197
            $('.reportContainer').html(response);
1196
                    });
1198
        });
1197
                });
1199
        });
1198
 
1200
 
1199
 
1201
 
1200
        $(document).on("click", ".activation_summary",
1202
            $(document).on("click", ".activation_summary",
1201
                function () {
1203
            function () {
1202
 
1204
 
1203
                    $(".as").css("color", "blue");
1205
            $(".as").css("color", "blue");
1204
                    $(".as").css("background-color", "white");
1206
            $(".as").css("background-color", "white");
1205
                    $(".ba").css("color", "white");
1207
            $(".ba").css("color", "white");
1206
                    $(".ba").css("background-color", "#C0C0C0");
1208
            $(".ba").css("background-color", "#C0C0C0");
1207
                    $(".la").css("color", "white");
1209
            $(".la").css("color", "white");
1208
                    $(".la").css("background-color", "#C0C0C0");
1210
            $(".la").css("background-color", "#C0C0C0");
1209
 
1211
 
1210
                    $(".au").css("color", "white");
1212
            $(".au").css("color", "white");
1211
                    $(".au").css("background-color", "#C0C0C0");
1213
            $(".au").css("background-color", "#C0C0C0");
1212
                    doGetAjaxRequestHandler(context + "/getActivatedModelByBrand", function (response) {
1214
            doGetAjaxRequestHandler(context + "/getActivatedModelByBrand", function (response) {
1213
                        $('.reportContainer').html(response);
1215
            $('.reportContainer').html(response);
1214
                    });
1216
        });
1215
                });
1217
        });
1216
 
1218
 
1217
 
1219
 
1218
        $(document).on("click", ".activation_updation",
1220
            $(document).on("click", ".activation_updation",
1219
                function () {
1221
            function () {
1220
 
1222
 
1221
                    $(".as").css("color", "white");
1223
            $(".as").css("color", "white");
1222
                    $(".as").css("background-color", "#C0C0C0");
1224
            $(".as").css("background-color", "#C0C0C0");
1223
                    $(".au").css("color", "blue");
1225
            $(".au").css("color", "blue");
1224
                    $(".au").css("background-color", "white");
1226
            $(".au").css("background-color", "white");
1225
                    $(".ba").css("color", "white");
1227
            $(".ba").css("color", "white");
1226
                    $(".ba").css("background-color", "#C0C0C0");
1228
            $(".ba").css("background-color", "#C0C0C0");
1227
 
1229
 
1228
                    $(".la").css("color", "white");
1230
            $(".la").css("color", "white");
1229
                    $(".la").css("background-color", "#C0C0C0");
1231
            $(".la").css("background-color", "#C0C0C0");
1230
                    doGetAjaxRequestHandler(context + "/getActivatedImeiUpdationDate", function (response) {
1232
            doGetAjaxRequestHandler(context + "/getActivatedImeiUpdationDate", function (response) {
1231
                        $('.reportContainer').html(response);
1233
            $('.reportContainer').html(response);
1232
                    });
1234
        });
1233
                });
1235
        });
1234
 
1236
 
1235
 
1237
 
1236
        doGetAjaxRequestHandler(context + "/getSaleCountByMilestone", function (response) {
1238
            doGetAjaxRequestHandler(context + "/getSaleCountByMilestone", function (response) {
1237
            $('.saleMilestoneContainer').html(response);
1239
            $('.saleMilestoneContainer').html(response);
1238
        });
1240
        });
1239
 
1241
 
1240
        doGetAjaxRequestHandler(context + "/getPurchaseCountByMileStone", function (response) {
1242
            doGetAjaxRequestHandler(context + "/getPurchaseCountByMileStone", function (response) {
1241
            $('.purchaseMilestoneContainer').html(response);
1243
            $('.purchaseMilestoneContainer').html(response);
1242
        });
1244
        });
1243
        doGetAjaxRequestHandler(context + "/getMobileLMSFilter", function (response) {
1245
            doGetAjaxRequestHandler(context + "/getMobileLMSFilter", function (response) {
1244
            $('.chartfilterlmsContainer').html(response);
1246
            $('.chartfilterlmsContainer').html(response);
1245
        });
1247
        });
1246
 
1248
 
1247
 
1249
 
1248
        $('.loan-summary-table').on('click', '.loan', function () {
1250
            $('.loan-summary-table').on('click', '.loan', function () {
1249
            console.log($(this));
1251
            console.log($(this));
1250
            let loanSummaryType = $(this).data("type");
1252
            let loanSummaryType = $(this).data("type");
1251
            doGetAjaxRequestHandler(`${context}/getPartnerWiseLoanSummary?loanSummaryType=${loanSummaryType}`, function (response) {
1253
            doGetAjaxRequestHandler(`${context}/getPartnerWiseLoanSummary?loanSummaryType=${loanSummaryType}`, function (response) {
1252
                $('#loanSummaryModal .modal-content').html(response);
1254
            $('#loanSummaryModal .modal-content').html(response);
1253
            });
1255
        });
1254
        });
1256
        });
1255
 
1257
 
1256
        $(document).on('click', ".brand_month_sales", function () {
1258
            $(document).on('click', ".brand_month_sales", function () {
1257
            $(".bms").css("color", "blue");
1259
            $(".bms").css("color", "blue");
1258
            $(".bms").css("background-color", "white");
1260
            $(".bms").css("background-color", "white");
1259
            $(".bmp").css("color", "white");
1261
            $(".bmp").css("color", "white");
1260
            $(".bmp").css("background-color", "#C0C0C0");
1262
            $(".bmp").css("background-color", "#C0C0C0");
1261
            var warehouseId = $('#warehouseMap').val();
1263
            var warehouseId = $('#warehouseMap').val();
1262
            var filterType = $('#monthDateFilter').val();
1264
            var filterType = $('#monthDateFilter').val();
1263
 
1265
 
1264
            var fofoIds = $('#fofo-users').val();
1266
            var fofoIds = $('#fofo-users').val();
1265
            if (typeof fofoIds === 'string') {
1267
            if (typeof fofoIds === 'string') {
1266
                fofoIds = fofoIds.split(',').map(id => parseInt(id.trim()));
1268
            fofoIds = fofoIds.split(',').map(id => parseInt(id.trim()));
1267
            }
1269
        }
1268
            const data = {
1270
            const data = {
1269
                warehouseId: warehouseId,
1271
            warehouseId: warehouseId,
1270
                date: getDatesFromPicker($('input[name="dateRange"]')).startDate,
1272
            date: getDatesFromPicker($('input[name="dateRange"]')).startDate,
1271
                endDate: getDatesFromPicker($('input[name="dateRange"]')).endDate,
1273
            endDate: getDatesFromPicker($('input[name="dateRange"]')).endDate,
1272
                fofoIds: fofoIds,
1274
            fofoIds: fofoIds,
1273
                filterType: filterType
1275
            filterType: filterType
1274
            };
1276
        };
1275
 
1277
 
1276
            doPostAjaxRequestWithJsonHandler(context + "/getMobileLMSGraph", JSON.stringify(data), function (response) {
1278
            doPostAjaxRequestWithJsonHandler(context + "/getMobileLMSGraph", JSON.stringify(data), function (response) {
1277
                $('.chartLmsContainer').html(response);
1279
            $('.chartLmsContainer').html(response);
1278
            });
1280
        });
1279
        });
1281
        });
1280
 
1282
 
1281
        $('#fofo-users').multiselect({
1283
            $('#fofo-users').multiselect({
1282
            includeSelectAllOption: true,
1284
            includeSelectAllOption: true,
1283
            multiple: true,
1285
            multiple: true,
1284
            maxHeight: 200,
1286
            maxHeight: 200,
1285
            buttonWidth: '180px',
1287
            buttonWidth: '180px',
1286
            numberDisplayed: 1,
1288
            numberDisplayed: 1,
Line 1289... Line 1291...
1289
            allSelectedText: 'All Users Selected',
1291
            allSelectedText: 'All Users Selected',
1290
            enableFiltering: true,
1292
            enableFiltering: true,
1291
            enableCaseInsensitiveFiltering: true
1293
            enableCaseInsensitiveFiltering: true
1292
        });
1294
        });
1293
 
1295
 
1294
        function changelanguage(val) {
1296
            function changelanguage(val) {
1295
            console.log(val);
1297
            console.log(val);
1296
            document.documentElement.setAttribute('lang', val)
1298
            document.documentElement.setAttribute('lang', val)
1297
            var url = window.location.host;
1299
            var url = window.location.host;
1298
            alert(url);
1300
            alert(url);
1299
            //var path = window.location.path;
1301
            //var path = window.location.path;