3 Commits

Autor SHA1 Mensagem Data
  Sai Sudheer 607911e44f all changes are committed 2 anos atrás
  Sai Sudheer c407874e58 Merge branch 'master' of https://code.bizgaze.com/dsaisudheer3772/BizgazeUI 2 anos atrás
  Sai Sudheer def43a902a second time merge 2 anos atrás

+ 94
- 12
assets/css/list.page.css Ver arquivo

@@ -51,8 +51,9 @@ li {
51 51
   align-items: center;
52 52
   padding-left: 0px !important;
53 53
   padding-right: 0px !important;
54
-  z-index: 1000;
54
+  z-index: 1;
55 55
   margin-bottom: 0px;
56
+  position: fixed;
56 57
 }
57 58
 
58 59
 ul.tp-bar li {
@@ -76,18 +77,19 @@ li.logo-li {
76 77
 .btm-bar {
77 78
   top: var(--topNavHeight);
78 79
   left: 0;
79
-  height: calc(100vh - var(--topNavHeight));
80 80
   width: 100%;
81
-  height: 100%;
81
+  height: calc(100vh - var(--topNavHeight));
82 82
   display: flex;
83 83
   flex-direction: row;
84
+  position: fixed;
84 85
 }
85 86
 
86 87
 .lft-nav-bar {
88
+  z-index: 1;
87 89
   position: fixed;
88 90
   left: 0;
89 91
   width: var(--lftWidth);
90
-  height: inherit;
92
+  height: calc(100vh - var(--topNavHeight));
91 93
   display: flex;
92 94
   flex-direction: row;
93 95
 }
@@ -127,10 +129,11 @@ li.logo-li {
127 129
 }
128 130
 
129 131
 .rtr-nav-bar {
132
+  display: none !important;
130 133
   position: fixed;
131 134
   right: 0;
132
-  width: var(--rtrWidth);
133
-  height: inherit;
135
+  width: 0px;
136
+  height: calc(100vh - var(--topNavHeight));
134 137
   background-color: var(--prmBgColor);
135 138
   list-style: none;
136 139
   display: flex;
@@ -144,10 +147,11 @@ li.logo-li {
144 147
 
145 148
 .ctr-lst-pge {
146 149
   position: fixed;
147
-  z-index: -1;
150
+  overflow-y: hidden;
151
+  z-index: 0;
148 152
   left: var(--lftWidth);
149
-  right: var(--rtrWidth);
150
-  height: inherit;
153
+  right: 0px;
154
+  height: calc(100vh - var(--topNavHeight));
151 155
   margin: 0px 20px;
152 156
   background-color: var(--secdSubColor);
153 157
   border-top-left-radius: var(--lstPgArc);
@@ -439,10 +443,9 @@ ul.hdr-ul li {
439 443
   width: var(--frmIfrmeWidth);
440 444
   z-index: 1;
441 445
   background-color: #f3f3f3;
442
-  height: var(--frmIfrmeHeight);
443 446
   position: absolute;
444 447
   bottom: 0px;
445
-  right: calc(var(--rtrWidth) + 20px);
448
+  margin-right: 1px;
446 449
   border: 1px solid #dadada;
447 450
   border-radius: 3px;
448 451
 }
@@ -468,10 +471,89 @@ ul.hdr-ul li {
468 471
   margin: 0px 8px;
469 472
 }
470 473
 .ld-frm-src {
471
-  width: var(--frmIfrmeWidth);
474
+  width: -webkit-fill-available;
472 475
   height: calc(var(--frmIfrmeHeight) - 42px);
476
+  margin: 1px;
477
+}
478
+.wrap-iframe .ld-frm-src {
479
+  margin: 0px !important;
473 480
 }
474 481
 #crte-btn-lst {
475 482
   height: 400px;
476 483
   overflow-y: scroll;
477 484
 }
485
+.wrap-iframe {
486
+  display: flex;
487
+  flex-direction: row;
488
+  justify-content: center;
489
+  align-items: center;
490
+  position: absolute;
491
+  top: 0px;
492
+  z-index: 1;
493
+  width: 100%;
494
+  height: 100%;
495
+}
496
+[data-ispop_up="false"] .app-title-ifrm {
497
+  width: 150px;
498
+  white-space: nowrap;
499
+  overflow: hidden;
500
+  text-overflow: ellipsis;
501
+}
502
+.frm-ifre .frm-bdy {
503
+  line-height: 0 !important;
504
+  display: flex;
505
+  flex-direction: row;
506
+}
507
+.ctrl-vrtl {
508
+  display: flex;
509
+  flex-direction: column;
510
+  margin-left: -30px;
511
+  z-index: 1;
512
+  background-color: var(--prmBgColor);
513
+  height: 100%;
514
+}
515
+.ctrl-vrtl a {
516
+  margin: 5px;
517
+}
518
+.ChtAppIfrme {
519
+  margin-left: var(--rtrWidth);
520
+  height: calc(100vh - var(--topNavHeight));
521
+  overflow: hidden;
522
+}
523
+.bdy-ul .accordion-button::after {
524
+  margin-bottom: -8px;
525
+}
526
+.wrap-iframe + div .frm-ifre {
527
+  z-index: 0 !important;
528
+}
529
+.t-sec-min {
530
+  font-size: 14px;
531
+  width: 10%;
532
+  overflow: hidden;
533
+  text-overflow: ellipsis;
534
+  white-space: nowrap;
535
+  text-align: right;
536
+}
537
+.w-mes {
538
+  width: 90%;
539
+  overflow: hidden;
540
+  text-overflow: ellipsis;
541
+  white-space: nowrap;
542
+}
543
+.apps-list {
544
+  width: 360px;
545
+  max-height: 450px;
546
+  overflow-y: scroll;
547
+  overflow-x: hidden;
548
+  flex-wrap: wrap;
549
+}
550
+.appsBind {
551
+  display: flex;
552
+  flex-direction: column;
553
+  margin: 8px !important;
554
+  width: 70px;
555
+}
556
+.appsBind .appTitle {
557
+  font-size: 14px;
558
+  text-align: center;
559
+}

+ 8
- 5
assets/js/base.js Ver arquivo

@@ -1,10 +1,13 @@
1
-import {decrypt} from "./cookiehelper.js";
1
+import {decrypt, isAuthenticated} from "./cookiehelper.js";
2 2
 import {_serverUrl} from "./setting.js";
3
-
4 3
 let serverUrl = _serverUrl();
5
-let baseUserInfo = decrypt(document.cookie.split("=")[1]);
6
-let baseSessionId = baseUserInfo.sessionId;
7
-
4
+let baseSessionId, baseUserInfo;
5
+if (isAuthenticated()) {
6
+  baseUserInfo = decrypt(document.cookie.split("=")[1]);
7
+  baseSessionId = baseUserInfo.sessionId;
8
+} else {
9
+  window.location = "../login";
10
+}
8 11
 export function getData(url) {
9 12
   var datastr = null;
10 13
   var method = "GET";

+ 0
- 1
assets/js/cookiehelper.js Ver arquivo

@@ -1,7 +1,6 @@
1 1
 const cryptoProvider = window["CryptoJS"];
2 2
 const cryptoAlgorithm = window["CryptoJS"].AES;
3 3
 const _secretKey = "unibase";
4
-
5 4
 export function encrypt(content) {
6 5
   return cryptoAlgorithm.encrypt(content, _secretKey).toString();
7 6
 }

+ 6
- 3
assets/js/home.js Ver arquivo

@@ -1,4 +1,7 @@
1
-import {getCookie} from "./cookiehelper.js";
1
+import {getCookie, isAuthenticated} from "./cookiehelper.js";
2 2
 import {initListIndex} from "./list.index.js";
3
-
4
-initListIndex();
3
+if (isAuthenticated()) {
4
+  initListIndex();
5
+} else {
6
+  window.location = "../login";
7
+}

+ 205
- 49
assets/js/list.index.js Ver arquivo

@@ -1,8 +1,9 @@
1 1
 /*Data  loading  start here*/
2
-import {getCookie} from "./cookiehelper.js";
3
-
2
+import {getCookie, isAuthenticated} from "./cookiehelper.js";
4 3
 import {getData, getDataObj} from "./base.js";
5 4
 import {_serverUrl} from "./setting.js";
5
+export var connection;
6
+
6 7
 function createLoad(data) {
7 8
   let html = "";
8 9
   if (data.length != 0) {
@@ -26,80 +27,128 @@ function createLoad(data) {
26 27
     let pk_id = 0;
27 28
     const cookie = getCookie("_idty");
28 29
     let fomrhtml = "";
30
+    let width = iFrmeWdth();
29 31
     if (cookie) {
30 32
       const {unibaseId, tenantId, userId} = JSON.parse(cookie);
31
-      fomrhtml = `<div class="frm-ifre frm-ifre-${number}" id="frm-ifre-${number}">
32
-                  <ul class="m-0 p-0">
33
-                    <li class="frm-hdr">
34
-                      <div>${appName}</div>
35
-                      <div class="ctrl">
36
-                        <a href="javascript:;" class="minimize" data-unid="${number}" data-ispopup="true"><span><i class="la la-minus"></i></span></a>
37
-                        <a href="javascript:;" class="maximum" data-unid="${number}"><span><i class="la la-expand"></i></span></a>
38
-                        <a href="javascript:;" class="compress d-none" data-unid="${number}"><span><i class="las la-compress"></i></span></a>
39
-                        <a href="javascript:;" class="close" data-unid="${number}"><span><i class="la la-times"></i></span></a>
33
+
34
+      fomrhtml = `<div>
35
+                    <div class="frm-ifre frm-ifre-${number}" id="frm-ifre-${number}" style="right:${width}px">
36
+                      <div>
37
+                        <ul class="m-0 p-0">
38
+                          <li class="frm-hdr d-none">
39
+                            <div class="app-title-ifrm">${appName}</div>
40
+                            <div class="ctrl">
41
+                              <a href="javascript:;" class="minimize" data-unid="${number}" data-ispopup="true"><span><i class="la la-minus"></i></span></a>
42
+                              <a href="javascript:;" class="maximum" data-unid="${number}"><span><i class="la la-expand"></i></span></a>
43
+                              <a href="javascript:;" class="compress d-none" data-unid="${number}"><span><i class="las la-compress"></i></span></a>
44
+                              <a href="javascript:;" class="close" data-unid="${number}"><span><i class="la la-times"></i></span></a>
45
+                            </div>
46
+                          </li>
47
+                          <li class="frm-bdy">
48
+                            <div class="ctrl-vrtl">
49
+                              <a href="javascript:;" class="minimize" data-unid="${number}" data-ispopup="true"><span><i class="la la-minus"></i></span></a>
50
+                              <a href="javascript:;" class="maximum" data-unid="${number}"><span><i class="la la-expand"></i></span></a>
51
+                              <a href="javascript:;" class="compress d-none" data-unid="${number}"><span><i class="las la-compress"></i></span></a>
52
+                              <a href="javascript:;" class="close" data-unid="${number}"><span><i class="la la-times"></i></span></a>
53
+                            </div>
54
+                            <iframe class="ld-frm-src" data-ispopup="false" src="${serverUrl}#/${unibaseId}/${tenantId}/${userId}/${installedAppId}/${formId}/${pk_id}/${appConfigurationId}/loadform"></iframe>
55
+                          </li>
56
+                          <li class="frm-ftr"></li>
57
+                        </ul>
40 58
                       </div>
41
-                    </li>
42
-                    <li class="frm-bdy">
43
-                      <iframe class="ld-frm-src" data-ispopup="false" src="${serverUrl}#/${unibaseId}/${tenantId}/${userId}/${installedAppId}/${formId}/${pk_id}/${appConfigurationId}/loadform"></iframe>
44
-                    </li>
45
-                    <li class="frm-ftr"></li>
46
-                  </ul>
47
-                </div>`;
59
+                    </div>
60
+                  </div>`;
48 61
     }
49
-    $("#list-page").after(fomrhtml);
62
+    $("#list-page").parent("body").append(fomrhtml);
50 63
     window.window.postMessage("ld-frm-ifrme", "*");
51 64
     hdrCrtnClckEvnt(number);
52 65
   });
53 66
 }
67
+
54 68
 function hdrCrtnClckEvnt(number) {
55 69
   $(`.frm-ifre-${number} .minimize`).on("click", function () {
56 70
     let id = $(this).attr("data-unid");
57 71
     let isPopUpState = $(this).attr("data-ispopup");
58 72
     let height = $(`.frm-ifre-${id}`).find(".frm-hdr").height();
73
+    $(".list-page").css({filter: "unset", opacity: 1});
74
+    $(`.frm-ifre-${id} .frm-hdr`).toggleClass("d-none");
59 75
     $(`.frm-ifre-${id} .frm-bdy`).toggleClass("d-none");
60 76
     if (isPopUpState == "true") {
61 77
       // popup large
62 78
       $(this).attr("data-ispopup", "false");
79
+      $(`.frm-ifre-${id} .maximum`).addClass("d-none");
80
+      $(`.frm-ifre-${id} .minimize`).attr("data-ispopup", "false");
81
+      $(`.frm-ifre-${id}`).parent().removeClass("wrap-iframe");
82
+      $(`.frm-ifre-${id}`).attr("data-ispop_up", "false");
63 83
       $(`.frm-ifre-${id}`).css({
64
-        width: "22%",
84
+        width: "20%",
65 85
         height: height,
66 86
         bottom: "0px",
67 87
       });
68 88
     } else {
69 89
       // popup small
70 90
       $(this).attr("data-ispopup", "true");
91
+      $(`.frm-ifre-${id} .maximum`).removeClass("d-none");
92
+      $(`.frm-ifre-${id} .minimize`).attr("data-ispopup", "true");
93
+      $(`.frm-ifre-${id}`).attr("data-ispop_up", "true");
71 94
       $(`.frm-ifre-${id}`).css({
72 95
         width: "",
73 96
         height: "",
74 97
         bottom: "",
75 98
       });
76 99
     }
100
+    resetwidth();
77 101
   });
78 102
   $(`.frm-ifre-${number} .maximum`).on("click", function () {
79 103
     let id = $(this).attr("data-unid");
80 104
     $(this).addClass("d-none");
81 105
     $(this).siblings(".compress").removeClass("d-none");
82 106
     $(`.frm-ifre-${id}`).find(".ld-frm-src").attr("data-ispopup", "true");
83
-    $(`.frm-ifre-${id}`).css({width: "75%", height: "", bottom: "auto"});
107
+    $(`.frm-ifre-${id}`).parent().addClass("wrap-iframe");
108
+    $(`.frm-ifre-${id}`).css({width: "75%", position: "unset"});
84 109
     $(`.frm-ifre-${id} .ld-frm-src`).css({width: "100%"});
85 110
     $(`.frm-ifre-${id} .frm-bdy`).removeClass("d-none");
86 111
     $("#list-page").css({filter: "blur(2px)", opacity: "0.5"});
112
+    $(`.frm-ifre-${id}`).find(".minimize").toggleClass("d-none");
87 113
   });
88 114
   $(`.frm-ifre-${number} .compress`).on("click", function () {
89 115
     let id = $(this).attr("data-unid");
90 116
     $(this).addClass("d-none");
91 117
     $(this).siblings(".maximum").removeClass("d-none");
92
-    $(`.frm-ifre-${id}`).css({width: "", bottom: ""});
118
+    $(`.frm-ifre-${id}`).parent().removeClass("wrap-iframe");
119
+    $(`.frm-ifre-${id}`).css({width: "", position: ""});
93 120
     $(`.frm-ifre-${id} .ld-frm-src`).css({width: ""});
94 121
     $("#list-page").css({filter: "", opacity: ""});
122
+    $(`.frm-ifre-${id}`).find(".minimize").toggleClass("d-none");
95 123
   });
96 124
   $(`.frm-ifre-${number} .close`).on("click", function () {
97 125
     let id = $(this).attr("data-unid");
98 126
     $("#list-page").css({filter: "unset", opacity: "1"});
99
-    $(`.frm-ifre-${id}`).remove();
127
+    $(`.frm-ifre-${id}`).parent().remove();
128
+    resetwidth();
100 129
   });
101 130
 }
102 131
 function loadData() {
132
+  $(".bdy-ul").empty();
133
+  $('[class="refrsh"]')
134
+    .unbind()
135
+    .on("click", function () {
136
+      loadData();
137
+    });
138
+  $('[data-clck="ri-grid-fill"]').on("click", function () {
139
+    $(".apps-list").toggleClass("d-flex");
140
+  });
141
+  getData("apis/v4/unibase/platform/apps/myapps").then(function (response) {
142
+    let result = JSON.parse(response.result);
143
+    let html = "";
144
+    for (var i = 0; i < result.length; i++) {
145
+      html += `<li class="appsBind" data-myappid="${result[i].MyAppId}"><img src="../imgs/${result[i].ImageUrl}" ><span class="appTitle">${result[i].AppTitle}</span></li>`;
146
+    }
147
+    $("#apps-list").html(html);
148
+    $("li.appsBind").on("click", function () {
149
+      $(".apps-list").removeClass("d-flex");
150
+    });
151
+  });
103 152
   getData(
104 153
     "apis/v4/unibase/reminders/platform/getunreadreminders/ReminderType/6/PageSize/20"
105 154
   ).then(function (result) {
@@ -112,17 +161,15 @@ function loadData() {
112 161
                             <div class="accordion-header" id="accHeader-${response[i].ReminderId}">
113 162
                                 <div class="notifiListItms accordion-button collapsed" data-bs-toggle="collapse"  data-bs-target="#collapse-${response[i].ReminderId}" aria-expanded="false" aria-controls="collapseOne">
114 163
                                     <div class="row m-0 w-100 p-0 ">
115
-                                        <div class="col-1 ">
116
-                                            <input class="form-check-input mx-1" type="checkbox" value="" id="flexCheckDefault">
117
-                                        </div>
118
-                                        <div class="col-4 text-truncate">
119
-                                            <span class="mx-1">${response[i].Subject}</span>
120
-                                        </div>
121
-                                        <div class="col-5 text-truncate">
122
-                                            <span class="mx-1">${response[i].Message}</span>
164
+                                        <div class="col-3 px-0  d-flex flex-row text-truncate">
165
+                                            <input class="form-check-input mr-2" type="checkbox" value="" id="flexCheckDefault">
166
+                                            <div class="mx-3 w-75 text-truncate">
167
+                                              <span class="mx-1">${response[i].Subject}</span>
168
+                                            </div>
123 169
                                         </div>
124
-                                        <div class="col-2 text-truncate">
125
-                                            <span class="mx-1">22 minutes ago</span>
170
+                                        <div class="col-9 text-truncate d-flex justify-content-between">
171
+                                            <span class="mx-1 w-mes">${response[i].Message}</span>
172
+                                            <span class="mx-1 t-sec-min">22 mins</span>
126 173
                                         </div>
127 174
                                     </div>    
128 175
                                 </div>
@@ -136,7 +183,12 @@ function loadData() {
136 183
       }
137 184
       bdyUI += "</div>";
138 185
       $(".bdy-ul").append(bdyUI);
139
-
186
+      $('.sub-nav-item[data-buttonType="inbox"] .length').remove();
187
+      $('.sub-nav-item[data-buttonType="inbox"]').append(
188
+        `<span class="length badge rounded-pill bg-light text-dark ml-auto">${
189
+          $(".item-li").length
190
+        }</span>`
191
+      );
140 192
       $(".notifiListItms").on("click", function () {
141 193
         let _this = $(this).parents(".item-li");
142 194
         let obj = {
@@ -216,17 +268,15 @@ function loadData() {
216 268
                                 <div class="accordion-header" id="accHeader-${response[i].ReminderId}">
217 269
                                     <div class="tskListItms accordion-button collapsed" data-bs-toggle="collapse"  data-bs-target="#collapse-${response[i].ReminderId}" aria-expanded="false" aria-controls="collapseOne">
218 270
                                         <div class="row m-0 w-100 p-0 ">
219
-                                            <div class="col-1 ">
220
-                                                <input class="form-check-input mx-1" type="checkbox" value="" id="flexCheckDefault">
221
-                                            </div>
222
-                                            <div class="col-4 text-truncate">
223
-                                                <span class="mx-1">${response[i].Subject}</span>
271
+                                            <div class="col-3 px-0  d-flex flex-row text-truncate">
272
+                                                <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
273
+                                                <div class="mx-3 w-75 text-truncat">
274
+                                                  <span class="mx-1">${response[i].Subject}</span>
275
+                                                </div>
224 276
                                             </div>
225
-                                            <div class="col-5 text-truncate">
226
-                                                <span class="mx-1">${response[i].Message}</span>
227
-                                            </div>
228
-                                            <div class="col-2 text-truncate">
229
-                                                <span class="mx-1">2 seconds</span>
277
+                                            <div class="col-9 text-truncate d-flex justify-content-between">
278
+                                                <span class="mx-1 w-mes">${response[i].Message}</span>
279
+                                                <span class="mx-1 t-sec-min">22 mins</span>
230 280
                                             </div>
231 281
                                         </div>    
232 282
                                     </div>
@@ -283,6 +333,48 @@ function loadData() {
283 333
       await createLoad(appName);
284 334
     });
285 335
   });
336
+
337
+  getData("apis/v4/unibase/reminders/platform/getunreadreminderscount").then(
338
+    function (response) {
339
+      let result = JSON.parse(response.result);
340
+      let count = Number(result.NotificationCount) + Number(result.TasksCount);
341
+      $('[data-buttontype="inbox"] .length').text(count);
342
+      $('[data-notification="count"]').text(count);
343
+      if (count > 40) {
344
+        $('[data-paggtn="true"]').text(`1-40 of ${count}`);
345
+      } else {
346
+        $(".li-pgn").empty();
347
+      }
348
+    }
349
+  );
350
+}
351
+function iFrmeWdth() {
352
+  let width = 0,
353
+    erwdth = 32;
354
+  $(".frm-ifre").each(function (i, e) {
355
+    if ($(this).length == 0) {
356
+      erwdth = 0;
357
+    }
358
+    if (window.innerWidth > width) {
359
+      width = width + $(this).width() + erwdth;
360
+    }
361
+  });
362
+  return width;
363
+}
364
+function resetwidth() {
365
+  let width = 0,
366
+    erwdth = 32;
367
+  $(".frm-ifre").each(function (i, e) {
368
+    if (i == 0) {
369
+      $(this).css("right", width + "px");
370
+    }
371
+    if (i != 0) {
372
+      $(this).css("right", width + "px");
373
+    }
374
+    if (window.innerWidth > width) {
375
+      width = width + $(this).width() + erwdth;
376
+    }
377
+  });
286 378
 }
287 379
 export function detailClick() {
288 380
   $(".detailBtn").click(function () {
@@ -294,7 +386,6 @@ export function detailClick() {
294 386
     const cookie = getCookie("_idty");
295 387
     if (cookie) {
296 388
       const {unibaseId, tenantId, userId} = JSON.parse(cookie);
297
-      debugger;
298 389
       $("#detailIframe").html(
299 390
         `<iframe width="100%" style="min-height:calc(100vh - ${$(
300 391
           ".tp-bar"
@@ -303,22 +394,82 @@ export function detailClick() {
303 394
     }
304 395
   });
305 396
 }
397
+export function signaRInit() {
398
+  var huburl = _serverUrl() + "notificationhub";
399
+  connection = new window["signalR"].HubConnectionBuilder()
400
+    .withUrl(huburl)
401
+    .build();
402
+  register();
403
+}
404
+export async function register() {
405
+  connection.on("sendnotification", (obj) => {
406
+    $(".ctr-lst-pge .bdy-ul").empty();
407
+    loadData();
408
+  });
409
+  const cookie = getCookie("_idty");
410
+  const {unibaseId, tenantId, userId, sessionId, name} = JSON.parse(cookie);
411
+  let packet = {
412
+    UserId: Number(userId),
413
+    UserName: name,
414
+    UnibaseId: unibaseId,
415
+    TenantId: Number(tenantId),
416
+    SessionId: sessionId,
417
+  };
418
+  try {
419
+    const stringConnection = await connection.start();
420
+    await connection.invoke("Connect", packet);
421
+  } catch (error) {
422
+    console.log(error);
423
+  }
424
+}
425
+
426
+export function resetClckEvnt() {
427
+  $(".ChtAppIfrme").remove();
428
+  $(".lft-nav-bar .lft-nav-bar-2").removeClass("d-none");
429
+  $(".ctr-lst-pge, .rtr-nav-bar").removeClass("d-none");
430
+  $(".lft-nav-bar").css("width", "");
431
+}
306 432
 
307 433
 export function initListIndex() {
308 434
   let _userInfo = atob(document.cookie.split("=")[1]);
309 435
   let userInfo = " JSON.parse(_userInfo).result";
310 436
   let sessionId = "userInfo.sessionId";
311
-
437
+  signaRInit();
312 438
   let usrinfoHTML = `<li><a class="dropdown-item" href="javascript:void(0);">${userInfo.name}</a></li>
313 439
 <li><a class="dropdown-item" href="javascript:void(0);">Cloud Settings</a></li>
314 440
 <li><a class="dropdown-item" href="javascript:void(0);">Help</a></li>
315
-                    <li><a class="dropdown-item" href="javascript:void(0);">Logoff</a></li>`;
441
+                    <li><a class="dropdown-item" href="javascript:void(0);" data-btn="logoff">Logoff</a></li>`;
316 442
   $(".icn-circle").text(userInfo?.name?.charAt(0)?.toUpperCase());
317 443
   $(".uindtls").html(usrinfoHTML);
318
-
444
+  $('[data-btn="logoff"]').on("click", function () {
445
+    document.cookie = "_idty=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
446
+    window.location = "../login";
447
+  });
319 448
   // List Page loading
320 449
 
321 450
   /*Data  loading  start here*/
451
+  $(".nav-lft-item").on("click", function () {
452
+    $(".nav-lft-item").removeClass("active");
453
+    $(this).addClass("active");
454
+    if ($(this).attr("data-application") != "Chat Application") {
455
+      resetClckEvnt();
456
+    }
457
+  });
458
+  $(".nav-lft-item[data-application='Chat Application']").on(
459
+    "click",
460
+    function () {
461
+      const serverUrl = _serverUrl();
462
+      const cookie = getCookie("_idty");
463
+      const {unibaseId, tenantId, userId} = JSON.parse(cookie);
464
+      $(".lft-nav-bar .lft-nav-bar-2").addClass("d-none");
465
+      $(".ctr-lst-pge, .rtr-nav-bar").addClass("d-none");
466
+      $(".lft-nav-bar").css("width", "var(--rtrWidth)");
467
+      $(".btm-bar .ChtAppIfrme").remove();
468
+      $(".btm-bar").append(`<div class="ChtAppIfrme w-100">
469
+                  <iframe class="" style="height:100%; width:100%" data-ispopup="false" src="${serverUrl}#/${unibaseId}/${tenantId}/${userId}/loadChat"></iframe>
470
+                </div>`);
471
+    }
472
+  );
322 473
   $(".mnNvIcn").click(function () {
323 474
     $(".lft-nav-bar").toggleClass("lft-nav-bar-Wrap");
324 475
     $(".ctr-lst-pge").toggleClass("lft-nav-bar-Wrap");
@@ -340,5 +491,10 @@ export function initListIndex() {
340 491
       $(".sub-nav-item").not(".more.active").removeClass("active");
341 492
       $(this).addClass("active");
342 493
     });
343
-  loadData();
494
+
495
+  try {
496
+    loadData();
497
+  } catch (error) {
498
+    console.log("LoadData Method is not loading, and getting error");
499
+  }
344 500
 }

+ 5
- 2
assets/js/setting.js Ver arquivo

@@ -1,6 +1,9 @@
1 1
 export function _serverUrl() {
2 2
   // sachin 2.0 commitw
3 3
   // sudheer 1.0 new branch
4
-  // git test
5
-  return 'http://localhost:3086/';
4
+  // merge request another time
5
+  //return "http://localhost:3088/";
6
+  //return "http://localhost:3086/";
7
+  return "https://c02.bizgaze.app/";
8
+  //return "https://dev.bizgaze.app/";
6 9
 }

+ 4915
- 0
assets/js/signalr/signalr.js
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 21
- 8
authentication/index.html Ver arquivo

@@ -14,6 +14,7 @@
14 14
     <script src="../assets/js/jquery/jquery-3.6.1.min.js" defer></script>
15 15
     <script src="../assets/js/bootstrap/bootstrap.bundle.min.js" defer></script>
16 16
     <script src="../assets/js/cryptojs/cryptojs.js" defer></script>
17
+    <script src="../assets/js/signalr/signalr.js" defer></script>
17 18
     <script type="module" src="../assets/js/home.js" defer></script>
18 19
     <!-- <script src="../assets/js/cookiehelper.js"></script> -->
19 20
     <!-- <script src="../assets/js/base.js" defer></script> -->
@@ -51,6 +52,15 @@
51 52
                     <span><i class="ri-settings-5-line"></i></span>
52 53
                 </a>
53 54
             </li>
55
+            <li>
56
+                <a href="javascript:void(0);" class="" data-bs-toggle="dropdown" aria-expanded="false"
57
+                    data-clck="ri-grid-fill">
58
+                    <i class="ri-grid-fill"></i>
59
+                </a>
60
+                <ul class="dropdown-menu apps-list" id="apps-list">
61
+
62
+                </ul>
63
+            </li>
54 64
             <li>
55 65
                 <a href="javascript:void(0);" class="rounded-circle icn-circle" data-bs-toggle="dropdown"
56 66
                     aria-expanded="false">
@@ -65,27 +75,27 @@
65 75
             <div class="lft-nav-bar">
66 76
                 <ul class="lft-nav-bar-1">
67 77
                     <li>
68
-                        <a href="javascript:;" class="nav-lft-item active">
78
+                        <a href="javascript:;" class="nav-lft-item active" data-application="Mail Application">
69 79
                             <span><i class="ri-mail-line"></i></span>
70 80
                             <span>Mail</span>
71 81
                         </a>
72 82
                     </li>
73 83
                     <li>
74
-                        <a href="javascript:;" class="nav-lft-item">
84
+                        <a href="javascript:;" class="nav-lft-item" data-application="Chat Application">
75 85
                             <span><i class="ri-chat-4-line"></i></span>
76 86
                             <span>Chat</span>
77 87
 
78 88
                         </a>
79 89
                     </li>
80 90
                     <li>
81
-                        <a href="javascript:;" class="nav-lft-item">
91
+                        <a href="javascript:;" class="nav-lft-item" data-application="Drive Application">
82 92
                             <span><i class="ri-drive-line"></i></span>
83 93
                             <span>Drive</span>
84 94
 
85 95
                         </a>
86 96
                     </li>
87 97
                     <li>
88
-                        <a href="javascript:;" class="nav-lft-item">
98
+                        <a href="javascript:;" class="nav-lft-item" data-application="Meetings Application">
89 99
                             <span><i class="ri-video-chat-line"></i></span>
90 100
                             <span>Meet</span>
91 101
 
@@ -109,7 +119,7 @@
109 119
                         </div>
110 120
                     </li>
111 121
                     <li>
112
-                        <a href="javascript:;" class="sub-nav-item active">
122
+                        <a href="javascript:;" class="sub-nav-item active" data-buttonType="inbox">
113 123
                             <span><i class="ri-inbox-fill"></i></span>
114 124
                             <span>Inbox</span>
115 125
                         </a>
@@ -217,9 +227,9 @@
217 227
                     </li>
218 228
                     <li class="li-pgn">
219 229
                         <div class="pggtn">
220
-                            <span>1-50</span>
230
+                            <span data-paggtn="true">1-50</span>
221 231
                             <span class="mx-1">of</span>
222
-                            <span>384</span>
232
+                            <span data-notification="count">384</span>
223 233
                         </div>
224 234
                         <div class="pggtn">
225 235
                             <a href="javascript:;" class="lss-than nt-actve"><i class="la la-angle-left"></i></a>
@@ -253,11 +263,14 @@
253 263
         </div>
254 264
     </section>
255 265
 </body>
266
+
256 267
 <script>
257 268
     window.addEventListener('message',function(e) {
269
+        if(e.data=="closeForm") {
270
+            $('.frm-bdy [class="close"]')[0].click()
271
+        }
258 272
         $('#detailIframe').empty();
259 273
         $('.bdy-ul').removeClass('d-none');
260
-        //do stuff
261 274
     });
262 275
 </script>
263 276
 

+ 6
- 3
login/index.html Ver arquivo

@@ -53,14 +53,17 @@
53 53
                 <div class="form-body password-form-box">
54 54
                     <div class="form-input-wrap">
55 55
                         <div class="form-group">
56
-                            <input type="password" id="password" class="password-input" value="UABvAHcAbgBlAHIAcwBAADEAMgAzAA==!~`^e_n_c-^`~!">
56
+                            <input type="password" id="password" class="password-input"
57
+                                value="UABvAHcAbgBlAHIAcwBAADEAMgAzAA==!~`^e_n_c-^`~!">
57 58
                             <label class="form-control-placeholder" id="passwordLabel" for="password">Enter Your
58 59
                                 Password</label>
59 60
                         </div>
60 61
                         <div class="err-msg" id="passwordErrMsg"></div>
61 62
                         <div class="form-link show-password-link flex-between-center">
62
-                            <div class="flex-between-center"><input type="checkbox" id="showPassword" class="password-checkbox">
63
-                                <label for="showPassword">Show password</label></div>
63
+                            <div class="flex-between-center"><input type="checkbox" id="showPassword"
64
+                                    class="password-checkbox">
65
+                                <label for="showPassword">Show password</label>
66
+                            </div>
64 67
                             <label><a href="../forgotpassword">Forgot password?</a></label>
65 68
                         </div>
66 69
                     </div>

Carregando…
Cancelar
Salvar