Subversion Repositories SmartDukaan

Rev

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

Rev 36080 Rev 36194
Line 325... Line 325...
325
        }
325
        }
326
 
326
 
327
    </style>
327
    </style>
328
 
328
 
329
    <script type="text/javascript">
329
    <script type="text/javascript">
-
 
330
        const isRBM = $isRBM;
330
        isAdmin = true;
331
        isAdmin = true;
-
 
332
        function injectSmartChatScript(token) {
-
 
333
            if (document.querySelector('script[src="https://chat.smartdukaan.com/embed.js"]')) {
-
 
334
                return;
-
 
335
            }
-
 
336
 
-
 
337
            const script = document.createElement('script');
-
 
338
            script.src = "https://chat.smartdukaan.com/embed.js";
-
 
339
            script.setAttribute("data-role", "INTERNAL");
-
 
340
            script.setAttribute("data-token", token);
-
 
341
            script.async = true;
-
 
342
 
-
 
343
            document.body.appendChild(script);
-
 
344
        }
-
 
345
 
-
 
346
        document.addEventListener("DOMContentLoaded", () => {
-
 
347
            if (isRBM) {
-
 
348
                injectSmartChatScript("eyJhbGciOiJIUzI1NiJ9.eyJyb2xlSWRzIjpbIjEiLCIyIiwiMyJdLCJpc3MiOiJwcm9maXRtYW5kaSIsImV4cCI6MTc3Nzg5OTk3MywicmV0YWlsZXJJZCI6MTc1MTM5Mjg3LCJpYXQiOjE3NzI3MTU5NzMsInVzZXJJZCI6NDAyMjJ9.aeUDKRtsemF4y1mLdWQBaWUBV2HFxoHARbc2JAZwc3U");
-
 
349
            }
-
 
350
        });
331
 
351
 
332
        function getWarehousePartners(warehouseId) {
352
        function getWarehousePartners(warehouseId) {
333
 
353
 
334
            doGetAjaxRequestHandler(context + "/getWarehousePartners?warehouseId=" + warehouseId,
354
            doGetAjaxRequestHandler(context + "/getWarehousePartners?warehouseId=" + warehouseId,
335
                    function (response) {
355
                    function (response) {