window.componentes = window.componentes || {};
const AdminAppCategoriesList = {
template: `
mdi-view-list-outline
Lista de Categorias
Categories List
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_categories_list","owner":null,"table":"app_categories","name":"Lista de Categorias","description":"Categories List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":"Name","name":"name","type":"text","label":"Nombre","active":true},{"hint":" Category","name":"_category","type":"text","label":"Categoria","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-03 03:45:16"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":"Name","name":"name","type":"text","label":"Nombre","active":true},{"hint":" Category","name":"_category","type":"text","label":"Categoria","active":true}],
posible_fields: {"name":null,"_category":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_categories_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_categories/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppCategoriesList = AdminAppCategoriesList;
const AdminAppCategoriesView = {
template: `
mdi-view-compact-outline
Categories Detail
Categories View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"_category":null},
brick:{"id":"admin_app_categories_view","owner":null,"table":"app_categories","name":"Categories Detail","description":"Categories View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:45:16"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true}],
posible_fields: {"id":null,"name":null,"_category":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_categories/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_categories/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppCategoriesView = AdminAppCategoriesView;
const AdminAppClientsList = {
template: `
mdi-view-list-outline
Lista de Clientes
Clients List
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_clients_list","owner":null,"table":"app_clients","name":"Lista de Clientes","description":"Clients List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":"Name","name":"name","type":"text","label":"Nombre","active":true},{"hint":"Logo","name":"logo","type":"image","label":"Logo","active":true},{"hint":"Link","name":"link","type":"text","label":"Pagina Web","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-03 08:56:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":"Name","name":"name","type":"text","label":"Nombre","active":true},{"hint":"Logo","name":"logo","type":"image","label":"Logo","active":true},{"hint":"Link","name":"link","type":"text","label":"Pagina Web","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],
posible_fields: {"name":null,"logo":null,"link":null,"caption":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_clients_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_clients/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppClientsList = AdminAppClientsList;
const AdminAppClientsView = {
template: `
mdi-view-compact-outline
Detalle de Cliente
Clients View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"logo":null,"link":null},
brick:{"id":"admin_app_clients_view","owner":null,"table":"app_clients","name":"Detalle de Cliente","description":"Clients View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Nombre","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Link","name":"link","type":"text","label":"Pagina Web","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":false}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-03 03:56:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Nombre","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Link","name":"link","type":"text","label":"Pagina Web","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":false}],
posible_fields: {"id":null,"name":null,"logo":null,"link":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_clients/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_clients/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppClientsView = AdminAppClientsView;
const AdminAppContactDataList = {
template: `
mdi-view-list-outline
Contact Data
Contact Data List
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_contact_data_list","owner":null,"table":"app_contact_data","name":"Contact Data","description":"Contact Data List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Image","name":"image","type":"text","label":"Image","active":true},{"hint":"Color","name":"color","type":"text","label":"Color","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:40"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Image","name":"image","type":"text","label":"Image","active":true},{"hint":"Color","name":"color","type":"text","label":"Color","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],
posible_fields: {"id":null,"image":null,"color":null,"title":null,"caption":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_contact_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_contact_data/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppContactDataList = AdminAppContactDataList;
const AdminAppContactDataView = {
template: `
mdi-view-compact-outline
Contact Data Detail
Contact Data View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"image":null,"color":null,"title":null,"caption":null},
brick:{"id":"admin_app_contact_data_view","owner":null,"table":"app_contact_data","name":"Contact Data Detail","description":"Contact Data View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Image","name":"image","type":"text","label":"Image","active":true},{"hint":"Color","name":"color","type":"text","label":"Color","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:40"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Image","name":"image","type":"text","label":"Image","active":true},{"hint":"Color","name":"color","type":"text","label":"Color","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],
posible_fields: {"id":null,"image":null,"color":null,"title":null,"caption":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_contact_data/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_contact_data/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppContactDataView = AdminAppContactDataView;
const AdminAppContactMessagesList = {
template: `
mdi-view-list-outline
Contact Messages
Contact Messages List
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_contact_messages_list","owner":null,"table":"app_contact_messages","name":"Contact Messages","description":"Contact Messages List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Subject","name":"subject","type":"text","label":"Subject","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:40"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Subject","name":"subject","type":"text","label":"Subject","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],
posible_fields: {"id":null,"name":null,"email":null,"phone":null,"subject":null,"message":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_contact_messages_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_contact_messages/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppContactMessagesList = AdminAppContactMessagesList;
const AdminAppContactMessagesView = {
template: `
mdi-view-compact-outline
Contact Messages Detail
Contact Messages View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"email":null,"phone":null,"subject":null,"message":null},
brick:{"id":"admin_app_contact_messages_view","owner":null,"table":"app_contact_messages","name":"Contact Messages Detail","description":"Contact Messages View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Subject","name":"subject","type":"text","label":"Subject","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:40"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Subject","name":"subject","type":"text","label":"Subject","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],
posible_fields: {"id":null,"name":null,"email":null,"phone":null,"subject":null,"message":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_contact_messages/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_contact_messages/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppContactMessagesView = AdminAppContactMessagesView;
const AdminAppGalleryList = {
template: `
mdi-view-list-outline
Gallery
Gallery List
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_gallery_list","owner":null,"table":"app_gallery","name":"Gallery","description":"Gallery List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"File","name":"file","type":"text","label":"File","active":true},{"hint":"Alt","name":"alt","type":"text","label":"Alt","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:45"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"File","name":"file","type":"text","label":"File","active":true},{"hint":"Alt","name":"alt","type":"text","label":"Alt","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],
posible_fields: {"id":null,"name":null,"caption":null,"file":null,"alt":null,"is_active":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_gallery_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_gallery/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppGalleryList = AdminAppGalleryList;
const AdminAppGalleryView = {
template: `
mdi-view-compact-outline
Gallery Detail
Gallery View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"caption":null,"file":null,"alt":null,"is_active":null},
brick:{"id":"admin_app_gallery_view","owner":null,"table":"app_gallery","name":"Gallery Detail","description":"Gallery View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"File","name":"file","type":"text","label":"File","active":true},{"hint":"Alt","name":"alt","type":"text","label":"Alt","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:45"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"File","name":"file","type":"text","label":"File","active":true},{"hint":"Alt","name":"alt","type":"text","label":"Alt","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],
posible_fields: {"id":null,"name":null,"caption":null,"file":null,"alt":null,"is_active":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_gallery/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_gallery/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppGalleryView = AdminAppGalleryView;
const AdminAppPostsList = {
template: `
mdi-view-list-outline
Lista de Publicaciones
Posts List
|
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_posts_list","owner":null,"table":"app_posts","name":"Lista de Publicaciones","description":"Posts List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":" Category","name":"_category","type":"text","label":"Categoria","active":true},{"hint":"Picture","name":"picture","type":"image","label":"Imagen","active":true},{"hint":"Title","name":"title","type":"text","label":"Titulo","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Sub titulo","active":true},{"hint":"Content","name":"content","type":"text","label":"Contenido","active":true},{"hint":"Tags","name":"tags","type":"text","label":"Palabras de referencia","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-03 14:36:28"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":" Category","name":"_category","type":"text","label":"Categoria","active":true},{"hint":"Picture","name":"picture","type":"image","label":"Imagen","active":true},{"hint":"Title","name":"title","type":"text","label":"Titulo","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Sub titulo","active":true},{"hint":"Content","name":"content","type":"text","label":"Contenido","active":true},{"hint":"Tags","name":"tags","type":"text","label":"Palabras de referencia","active":true}],
posible_fields: {"_category":null,"picture":null,"title":null,"caption":null,"content":null,"tags":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_posts_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_posts/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppPostsList = AdminAppPostsList;
const AdminAppPostsView = {
template: `
mdi-view-compact-outline
Detalle de Publicacion
Posts View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"_category":null,"picture":null,"title":null,"caption":null,"content":null,"tags":null},
brick:{"id":"admin_app_posts_view","owner":null,"table":"app_posts","name":"Detalle de Publicacion","description":"Posts View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":" Category","name":"_category","type":"text","label":"Categoria","active":true},{"hint":"Picture","name":"picture","type":"text","label":"Imagen","active":true},{"hint":"Title","name":"title","type":"text","label":"Titulo","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Sub Titulo","active":true},{"hint":"Content","name":"content","type":"text","label":"Contenido","active":true},{"hint":"Tags","name":"tags","type":"text","label":"Palabras de referencia","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-03 04:36:28"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":" Category","name":"_category","type":"text","label":"Categoria","active":true},{"hint":"Picture","name":"picture","type":"text","label":"Imagen","active":true},{"hint":"Title","name":"title","type":"text","label":"Titulo","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Sub Titulo","active":true},{"hint":"Content","name":"content","type":"text","label":"Contenido","active":true},{"hint":"Tags","name":"tags","type":"text","label":"Palabras de referencia","active":true}],
posible_fields: {"_category":null,"picture":null,"title":null,"caption":null,"content":null,"tags":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_posts/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_posts/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppPostsView = AdminAppPostsView;
const AdminAppProductsList = {
template: `
mdi-view-list-outline
Products
Products List
|
|
|
|
|
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_products_list","owner":null,"table":"app_products","name":"Products","description":"Products List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":" Model","name":"_model","type":"text","label":" Model","active":true},{"hint":"Gallery","name":"gallery","type":"text","label":"Gallery","active":true},{"hint":"Data Sheet","name":"data_sheet","type":"text","label":"Data Sheet","active":true},{"hint":"Warranty Policy","name":"warranty_policy","type":"text","label":"Warranty Policy","active":true},{"hint":"Video Link","name":"video_link","type":"text","label":"Video Link","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":" Model","name":"_model","type":"text","label":" Model","active":true},{"hint":"Gallery","name":"gallery","type":"text","label":"Gallery","active":true},{"hint":"Data Sheet","name":"data_sheet","type":"text","label":"Data Sheet","active":true},{"hint":"Warranty Policy","name":"warranty_policy","type":"text","label":"Warranty Policy","active":true},{"hint":"Video Link","name":"video_link","type":"text","label":"Video Link","active":true}],
posible_fields: {"id":null,"_category":null,"name":null,"caption":null,"description":null,"_brand":null,"_model":null,"gallery":null,"data_sheet":null,"warranty_policy":null,"video_link":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_products_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_products/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppProductsList = AdminAppProductsList;
const AdminAppProductsView = {
template: `
mdi-view-compact-outline
Products Detail
Products View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"_category":null,"name":null,"caption":null,"description":null,"_brand":null,"_model":null,"gallery":null,"data_sheet":null,"warranty_policy":null,"video_link":null},
brick:{"id":"admin_app_products_view","owner":null,"table":"app_products","name":"Products Detail","description":"Products View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":" Model","name":"_model","type":"text","label":" Model","active":true},{"hint":"Gallery","name":"gallery","type":"text","label":"Gallery","active":true},{"hint":"Data Sheet","name":"data_sheet","type":"text","label":"Data Sheet","active":true},{"hint":"Warranty Policy","name":"warranty_policy","type":"text","label":"Warranty Policy","active":true},{"hint":"Video Link","name":"video_link","type":"text","label":"Video Link","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":" Model","name":"_model","type":"text","label":" Model","active":true},{"hint":"Gallery","name":"gallery","type":"text","label":"Gallery","active":true},{"hint":"Data Sheet","name":"data_sheet","type":"text","label":"Data Sheet","active":true},{"hint":"Warranty Policy","name":"warranty_policy","type":"text","label":"Warranty Policy","active":true},{"hint":"Video Link","name":"video_link","type":"text","label":"Video Link","active":true}],
posible_fields: {"id":null,"_category":null,"name":null,"caption":null,"description":null,"_brand":null,"_model":null,"gallery":null,"data_sheet":null,"warranty_policy":null,"video_link":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_products/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_products/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppProductsView = AdminAppProductsView;
const AdminAppProductBrandsList = {
template: `
mdi-view-list-outline
Product Brands
Product Brands List
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_product_brands_list","owner":null,"table":"app_product_brands","name":"Product Brands","description":"Product Brands List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Url","name":"url","type":"text","label":"Url","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Url","name":"url","type":"text","label":"Url","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],
posible_fields: {"id":null,"name":null,"logo":null,"url":null,"is_active":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_product_brands_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_brands/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppProductBrandsList = AdminAppProductBrandsList;
const AdminAppProductBrandsView = {
template: `
mdi-view-compact-outline
Product Brands Detail
Product Brands View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"logo":null,"url":null,"is_active":null},
brick:{"id":"admin_app_product_brands_view","owner":null,"table":"app_product_brands","name":"Product Brands Detail","description":"Product Brands View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Url","name":"url","type":"text","label":"Url","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Url","name":"url","type":"text","label":"Url","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],
posible_fields: {"id":null,"name":null,"logo":null,"url":null,"is_active":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_product_brands/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_brands/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppProductBrandsView = AdminAppProductBrandsView;
const AdminAppProductBudgetsList = {
template: `
mdi-view-list-outline
Product Budgets
Product Budgets List
|
|
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_product_budgets_list","owner":null,"table":"app_product_budgets","name":"Product Budgets","description":"Product Budgets List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Product","name":"_product","type":"text","label":" Product","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Legal Id","name":"legal_id","type":"text","label":"Legal Id","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"City","name":"city","type":"text","label":"City","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Product","name":"_product","type":"text","label":" Product","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Legal Id","name":"legal_id","type":"text","label":"Legal Id","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"City","name":"city","type":"text","label":"City","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],
posible_fields: {"id":null,"_product":null,"name":null,"legal_id":null,"phone":null,"email":null,"city":null,"message":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_product_budgets_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_budgets/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppProductBudgetsList = AdminAppProductBudgetsList;
const AdminAppProductBudgetsView = {
template: `
mdi-view-compact-outline
Product Budgets Detail
Product Budgets View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"_product":null,"name":null,"legal_id":null,"phone":null,"email":null,"city":null,"message":null},
brick:{"id":"admin_app_product_budgets_view","owner":null,"table":"app_product_budgets","name":"Product Budgets Detail","description":"Product Budgets View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Product","name":"_product","type":"text","label":" Product","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Legal Id","name":"legal_id","type":"text","label":"Legal Id","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"City","name":"city","type":"text","label":"City","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Product","name":"_product","type":"text","label":" Product","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Legal Id","name":"legal_id","type":"text","label":"Legal Id","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"City","name":"city","type":"text","label":"City","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],
posible_fields: {"id":null,"_product":null,"name":null,"legal_id":null,"phone":null,"email":null,"city":null,"message":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_product_budgets/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_budgets/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppProductBudgetsView = AdminAppProductBudgetsView;
const AdminAppProductModelsList = {
template: `
mdi-view-list-outline
Product Models
Product Models List
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_product_models_list","owner":null,"table":"app_product_models","name":"Product Models","description":"Product Models List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],
posible_fields: {"id":null,"_brand":null,"name":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_product_models_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_models/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppProductModelsList = AdminAppProductModelsList;
const AdminAppProductModelsView = {
template: `
mdi-view-compact-outline
Product Models Detail
Product Models View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"_brand":null,"name":null},
brick:{"id":"admin_app_product_models_view","owner":null,"table":"app_product_models","name":"Product Models Detail","description":"Product Models View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],
posible_fields: {"id":null,"_brand":null,"name":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_product_models/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_models/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppProductModelsView = AdminAppProductModelsView;
const AdminAppTagsList = {
template: `
mdi-view-list-outline
Tags
Tags List
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"admin_app_tags_list","owner":null,"table":"app_tags","name":"Tags","description":"Tags List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:45:16"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],
posible_fields: {"id":null,"name":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/admin_app_tags_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_tags/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppTagsList = AdminAppTagsList;
const AdminAppTagsView = {
template: `
mdi-view-compact-outline
Tags Detail
Tags View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null},
brick:{"id":"admin_app_tags_view","owner":null,"table":"app_tags","name":"Tags Detail","description":"Tags View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:45:16"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],
posible_fields: {"id":null,"name":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_tags/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_tags/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.AdminAppTagsView = AdminAppTagsView;
const BaseSysDataComponentList = {
template: `
mdi-view-list-outline
Components
Components Lists
|
|
|
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"base_sys_data_component_list","owner":null,"table":"sys_data_components","name":"Components","description":"Components Lists","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":"Variables","name":"variables","type":"text","label":"Variables","active":false},{"hint":"Template","name":"template","type":"text","label":"Template","active":false},{"hint":"Method","name":"method","type":"text","label":"Method","active":false},{"hint":"Created","name":"created","type":"text","label":"Created","active":false},{"hint":"Mounted","name":"mounted","type":"text","label":"Mounted","active":false},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-11-20 05:58:51"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":"Variables","name":"variables","type":"text","label":"Variables","active":false},{"hint":"Template","name":"template","type":"text","label":"Template","active":false},{"hint":"Method","name":"method","type":"text","label":"Method","active":false},{"hint":"Created","name":"created","type":"text","label":"Created","active":false},{"hint":"Mounted","name":"mounted","type":"text","label":"Mounted","active":false},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true}],
posible_fields: {"id":null,"name":null,"description":null,"created_at":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/base_sys_data_component_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/sys_data_components/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.BaseSysDataComponentList = BaseSysDataComponentList;
const BaseSysDataMethodList = {
template: `
mdi-view-list-outline
Bricks Lists
|
|
|
{{value}} |
|
mdi-arrow-down-bold-box-outline
mdi-arrow-up-bold-box-outline
{{value}}
|
|
|
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"base_sys_data_method_list","owner":null,"table":"sys_data_method","name":"Bricks Lists","description":null,"method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Owner","name":"owner","type":"text","label":"Owner","active":false},{"hint":"Table","name":"table","type":"text","label":"Table","active":false},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":"Method","name":"method","type":"text","label":"Method","active":true},{"hint":"Type","name":"type","type":"text","label":"Type","active":true},{"hint":"Fields","name":"fields","type":"text","label":"Fields","active":false},{"hint":"Template","name":"template","type":"text","label":"Template","active":false},{"hint":"Custom Template","name":"custom_template","type":"text","label":"Custom Template","active":false},{"hint":"Container","name":"container","type":"text","label":"Container","active":false},{"hint":"Delete","name":"delete","type":"text","label":"Delete","active":false},{"hint":"Filter","name":"filter","type":"text","label":"Filter","active":false},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":false}],"template":{"name":"
{{value}}<\/v-chip>","method":"\r\nmdi-arrow-down-bold-box-outline<\/v-icon>\r\nmdi-arrow-up-bold-box-outline<\/v-icon>\r\n{{value}}\r\n<\/v-chip>"},"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"","items-per-page":25},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-11-21 13:18:20"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Owner","name":"owner","type":"text","label":"Owner","active":false},{"hint":"Table","name":"table","type":"text","label":"Table","active":false},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":"Method","name":"method","type":"text","label":"Method","active":true},{"hint":"Type","name":"type","type":"text","label":"Type","active":true},{"hint":"Fields","name":"fields","type":"text","label":"Fields","active":false},{"hint":"Template","name":"template","type":"text","label":"Template","active":false},{"hint":"Custom Template","name":"custom_template","type":"text","label":"Custom Template","active":false},{"hint":"Container","name":"container","type":"text","label":"Container","active":false},{"hint":"Delete","name":"delete","type":"text","label":"Delete","active":false},{"hint":"Filter","name":"filter","type":"text","label":"Filter","active":false},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":false}],
posible_fields: {"id":null,"name":null,"description":null,"method":null,"type":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/base_sys_data_method_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/sys_data_method/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.BaseSysDataMethodList = BaseSysDataMethodList;
const BaseSysDataRenderList = {
template: `
mdi-view-list-outline
Pages
Pages Lists
|
|
|
|
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"base_sys_data_render_list","owner":null,"table":"sys_data_render","name":"Pages","description":"Pages Lists","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Owner","name":"owner","type":"text","label":"Owner","active":false},{"hint":"Type","name":"type","type":"text","label":"Type","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":"Structure","name":"structure","type":"text","label":"Structure","active":false},{"hint":"Template","name":"template","type":"text","label":"Template","active":false},{"hint":"Custom Template","name":"custom_template","type":"text","label":"Custom Template","active":false},{"hint":"Container","name":"container","type":"text","label":"Container","active":false},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-11-20 10:58:51"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Owner","name":"owner","type":"text","label":"Owner","active":false},{"hint":"Type","name":"type","type":"text","label":"Type","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":"Structure","name":"structure","type":"text","label":"Structure","active":false},{"hint":"Template","name":"template","type":"text","label":"Template","active":false},{"hint":"Custom Template","name":"custom_template","type":"text","label":"Custom Template","active":false},{"hint":"Container","name":"container","type":"text","label":"Container","active":false},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true}],
posible_fields: {"id":null,"type":null,"name":null,"description":null,"created_at":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/base_sys_data_render_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/sys_data_render/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.BaseSysDataRenderList = BaseSysDataRenderList;
const BaseSysUsersList = {
template: `
mdi-view-list-outline
Users List
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"base_sys_users_list","owner":null,"table":"sys_users","name":"Users List","description":null,"method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":"Owner","name":"owner","type":"text","label":"Owner","active":false},{"hint":"Parent","name":"parent","type":"text","label":"Parent","active":false},{"hint":"Code","name":"code","type":"text","label":"Code","active":true},{"hint":"Fullname","name":"fullname","type":"text","label":"Fullname","active":true},{"hint":"Position","name":"position","type":"text","label":"Position","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":false},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":false},{"hint":"Password","name":"password","type":"text","label":"Password","active":false},{"hint":"Role","name":"role","type":"text","label":"Role","active":true},{"hint":"Bio","name":"bio","type":"text","label":"Bio","active":false},{"hint":"Birthday","name":"birthday","type":"text","label":"Birthday","active":false},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true},{"hint":"Updated At","name":"updated_at","type":"text","label":"Updated At","active":false},{"hint":"Token","name":"token","type":"text","label":"Token","active":false}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"
","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-11-19 16:18:20"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":false},{"hint":"Owner","name":"owner","type":"text","label":"Owner","active":false},{"hint":"Parent","name":"parent","type":"text","label":"Parent","active":false},{"hint":"Code","name":"code","type":"text","label":"Code","active":true},{"hint":"Fullname","name":"fullname","type":"text","label":"Fullname","active":true},{"hint":"Position","name":"position","type":"text","label":"Position","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":false},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":false},{"hint":"Password","name":"password","type":"text","label":"Password","active":false},{"hint":"Role","name":"role","type":"text","label":"Role","active":true},{"hint":"Bio","name":"bio","type":"text","label":"Bio","active":false},{"hint":"Birthday","name":"birthday","type":"text","label":"Birthday","active":false},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true},{"hint":"Updated At","name":"updated_at","type":"text","label":"Updated At","active":false},{"hint":"Token","name":"token","type":"text","label":"Token","active":false}],
posible_fields: {"code":null,"fullname":null,"position":null,"role":null,"is_active":null,"created_at":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/base_sys_users_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/sys_users/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.BaseSysUsersList = BaseSysUsersList;
const BaseSysUsersView = {
template: `
mdi-view-compact-outline
Users View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"owner":null,"parent":null,"code":null,"fullname":null,"position":null,"email":null,"phone":null,"password":null,"role":null,"bio":null,"birthday":null,"is_active":null,"created_at":null,"updated_at":null,"token":null},
brick:{"id":"base_sys_users_view","owner":null,"table":"sys_users","name":"Users View","description":null,"method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Owner","name":"owner","type":"text","label":"Owner","active":true},{"hint":"Parent","name":"parent","type":"text","label":"Parent","active":true},{"hint":"Code","name":"code","type":"text","label":"Code","active":true},{"hint":"Fullname","name":"fullname","type":"text","label":"Fullname","active":true},{"hint":"Position","name":"position","type":"text","label":"Position","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Password","name":"password","type":"text","label":"Password","active":true},{"hint":"Role","name":"role","type":"text","label":"Role","active":true},{"hint":"Bio","name":"bio","type":"text","label":"Bio","active":true},{"hint":"Birthday","name":"birthday","type":"text","label":"Birthday","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true},{"hint":"Updated At","name":"updated_at","type":"text","label":"Updated At","active":true},{"hint":"Token","name":"token","type":"text","label":"Token","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"
","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-11-19 15:18:20"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Owner","name":"owner","type":"text","label":"Owner","active":true},{"hint":"Parent","name":"parent","type":"text","label":"Parent","active":true},{"hint":"Code","name":"code","type":"text","label":"Code","active":true},{"hint":"Fullname","name":"fullname","type":"text","label":"Fullname","active":true},{"hint":"Position","name":"position","type":"text","label":"Position","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Password","name":"password","type":"text","label":"Password","active":true},{"hint":"Role","name":"role","type":"text","label":"Role","active":true},{"hint":"Bio","name":"bio","type":"text","label":"Bio","active":true},{"hint":"Birthday","name":"birthday","type":"text","label":"Birthday","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true},{"hint":"Updated At","name":"updated_at","type":"text","label":"Updated At","active":true},{"hint":"Token","name":"token","type":"text","label":"Token","active":true}],
posible_fields: {"id":null,"owner":null,"parent":null,"code":null,"fullname":null,"position":null,"email":null,"phone":null,"password":null,"role":null,"bio":null,"birthday":null,"is_active":null,"created_at":null,"updated_at":null,"token":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/sys_users/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/sys_users/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.BaseSysUsersView = BaseSysUsersView;
const HeroSection = {
template: `
mdi-view-compact-outline
Hero Section Video
Hero Section
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"content":null,"background_file":null,"button_text":null,"button_link":null,"created_at":null},
brick:{"id":"hero_section","owner":null,"table":"hero_sections","name":"Hero Section Video","description":"Hero Section","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Content","name":"content","type":"text","label":"Content","active":true},{"hint":"Background File","name":"background_file","type":"text","label":"Background File","active":true},{"hint":"Button Text","name":"button_text","type":"text","label":"Button Text","active":true},{"hint":"Button Link","name":"button_link","type":"text","label":"Button Link","active":true},{"hint":"Created At","name":"created_at","type":"text","label":"Created At","active":true}],"template":null,"custom_template":"
\r\n
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"logo":null,"link":null,"caption":null},
brick:{"id":"web_app_clients_data_view","owner":null,"table":"app_clients","name":"Clients View","description":"Clients View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Link","name":"link","type":"text","label":"Link","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Link","name":"link","type":"text","label":"Link","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],
posible_fields: {"id":null,"name":null,"logo":null,"link":null,"caption":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_clients/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_clients/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppClientsDataView = WebAppClientsDataView;
const WebAppContactDataDataList = {
template: `
mdi-view-list-outline
Contact Data List
Contact Data List
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_contact_data_data_list","owner":null,"table":"app_contact_data","name":"Contact Data List","description":"Contact Data List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Image","name":"image","type":"text","label":"Image","active":true},{"hint":"Color","name":"color","type":"text","label":"Color","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:40"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Image","name":"image","type":"text","label":"Image","active":true},{"hint":"Color","name":"color","type":"text","label":"Color","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],
posible_fields: {"id":null,"image":null,"color":null,"title":null,"caption":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_contact_data_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_contact_data/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppContactDataDataList = WebAppContactDataDataList;
const WebAppContactDataDataView = {
template: `
mdi-view-compact-outline
Contact Data View
Contact Data View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"image":null,"color":null,"title":null,"caption":null},
brick:{"id":"web_app_contact_data_data_view","owner":null,"table":"app_contact_data","name":"Contact Data View","description":"Contact Data View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Image","name":"image","type":"text","label":"Image","active":true},{"hint":"Color","name":"color","type":"text","label":"Color","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:40"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Image","name":"image","type":"text","label":"Image","active":true},{"hint":"Color","name":"color","type":"text","label":"Color","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true}],
posible_fields: {"id":null,"image":null,"color":null,"title":null,"caption":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_contact_data/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_contact_data/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppContactDataDataView = WebAppContactDataDataView;
const WebAppContactMessagesDataList = {
template: `
mdi-view-list-outline
Contact Messages List
Contact Messages List
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_contact_messages_data_list","owner":null,"table":"app_contact_messages","name":"Contact Messages List","description":"Contact Messages List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Subject","name":"subject","type":"text","label":"Subject","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:40"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Subject","name":"subject","type":"text","label":"Subject","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],
posible_fields: {"id":null,"name":null,"email":null,"phone":null,"subject":null,"message":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_contact_messages_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_contact_messages/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppContactMessagesDataList = WebAppContactMessagesDataList;
const WebAppContactMessagesDataView = {
template: `
mdi-view-compact-outline
Contact Messages View
Contact Messages View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"email":null,"phone":null,"subject":null,"message":null},
brick:{"id":"web_app_contact_messages_data_view","owner":null,"table":"app_contact_messages","name":"Contact Messages View","description":"Contact Messages View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Subject","name":"subject","type":"text","label":"Subject","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:40"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Subject","name":"subject","type":"text","label":"Subject","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],
posible_fields: {"id":null,"name":null,"email":null,"phone":null,"subject":null,"message":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_contact_messages/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_contact_messages/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppContactMessagesDataView = WebAppContactMessagesDataView;
const WebAppGalleryDataList = {
template: `
mdi-view-list-outline
Gallery List
Gallery List
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_gallery_data_list","owner":null,"table":"app_gallery","name":"Gallery List","description":"Gallery List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"File","name":"file","type":"text","label":"File","active":true},{"hint":"Alt","name":"alt","type":"text","label":"Alt","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:45"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"File","name":"file","type":"text","label":"File","active":true},{"hint":"Alt","name":"alt","type":"text","label":"Alt","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],
posible_fields: {"id":null,"name":null,"caption":null,"file":null,"alt":null,"is_active":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_gallery_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_gallery/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppGalleryDataList = WebAppGalleryDataList;
const WebAppGalleryDataView = {
template: `
mdi-view-compact-outline
Gallery View
Gallery View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"caption":null,"file":null,"alt":null,"is_active":null},
brick:{"id":"web_app_gallery_data_view","owner":null,"table":"app_gallery","name":"Gallery View","description":"Gallery View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"File","name":"file","type":"text","label":"File","active":true},{"hint":"Alt","name":"alt","type":"text","label":"Alt","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:56:45"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"File","name":"file","type":"text","label":"File","active":true},{"hint":"Alt","name":"alt","type":"text","label":"Alt","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],
posible_fields: {"id":null,"name":null,"caption":null,"file":null,"alt":null,"is_active":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_gallery/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_gallery/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppGalleryDataView = WebAppGalleryDataView;
const WebAppPostsDataList = {
template: `
mdi-view-list-outline
Posts List
Posts List
{{tag}}
{{item.raw.title}}
{{item.raw.caption}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_posts_data_list","owner":null,"table":"app_posts","name":"Posts List","description":"Posts List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Picture","name":"picture","type":"text","label":"Picture","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Content","name":"content","type":"text","label":"Content","active":true},{"hint":"Tags","name":"tags","type":"text","label":"Tags","active":true}],"template":null,"custom_template":"
\r\n \r\n \r\n \r\n \r\n \r\n <\/v-img>\r\n <\/v-card>\r\n <\/v-col>\r\n \r\n \r\n \r\n {{tag}}<\/v-chip>\r\n <\/v-card-text>\r\n \r\n {{item.raw.title}}<\/p>\r\n <\/v-card-text>\r\n <\/v-divider>\r\n \r\n {{item.raw.caption}}<\/p>\r\n <\/v-card-text>\r\n <\/v-card>\r\n <\/v-col>\r\n <\/v-row>\r\n <\/v-card>\r\n <\/v-col>\r\n<\/v-row>","custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":"
","items-per-row":1,"items-per-page":12},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-06 02:36:28"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Picture","name":"picture","type":"text","label":"Picture","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Content","name":"content","type":"text","label":"Content","active":true},{"hint":"Tags","name":"tags","type":"text","label":"Tags","active":true}],
posible_fields: {"id":null,"_category":null,"picture":null,"title":null,"caption":null,"content":null,"tags":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_posts_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_posts/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppPostsDataList = WebAppPostsDataList;
const WebAppPostsDataView = {
template: `
mdi-view-compact-outline
Posts View
Posts View
{{data.title}}
"{{data.caption}}"
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"_category":null,"picture":null,"title":null,"caption":null,"content":null,"tags":null},
brick:{"id":"web_app_posts_data_view","owner":null,"table":"app_posts","name":"Posts View","description":"Posts View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Picture","name":"picture","type":"text","label":"Picture","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Content","name":"content","type":"text","label":"Content","active":true},{"hint":"Tags","name":"tags","type":"text","label":"Tags","active":true}],"template":null,"custom_template":"
\r\n \r\n \r\n \r\n \r\n {{data.title}}\r\n <\/p>\r\n \r\n \"<\/strong>{{data.caption}}\"<\/strong>\r\n <\/v-alert>\r\n <\/v-card-text>\r\n <\/v-img>\r\n \r\n <\/v-card-text>\r\n <\/v-card>\r\n <\/v-col>\r\n<\/v-row>","custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-05 21:36:28"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Picture","name":"picture","type":"text","label":"Picture","active":true},{"hint":"Title","name":"title","type":"text","label":"Title","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Content","name":"content","type":"text","label":"Content","active":true},{"hint":"Tags","name":"tags","type":"text","label":"Tags","active":true}],
posible_fields: {"id":null,"_category":null,"picture":null,"title":null,"caption":null,"content":null,"tags":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_posts/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_posts/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppPostsDataView = WebAppPostsDataView;
const WebAppProductsDataList = {
template: `
mdi-view-list-outline
Products List
Products List
{{item.raw.name}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_products_data_list","owner":null,"table":"app_products","name":"Products List","description":"Products List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":" Model","name":"_model","type":"text","label":" Model","active":true},{"hint":"Gallery","name":"gallery","type":"text","label":"Gallery","active":true},{"hint":"Data Sheet","name":"data_sheet","type":"text","label":"Data Sheet","active":true},{"hint":"Warranty Policy","name":"warranty_policy","type":"text","label":"Warranty Policy","active":true},{"hint":"Video Link","name":"video_link","type":"text","label":"Video Link","active":true}],"template":null,"custom_template":"
\r\n \r\n \r\n \r\n <\/v-img>\r\n <\/v-card-text>\r\n \r\n {{item.raw.name}}\r\n <\/v-card-text>\r\n <\/v-card>\r\n<\/v-hover>","custom_functions":null,"container":{"type":"grid","append":"<\/div>","gutters":true,"prepend":"","items-per-row":3,"items-per-page":30},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-06 22:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":" Model","name":"_model","type":"text","label":" Model","active":true},{"hint":"Gallery","name":"gallery","type":"text","label":"Gallery","active":true},{"hint":"Data Sheet","name":"data_sheet","type":"text","label":"Data Sheet","active":true},{"hint":"Warranty Policy","name":"warranty_policy","type":"text","label":"Warranty Policy","active":true},{"hint":"Video Link","name":"video_link","type":"text","label":"Video Link","active":true}],
posible_fields: {"id":null,"_category":null,"name":null,"caption":null,"description":null,"_brand":null,"_model":null,"gallery":null,"data_sheet":null,"warranty_policy":null,"video_link":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_products_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_products/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppProductsDataList = WebAppProductsDataList;
const WebAppProductsDataView = {
template: `
mdi-view-compact-outline
Products View
Products View
{{data.name}}
Categoria
{{data._category}}
Marca
{{data._brand}}
Modelo
{{data._model}}
Resumen del Producto
{{data.caption}}
mdi-file-document-outline Ficha técnica
Descripcion
Descubre nuestros otros modelos
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"_category":null,"name":null,"caption":null,"description":null,"_brand":null,"_model":null,"gallery":null,"data_sheet":null,"warranty_policy":null,"video_link":null},
brick:{"id":"web_app_products_data_view","owner":null,"table":"app_products","name":"Products View","description":"Products View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":" Model","name":"_model","type":"text","label":" Model","active":true},{"hint":"Gallery","name":"gallery","type":"text","label":"Gallery","active":true},{"hint":"Data Sheet","name":"data_sheet","type":"text","label":"Data Sheet","active":true},{"hint":"Warranty Policy","name":"warranty_policy","type":"text","label":"Warranty Policy","active":true},{"hint":"Video Link","name":"video_link","type":"text","label":"Video Link","active":true}],"template":null,"custom_template":"
\r\n \r\n {{data.name}}\r\n <\/v-card-text>\r\n<\/v-card>\r\n\r\n \r\n \r\n \r\n \r\n \r\n Categoria<\/dt>\r\n {{data._category}}<\/dd>\r\n <\/v-divider>\r\n \r\n Marca<\/dt>\r\n {{data._brand}}<\/dd>\r\n <\/v-divider>\r\n \r\n Modelo<\/dt>\r\n {{data._model}}<\/dd>\r\n <\/v-divider>\r\n \r\n Resumen del Producto<\/dt>\r\n {{data.caption}}<\/dd>\r\n <\/v-divider>\r\n \r\n \r\n mdi-file-document-outline<\/v-icon> Ficha t\u00e9cnica\r\n <\/v-btn>\r\n <\/v-col>\r\n \r\n \r\n \r\n \r\n <\/v-img>\r\n <\/v-carousel-item>\r\n <\/v-carousel>\r\n <\/v-card>\r\n <\/v-col>\r\n <\/v-row>\r\n <\/v-card-text>\r\n <\/v-divider>\r\n \r\n Descripcion<\/dt>\r\n <\/div>\r\n <\/v-card-text>\r\n
<\/v-divider>\r\n \r\n Descubre nuestros otros modelos<\/p>\r\n <\/SimilarProducts>\r\n <\/v-card-text>\r\n <\/v-card>\r\n <\/v-col>\r\n<\/v-row>\r\n","custom_functions":"","container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-14 05:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Category","name":"_category","type":"text","label":" Category","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Caption","name":"caption","type":"text","label":"Caption","active":true},{"hint":"Description","name":"description","type":"text","label":"Description","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":" Model","name":"_model","type":"text","label":" Model","active":true},{"hint":"Gallery","name":"gallery","type":"text","label":"Gallery","active":true},{"hint":"Data Sheet","name":"data_sheet","type":"text","label":"Data Sheet","active":true},{"hint":"Warranty Policy","name":"warranty_policy","type":"text","label":"Warranty Policy","active":true},{"hint":"Video Link","name":"video_link","type":"text","label":"Video Link","active":true}],
posible_fields: {"id":null,"_category":null,"name":null,"caption":null,"description":null,"_brand":null,"_model":null,"gallery":null,"data_sheet":null,"warranty_policy":null,"video_link":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_products/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_products/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppProductsDataView = WebAppProductsDataView;
const WebAppProductBrandsDataList = {
template: `
mdi-view-list-outline
Product Brands List
Product Brands List
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_product_brands_data_list","owner":null,"table":"app_product_brands","name":"Product Brands List","description":"Product Brands List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Url","name":"url","type":"text","label":"Url","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Url","name":"url","type":"text","label":"Url","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],
posible_fields: {"id":null,"name":null,"logo":null,"url":null,"is_active":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_product_brands_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_brands/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppProductBrandsDataList = WebAppProductBrandsDataList;
const WebAppProductBrandsDataView = {
template: `
mdi-view-compact-outline
Product Brands View
Product Brands View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null,"logo":null,"url":null,"is_active":null},
brick:{"id":"web_app_product_brands_data_view","owner":null,"table":"app_product_brands","name":"Product Brands View","description":"Product Brands View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Url","name":"url","type":"text","label":"Url","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Logo","name":"logo","type":"text","label":"Logo","active":true},{"hint":"Url","name":"url","type":"text","label":"Url","active":true},{"hint":"Is Active","name":"is_active","type":"text","label":"Is Active","active":true}],
posible_fields: {"id":null,"name":null,"logo":null,"url":null,"is_active":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_product_brands/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_brands/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppProductBrandsDataView = WebAppProductBrandsDataView;
const WebAppProductBudgetsDataList = {
template: `
mdi-view-list-outline
Product Budgets List
Product Budgets List
|
|
|
|
|
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_product_budgets_data_list","owner":null,"table":"app_product_budgets","name":"Product Budgets List","description":"Product Budgets List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Product","name":"_product","type":"text","label":" Product","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Legal Id","name":"legal_id","type":"text","label":"Legal Id","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"City","name":"city","type":"text","label":"City","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Product","name":"_product","type":"text","label":" Product","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Legal Id","name":"legal_id","type":"text","label":"Legal Id","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"City","name":"city","type":"text","label":"City","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],
posible_fields: {"id":null,"_product":null,"name":null,"legal_id":null,"phone":null,"email":null,"city":null,"message":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_product_budgets_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_budgets/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppProductBudgetsDataList = WebAppProductBudgetsDataList;
const WebAppProductBudgetsDataView = {
template: `
mdi-view-compact-outline
Product Budgets View
Product Budgets View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"_product":null,"name":null,"legal_id":null,"phone":null,"email":null,"city":null,"message":null},
brick:{"id":"web_app_product_budgets_data_view","owner":null,"table":"app_product_budgets","name":"Product Budgets View","description":"Product Budgets View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Product","name":"_product","type":"text","label":" Product","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Legal Id","name":"legal_id","type":"text","label":"Legal Id","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"City","name":"city","type":"text","label":"City","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Product","name":"_product","type":"text","label":" Product","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true},{"hint":"Legal Id","name":"legal_id","type":"text","label":"Legal Id","active":true},{"hint":"Phone","name":"phone","type":"text","label":"Phone","active":true},{"hint":"Email","name":"email","type":"text","label":"Email","active":true},{"hint":"City","name":"city","type":"text","label":"City","active":true},{"hint":"Message","name":"message","type":"text","label":"Message","active":true}],
posible_fields: {"id":null,"_product":null,"name":null,"legal_id":null,"phone":null,"email":null,"city":null,"message":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_product_budgets/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_budgets/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppProductBudgetsDataView = WebAppProductBudgetsDataView;
const WebAppProductModelsDataList = {
template: `
mdi-view-list-outline
Product Models List
Product Models List
|
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_product_models_data_list","owner":null,"table":"app_product_models","name":"Product Models List","description":"Product Models List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],
posible_fields: {"id":null,"_brand":null,"name":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_product_models_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_models/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppProductModelsDataList = WebAppProductModelsDataList;
const WebAppProductModelsDataView = {
template: `
mdi-view-compact-outline
Product Models View
Product Models View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"_brand":null,"name":null},
brick:{"id":"web_app_product_models_data_view","owner":null,"table":"app_product_models","name":"Product Models View","description":"Product Models View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 23:36:35"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":" Brand","name":"_brand","type":"text","label":" Brand","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],
posible_fields: {"id":null,"_brand":null,"name":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_product_models/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_product_models/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppProductModelsDataView = WebAppProductModelsDataView;
const WebAppTagsDataList = {
template: `
mdi-view-list-outline
Tags List
Tags List
|
|
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
{{btn.icon || 'mdi-pointer'}}
{{btn.title||'Custom Action'}}
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:[],
brick:{"id":"web_app_tags_data_list","owner":null,"table":"app_tags","name":"Tags List","description":"Tags List","method":"get","type":"all","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"table","append":"<\/div>","prepend":"
"},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:45:16"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],
posible_fields: {"id":null,"name":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let search = new URLSearchParams(window.location.search)
let put_search = search?'?'+search.toString():''
if(search){
this.local_filter = search
} else {
let filter = { ...this.binds, ...this.local_filter}
this.local_filter = filter
}
const promise = await axios.get('/api/web_app_tags_data_list/all'+put_search,{
params:{ ...this.local_filter }
});
this.pk = promise.data.props.$pk
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_tags/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppTagsDataList = WebAppTagsDataList;
const WebAppTagsDataView = {
template: `
mdi-view-compact-outline
Tags View
Tags View
Eliminar Registro
Ingrese el codigo: {{pin}}
Eliminar
Cerrar
`,
data() {
return {
data:{"id":null,"name":null},
brick:{"id":"web_app_tags_data_view","owner":null,"table":"app_tags","name":"Tags View","description":"Tags View","method":"get","type":"first","fields":[{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],"template":null,"custom_template":null,"custom_functions":null,"container":{"type":"grid","append":"<\/div>","prepend":""},"delete":1,"filter":{"progress":"DESC"},"options":null,"created_at":"2025-12-02 22:45:16"},
render: [{"hint":"Id","name":"id","type":"text","label":"Id","active":true},{"hint":"Name","name":"name","type":"text","label":"Name","active":true}],
posible_fields: {"id":null,"name":null},
local_filter:{},
search:null,
remove:null,
pin:this.$pin(6),
pin_verify:null,
helpers:{
loading:false,
page:1
}
};
},
props: {
allow: {
type: Array,
default: () => []
},
attrs: {
type: Object,
default: () => {}
},
inline:{
type: Boolean,
default: false
},
admin:{
type: Boolean,
default: true
},
binds: {
type: Object,
default: () => {}
},
received_values: {
type: Object,
default: () => {}
},
filter: {
type: Object,
default: () => {}
},
ID: {
type: String,
required:false
},
},
watch:{
binds: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
received_values: {
handler(newValue, oldValue) {
this.local_filter = { ...this.binds, ...this.received_values }
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
},
local_filter: {
handler(newValue, oldValue) {
if(this.helpers.loading==false){
this.Get()
}
},
immediate: false, // Ejecutar inmediatamente
deep: true // Usar true si es un objeto/array
}
},
computed:{
render_header(){
let header = []
if (this.render.length>0) {
this.render.forEach((field)=>{
if (field.active==='true' || field.active===true) {
header.push({... {
align:'start',
key: field.name,
sortable: true,
title: field.label,
} });
}
})
} else {
if(this.data && this.data.length>0){
header = Object.keys(this.data[0]).map(key => ({
align:'start',
key: key,
sortable: true,
title: key.charAt(0).toUpperCase() + key.slice(1),
}));
}
}
header.push({... {
align:'end',
key: 'render_table_actions',
sortable: false,
title: '...',
} })
return header
},
},
methods: {
async Get(url_filter=null){
this.helpers.loading = true
let get_id = this.ID?this.ID:this.$root.url.param
const promise = await axios.get('/api/app_tags/detail?ID='+get_id);
this.data = promise.data.data
this.helpers.loading = false
},
async Remove() {
const promise = await axios.get('/api/app_tags/'+this.remove+'/remove');
if (promise.status==200) {
this.remove = null
this.pin = this.$pin(6)
this.pin_verify = null
this.Get()
}
},
async getPalette(img,item){
item['palette'] = await this.$colorPalette.getDominantColor(img)
this.getContrastColor(item.palette,item)
},
getContrastColor(color,item){
const contrastWithWhite = this.$colorPalette.getContrastRatio(color, '#FFFFFF')
const contrastWithBlack = this.$colorPalette.getContrastRatio(color, '#000000')
item['contrast'] = contrastWithWhite > contrastWithBlack ? '#FFFFFF' : '#000000'
},
downloadFile(name,content){
const parts = content.split(',')
if(parts.length !== 2){
alert('Invalid File')
return
}
const typeBase64 = parts[0]
const contentBase64 = parts[1]
const typeMIME = typeBase64.split(';')[0].replace('data:','')
const byteCharacters = atob(contentBase64)
const byteNumbers = new Array(byteCharacters.length)
for (let i = 0; i < byteCharacters.length; i++) {
byteNumbers[i] = byteCharacters.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
const blob = new Blob([byteArray],{type:typeMIME})
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
},
},
mounted(){
this.Get()
},
created(){
},
};
window.componentes.WebAppTagsDataView = WebAppTagsDataView;