trabajando

This commit is contained in:
2024-11-29 17:06:23 +01:00
parent fe4c7c1218
commit 4cf4e3fcfd
2 changed files with 19 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import ClassSelect from '../../components/select2.js';
import tarifasClienteView from './tarifasCliente.js';
class Cliente {
@ -7,6 +8,8 @@ class Cliente {
this.csrf_token = this.getToken();
this.csrf_hash = $('#clienteForm').find('input[name="' + this.csrf_token + '"]').val();
this.tarifas = new tarifasClienteView();
this.pais = new ClassSelect($("#paisId"), '/paises/menuitems2', "Seleccione un país", {[this.csrf_token]: this.csrf_hash});
this.soporte = new ClassSelect($("#soporteId"), '/users/getMenuComerciales', "Seleccione un usuario", {[this.csrf_token]: this.csrf_hash});
this.comercial = new ClassSelect($("#comercialId"), '/users/getMenuComerciales', "Seleccione un usuario", {[this.csrf_token]: this.csrf_hash});
@ -30,6 +33,8 @@ class Cliente {
this.formaPago.init();
this.provincia.init();
this.comunidadAutonoma.init();
this.tarifas.init();
$(document).keypress(function (e) {
var key = e.which;

View File

@ -0,0 +1,14 @@
import { getToken } from "../../utils/common";
class tarifasClienteView{
constructor(domItem) {
this.csrf_token = document.querySelector('meta[name="csrf-token"]').content;
this.csrf_hash = document.querySelector('meta[name="csrf-hash"]').content;
this.token = getToken();
}
init() {
}
}