From 21c1bd9bd22ab4f3d0dc88a92863d8ea50fce0a2 Mon Sep 17 00:00:00 2001 From: amazuecos Date: Thu, 26 Sep 2024 07:50:53 +0000 Subject: [PATCH] fix : add chat presupuesto cliente --- .../themes/vuexy/components/chat_factura.php | 4 +- .../cliente/viewPresupuestoclienteForm.php | 298 +++++++++--------- httpdocs/assets/js/safekat/components/chat.js | 5 +- 3 files changed, 154 insertions(+), 153 deletions(-) diff --git a/ci4/app/Views/themes/vuexy/components/chat_factura.php b/ci4/app/Views/themes/vuexy/components/chat_factura.php index ac2cd84e..734619f3 100644 --- a/ci4/app/Views/themes/vuexy/components/chat_factura.php +++ b/ci4/app/Views/themes/vuexy/components/chat_factura.php @@ -1,12 +1,12 @@
-
+

-
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php index 9f60c8f8..8342e8a8 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php @@ -19,11 +19,11 @@
- estado_id == 1) : ?> - + estado_id == 1) : ?> +
- -
+ +
-
+
-
+
- + -
+
- +
-
+
@@ -122,7 +122,7 @@
-
+
@@ -150,14 +150,14 @@
estado_id == 1) : ?> - +
- estado_id == 1) : ?> + estado_id == 1) : ?> - - - - - id), - lang("Basic.global.Print"), - [ - "class" => "btn btn-dark float-start me-sm-3 ml-2", - "target" => "_blank" - ] - ); - } - ?> + + + id), + lang("Basic.global.Print"), + [ + "class" => "btn btn-dark float-start me-sm-3 ml-2", + "target" => "_blank" + ] + ); + } + ?>
@@ -195,148 +195,148 @@ -
+
-
- -
+
+ +
- + -
-
- estado_id == 1) : ?> - - -
-
- estado_id == 1) : ?> - - - - - - - id), - lang("Basic.global.Print"), - [ - "class" => "btn btn-dark float-start me-sm-3 ml-2", - "target" => "_blank" - ] - ); - ?> -
-
- -
+
+
+ estado_id == 1) : ?> + + +
+
+ estado_id == 1) : ?> + + + + + + + id), + lang("Basic.global.Print"), + [ + "class" => "btn btn-dark float-start me-sm-3 ml-2", + "target" => "_blank" + ] + ); + ?> +
+
+ +
-
+
- - - - -
- -
- - -endSection() ?> +
+ $presupuestoEntity->id]) ?> +
+ + + + endSection() ?> -section("additionalInlineJs") ?> + section("additionalInlineJs") ?> -window.datosPresupuesto = ; -window.token_ajax= {: v}; + window.datosPresupuesto = ; + window.token_ajax= {: v}; -estado_id == 1) : ?> - $('#clienteId').select2({ + estado_id == 1) : ?> + $('#clienteId').select2({ allowClear: false, ajax: { - url: '', - type: 'post', - dataType: 'json', + url: '', + type: 'post', + dataType: 'json', - data: function(params) { - return { - id: 'id', - text: 'nombre', - searchTerm: params.term, - : v - }; + data: function(params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; }, delay: 60, processResults: function(response) { - yeniden(response.); - return { - results: response.menu - }; + yeniden(response.); + return { + results: response.menu + }; }, cache: true - } - }); + } + }); - initDisenioLibro(); + initDisenioLibro(); - + -endSection() ?> + endSection() ?> -section('css') ?> + section('css') ?> - - - + + + + -endSection() ?> + endSection() ?> -section('additionalExternalJs') ?> - - - - - - - - - - - - - - - - estado_id == 1) : ?> - - - - - - -endSection() ?> \ No newline at end of file + section('additionalExternalJs') ?> + + + + + + + + + + + + + + + + + + estado_id == 1) : ?> + + + + + + + endSection() ?> \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/components/chat.js b/httpdocs/assets/js/safekat/components/chat.js index c9590171..78620ff5 100644 --- a/httpdocs/assets/js/safekat/components/chat.js +++ b/httpdocs/assets/js/safekat/components/chat.js @@ -309,12 +309,13 @@ class Chat { } _handleListContactsSuccess(contacts) { - if (contacts) { + if (contacts.length) { + console.log(contacts) contacts.map((c) => { this._addContactToList(c) }); } else { - this.sideBar.find("#contact-list").removeClass("d-none") + this.sideBar.find("#contact-list").addClass("d-none") } this.sideBar.find(".contact-chat").on("click", (e) => { $(".contact-chat").parent().removeClass("active")