Vue.component('SJr0rVeV',{template: `
{{title}}
remove
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"description":"","picture":"","link":"","text":"","active":""},"title":"Editar Hero","formHasErrors":false,"alert":false,"message":""}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
description:this.form.description,
picture:this.form.picture,
link:this.form.link,
text:this.form.text,
active:this.form.active,
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:{
rule:[{'key':'code','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/web_content',{
data:this.form,
where:{'code':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
},
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('heroeditone',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.web_content_code}}
{{row.item.web_content_description}}
{{row.item.web_content_link}}
{{row.item.web_content_text}}
{{row.item.web_content_active==1?'bi bi-check':'bi bi-x'}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Listado Hero","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"Code","sortable":true,"value":"web_content_code"},{"text":"description","sortable":true,"value":"web_content_description"},{"text":"Link","sortable":true,"value":"web_content_link"},{"text":"Text","sortable":true,"value":"web_content_text"},{"text":"active","sortable":true,"value":"web_content_active"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"Code","dataKey":"web_content_code","width":"44.5%"},{"title":"description","dataKey":"web_content_description","width":"44.5%"},{"title":"Link","dataKey":"web_content_link","width":"44.5%"},{"title":"Text","dataKey":"web_content_text","width":"44.5%"},{"title":"active","dataKey":"web_content_active","width":"44.5%"}]},"query":{"from":[],"rule":[{"key":"web_content.code","comparator":"Contiene","value":"hero","conector":null,"escape":true,"type":"value"}],"group":[],"select":["web_content.code","web_content.code","web_content.description","web_content.link","web_content.text","web_content.active"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/web_content',{
where:{'web_content.code':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('58FbAz5X',{template: `
{{title}}
remove
{{ message }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","featured":"","description":"","content":"","picture":""},"title":"Agregar Servicio","formHasErrors":false,"alert":false,"message":"","file":{"picture":null}}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
var final_form = this.form
axios.post('Database/render_create/services',final_form)
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Module/read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
ready_picture_file:function(e){this.file.picture = e} },
created(){
document.title = this.title
}
})
Vue.component('HPgxrtlW',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.services_title}}
{{row.item.services_featured}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Listado de Servicios","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"Title","sortable":true,"value":"services_title"},{"text":"Featured","sortable":true,"value":"services_featured"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"Title","dataKey":"services_title","width":"44.5%"},{"title":"Featured","dataKey":"services_featured","width":"44.5%"}]},"query":{"from":[],"rule":[],"group":[],"select":["services.id","services.title","services.featured"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/services',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/services',{
where:{'services.id':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('Xo6mdvM9',{template: `
{{title}}
remove
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","featured":"","description":"","content":"","picture":""},"title":"Editar Servicio","formHasErrors":false,"alert":false,"message":""}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/services',{
data:{
rule:[{'key':'id','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/services',{
data:this.form,
where:{'id':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
},
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('S2SZazQR',{template: `
{{title}}
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","description":"","content":[],"link":"","text":""},"title":"Servicios Destacados","formHasErrors":false,"alert":false,"message":"","fill":{"content":[]}}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
title:this.form.title,
description:this.form.description,
content:this.form.content,
link:this.form.link,
text:this.form.text,
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:{
rule:[{'key':'code','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/web_content',{
data:this.form,
where:{'code':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
this.Fill("services","id","content","title") },
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('serviceeditone',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.web_content_code}}
{{row.item.web_content_title}}
{{row.item.web_content_description}}
{{row.item.web_content_link}}
{{row.item.web_content_text}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Listado Services","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"Code","sortable":true,"value":"web_content_code"},{"text":"title","sortable":true,"value":"web_content_title"},{"text":"description","sortable":true,"value":"web_content_description"},{"text":"Link","sortable":true,"value":"web_content_link"},{"text":"Text","sortable":true,"value":"web_content_text"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"Code","dataKey":"web_content_code","width":"44.5%"},{"title":"title","dataKey":"web_content_title","width":"44.5%"},{"title":"description","dataKey":"web_content_description","width":"44.5%"},{"title":"Link","dataKey":"web_content_link","width":"44.5%"},{"title":"Text","dataKey":"web_content_text","width":"44.5%"}]},"query":{"from":[],"rule":[{"key":"web_content.code","comparator":"Contiene","value":"service","escape":true,"type":"value"}],"group":[],"select":["web_content.code","web_content.code","web_content.title","web_content.description","web_content.link","web_content.text"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/web_content',{
where:{'web_content.code':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('p4Ey8Scv',{template: `
{{title}}
remove
{{ message }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","description":"","client":"","specialty":"","location":"","year":"2024","gallery":[]},"title":"Agregar Proyecto","formHasErrors":false,"alert":false,"message":"","file":{"gallery":null}}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
var final_form = this.form
axios.post('Database/render_create/projects',final_form)
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Module/read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
ready_gallery_file:function(e){this.file.gallery = e.target.files} },
created(){
document.title = this.title
}
})
Vue.component('Yu0qzuQ6',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.projects_title}}
{{row.item.projects_client}}
{{row.item.projects_specialty}}
{{row.item.projects_location}}
{{row.item.projects_year}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Listado de Proyectos","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"title","sortable":true,"value":"projects_title"},{"text":"client","sortable":true,"value":"projects_client"},{"text":"specialty","sortable":true,"value":"projects_specialty"},{"text":"location","sortable":true,"value":"projects_location"},{"text":"year","sortable":true,"value":"projects_year"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"title","dataKey":"projects_title","width":"89%"},{"title":"client","dataKey":"projects_client","width":"89%"},{"title":"specialty","dataKey":"projects_specialty","width":"89%"},{"title":"location","dataKey":"projects_location","width":"59.333333333333%"},{"title":"year","dataKey":"projects_year","width":"29.666666666667%"}]},"query":{"from":[],"rule":[],"group":[],"select":["projects.id","projects.title","projects.client","projects.specialty","projects.location","projects.year"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/projects',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/projects',{
where:{'projects.id':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('q4Fy8Scw',{template: `
{{title}}
remove
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","description":"","client":"","specialty":"","location":"","year":"2024","gallery":[]},"title":"Editar Proyecto","formHasErrors":false,"alert":false,"message":""}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/projects',{
data:{
rule:[{'key':'id','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/projects',{
data:this.form,
where:{'id':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
},
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('FooterEditOne',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.web_content_code}}
{{row.item.web_content_title}}
{{row.item.web_content_description}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Bloques del Footer","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"Code","sortable":true,"value":"web_content_code"},{"text":"title","sortable":true,"value":"web_content_title"},{"text":"description","sortable":true,"value":"web_content_description"},{"text":"picture","sortable":true,"value":"web_content_picture"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"Code","dataKey":"web_content_code","width":"44.5%"},{"title":"title","dataKey":"web_content_title","width":"44.5%"},{"title":"description","dataKey":"web_content_description","width":"44.5%"},{"title":"picture","dataKey":"web_content_picture","width":"44.5%"}]},"query":{"from":[],"rule":[{"key":"web_content.code","comparator":"Contiene","value":"footer","conector":null,"escape":true,"type":"value"}],"group":[],"select":["web_content.code","web_content.code","web_content.title","web_content.description","web_content.picture"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/web_content',{
where:{'web_content.code':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('DzQKOoq3',{template: `
{{title}}
remove
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"picture":"","title":"","subtitle":"","description":"","content":""},"title":"Editar Bloque","formHasErrors":false,"alert":false,"message":""}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:{
rule:[{'key':'code','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/web_content',{
data:this.form,
where:{'code':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
},
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('DeRhgA3O',{template: `
{{title}}
remove
{{ message }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","description":"","content":"","picture":"","tags":"","public":"","created":"2025-04-04 06:18:30","author":""},"title":"Agregar Publicaci\u00f3n","formHasErrors":false,"alert":false,"message":"","file":{"picture":null}}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
var final_form = this.form
axios.post('Database/render_create/news',final_form)
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Module/read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
ready_picture_file:function(e){this.file.picture = e} },
created(){
document.title = this.title
}
})
Vue.component('3UBh0t8x',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.news_title}}
{{row.item.users_full_name}}
{{row.item.news_tags}}
{{row.item.news_public}}
{{row.item.news_created | date}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Publicaciones","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"Title","sortable":true,"value":"news_title"},{"text":"Author","sortable":true,"value":"users_full_name"},{"text":"Tags","sortable":true,"value":"news_tags"},{"text":"Public","sortable":true,"value":"news_public"},{"text":"Created","sortable":true,"value":"news_created"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"Title","dataKey":"news_title","width":"44.5%"},{"title":"Author","dataKey":"users_full_name","width":"44.5%"},{"title":"Tags","dataKey":"news_tags","width":"44.5%"},{"title":"Public","dataKey":"news_public","width":"44.5%"},{"title":"Created","dataKey":"news_created","width":"44.5%"}]},"query":{"from":["users"],"rule":[],"group":[],"select":["news.id","news.title","users.full_name","news.tags","news.public","news.created"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/news',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/news',{
where:{'news.id':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('EfShgA4P',{template: `
{{title}}
remove
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","description":"","content":"","picture":"","tags":"","public":"","created":"2025-04-04 06:18:30","author":"--session_id--"},"title":"Editar Publicaci\u00f3n","formHasErrors":false,"alert":false,"message":""}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/news',{
data:{
rule:[{'key':'id','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/news',{
data:this.form,
where:{'id':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
},
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('BSdoIBdw',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.jobs_full_name}}
{{row.item.jobs_phone}}
{{row.item.jobs_email}}
{{row.item.jobs_created | date}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Inbox \"Trabaja con Nosotros\"","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"full name","sortable":true,"value":"jobs_full_name"},{"text":"phone","sortable":true,"value":"jobs_phone"},{"text":"email","sortable":true,"value":"jobs_email"},{"text":"created","sortable":true,"value":"jobs_created"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"full name","dataKey":"jobs_full_name","width":"44.5%"},{"title":"phone","dataKey":"jobs_phone","width":"44.5%"},{"title":"email","dataKey":"jobs_email","width":"44.5%"},{"title":"created","dataKey":"jobs_created","width":"44.5%"}]},"query":{"from":[],"rule":[],"group":[],"select":["jobs.id","jobs.full_name","jobs.phone","jobs.email","jobs.created"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/jobs',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/jobs',{
where:{'jobs.id':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('QfUr9UJJ',{template: `
Vista "Trabaja con Nosotros"
full name
{{item.jobs_full_name}}
created
{{item.jobs_created}}
phone
{{item.jobs_phone}}
email
{{item.jobs_email}}
message
{{item.jobs_message}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Vista \"Trabaja con Nosotros\"","to_remove":false,"remove_item":null,"item":[],"query":{"from":[],"rule":[],"group":[],"select":["jobs.id","jobs.full_name","jobs.created","jobs.phone","jobs.email","jobs.message"]},"headers":[{"text":"full name","sortable":true,"value":"jobs_full_name"},{"text":"created","sortable":true,"value":"jobs_created"},{"text":"phone","sortable":true,"value":"jobs_phone"},{"text":"email","sortable":true,"value":"jobs_email"},{"text":"message","sortable":true,"value":"jobs_message"},{"text":"...","width":"10%"}],"export":{"headers":[{"title":"full name","dataKey":"jobs_full_name","width":"67.5%"},{"title":"created","dataKey":"jobs_created","width":"22.5%"},{"title":"phone","dataKey":"jobs_phone","width":"45%"},{"title":"email","dataKey":"jobs_email","width":"45%"},{"title":"message","dataKey":"jobs_message","width":"90%"}]}}},
props:["update","remove"],
methods:{
Data:function(){
axios.post('Database/render_view/jobs',{
data:this.query,
main:{
'jobs.id':this.$root.url.id
},
result:'row'
}).then((response)=>{
this.item = response.data
this.$emit('loading-screen','QfUr9UJJ')
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/jobs',{
where:{'jobs.id':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('XOc9p9gj',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.leads_full_name}}
{{row.item.leads_phone}}
{{row.item.leads_company}}
{{row.item.leads_created | date}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Inbox \"Contacto\"","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"full name","sortable":true,"value":"leads_full_name"},{"text":"phone","sortable":true,"value":"leads_phone"},{"text":"company","sortable":true,"value":"leads_company"},{"text":"created","sortable":true,"value":"leads_created"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"full name","dataKey":"leads_full_name","width":"44.5%"},{"title":"phone","dataKey":"leads_phone","width":"44.5%"},{"title":"company","dataKey":"leads_company","width":"44.5%"},{"title":"created","dataKey":"leads_created","width":"44.5%"}]},"query":{"from":[],"rule":[],"group":[],"select":["leads.id","leads.full_name","leads.phone","leads.company","leads.created"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/leads',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/leads',{
where:{'leads.id':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('SzspCq2Y',{template: `
Vista "Contacto"
full name
{{item.leads_full_name}}
created
{{item.leads_created}}
phone
{{item.leads_phone}}
email
{{item.leads_email}}
company
{{item.leads_company}}
message
{{item.leads_message}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Vista \"Contacto\"","to_remove":false,"remove_item":null,"item":[],"query":{"from":[],"rule":[],"group":[],"select":["leads.id","leads.full_name","leads.created","leads.phone","leads.email","leads.company","leads.message"]},"headers":[{"text":"full name","sortable":true,"value":"leads_full_name"},{"text":"created","sortable":true,"value":"leads_created"},{"text":"phone","sortable":true,"value":"leads_phone"},{"text":"email","sortable":true,"value":"leads_email"},{"text":"company","sortable":true,"value":"leads_company"},{"text":"message","sortable":true,"value":"leads_message"},{"text":"...","width":"10%"}],"export":{"headers":[{"title":"full name","dataKey":"leads_full_name","width":"67.5%"},{"title":"created","dataKey":"leads_created","width":"22.5%"},{"title":"phone","dataKey":"leads_phone","width":"30%"},{"title":"email","dataKey":"leads_email","width":"30%"},{"title":"company","dataKey":"leads_company","width":"30%"},{"title":"message","dataKey":"leads_message","width":"90%"}]}}},
props:["update","remove"],
methods:{
Data:function(){
axios.post('Database/render_view/leads',{
data:this.query,
main:{
'leads.id':this.$root.url.id
},
result:'row'
}).then((response)=>{
this.item = response.data
this.$emit('loading-screen','SzspCq2Y')
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/leads',{
where:{'leads.id':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('T2TZbzQS',{template: `
{{title}}
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","description":"","content":[],"link":"","text":""},"title":"Proyectos Destacados","formHasErrors":false,"alert":false,"message":"","fill":{"content":[]}}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
title:this.form.title,
description:this.form.description,
content:this.form.content,
link:this.form.link,
text:this.form.text,
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:{
rule:[{'key':'code','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/web_content',{
data:this.form,
where:{'code':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
this.Fill("projects","id","content","title") },
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('projecteditone',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.web_content_code}}
{{row.item.web_content_title}}
{{row.item.web_content_description}}
{{row.item.web_content_link}}
{{row.item.web_content_text}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Listado Proyectos","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"Code","sortable":true,"value":"web_content_code"},{"text":"title","sortable":true,"value":"web_content_title"},{"text":"description","sortable":true,"value":"web_content_description"},{"text":"Link","sortable":true,"value":"web_content_link"},{"text":"Text","sortable":true,"value":"web_content_text"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"Code","dataKey":"web_content_code","width":"44.5%"},{"title":"title","dataKey":"web_content_title","width":"44.5%"},{"title":"description","dataKey":"web_content_description","width":"44.5%"},{"title":"Link","dataKey":"web_content_link","width":"44.5%"},{"title":"Text","dataKey":"web_content_text","width":"44.5%"}]},"query":{"from":[],"rule":[{"key":"web_content.code","comparator":"Contiene","value":"project","escape":true,"type":"value"}],"group":[],"select":["web_content.code","web_content.code","web_content.title","web_content.description","web_content.link","web_content.text"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/web_content',{
where:{'web_content.code':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('FooterEditTwo',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.web_content_code}}
{{row.item.web_content_title}}
{{row.item.web_content_link}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Links del Footer","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"Code","sortable":true,"value":"web_content_code"},{"text":"Title","sortable":true,"value":"web_content_title"},{"text":"Link","sortable":true,"value":"web_content_link"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"Code","dataKey":"web_content_code","width":"44.5%"},{"title":"Title","dataKey":"web_content_title","width":"44.5%"},{"title":"Link","dataKey":"web_content_link","width":"44.5%"}]},"query":{"from":[],"rule":[{"key":"web_content.code","comparator":"Contiene","value":"link","conector":null,"escape":true,"type":"value"}],"group":[],"select":["web_content.code","web_content.code","web_content.title","web_content.link"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/web_content',{
where:{'web_content.code':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('EzRKOpq4',{template: `
{{title}}
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","link":""},"title":"Editar Link","formHasErrors":false,"alert":false,"message":""}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:{
rule:[{'key':'code','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/web_content',{
data:this.form,
where:{'code':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
},
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('FooterEditThree',{template: `
{{ $t('action.view') }}
bi-file-earmark-pdf
Generar PDF
{{row.item.web_content_code}}
{{row.item.web_content_title}}
{{row.item.web_content_link}}
bi bi-eye
{{$t('action.view')}}
bi-pencil-square
{{$t('action.update')}}
bi-trash
{{$t('action.delete')}}
bi-trash {{$t('action.delete')}} {{$t('section.record')}}
{{$t('alert.delete',{el:$t('section.record')})}}
bi-check {{$t('action.delete')}}
bi-x {{$t('action.close')}}
`,
data:()=>{return {"title":"Redes del Footer","search":null,"loading":true,"to_remove":false,"remove_item":null,"list":[],"headers":[{"text":"Code","sortable":true,"value":"web_content_code"},{"text":"Title","sortable":true,"value":"web_content_title"},{"text":"Icon","sortable":true,"value":"web_content_picture"},{"text":"Link","sortable":true,"value":"web_content_link"},{"text":"...","width":"11%"}],"export":{"headers":[{"title":"Code","dataKey":"web_content_code","width":"44.5%"},{"title":"Title","dataKey":"web_content_title","width":"44.5%"},{"title":"Icon","dataKey":"web_content_picture","width":"44.5%"},{"title":"Link","dataKey":"web_content_link","width":"44.5%"}]},"query":{"from":[],"rule":[{"key":"web_content.code","comparator":"Contiene","value":"social","conector":null,"escape":true,"type":"value"}],"group":[],"select":["web_content.code","web_content.code","web_content.title","web_content.picture","web_content.link"]}}},
props:["view","update","remove","md","maps"],
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.loading = false
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
console.log('PAGENULL')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
console.log(id)
}
}
},
Delete:function(act,id){
axios.post('Module/delete/web_content',{
where:{'web_content.code':this.remove_item}
}).then((response)=>{
this.to_remove = false
this.remove_item = null
this.Data()
})
},
downloadFile(file,field){
var split_base = file.split(';')
var split_data = split_base.split(':')
var contentType = split_data[1]
var base64 = split_base[1]
const fileBlob = this.base64ToBlob(base64,contentType)
this['download_'+field+'_file'] = URL.createObjectURL(fileBlob)
},
base64ToBlob(base64, contentType) {
const byteCharacters = atob(base64)
const byteArrays = []
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
const slice = byteCharacters.slice(offset, offset + 512)
const byteNumbers = new Array(slice.length)
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i)
}
const byteArray = new Uint8Array(byteNumbers)
byteArrays.push(byteArray)
}
const blob = new Blob(byteArrays, { type: contentType })
return blob
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.Data() }
})
Vue.component('FzSKPpr4',{template: `
{{title}}
remove
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","link":"","picture":""},"title":"Editar Red Social","formHasErrors":false,"alert":false,"message":""}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:{
rule:[{'key':'code','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/web_content',{
data:this.form,
where:{'code':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
},
created(){
document.title = this.title
},
mounted(){
document.title = this.title
this.Data()
}
})
Vue.component('aXt4As3S',{template: `
{{geo.props}}
{{row.web_content_code}}
title
{{row.web_content_title}}
description
{{row.web_content_description}}
bi bi-eye
Ver Detalles
bi-pencil-square
Editar
bi-trash
Eliminar
bi-trash Eliminar Registro
Este registro sera eliminado de forma permanente
bi-check Eliminar
bi-x Cerrar
`,
data:()=>{return {"title":"Maps","to_remove":false,"remove_item":null,"list":[],"geojson":[],"headers":[{"text":"code","sortable":true,"value":"web_content_code"},{"text":"title","sortable":true,"value":"web_content_title"},{"text":"description","sortable":true,"value":"web_content_description"},{"text":"content","sortable":true,"value":"web_content_content"},{"text":"...","width":"10%"}],"export":{"headers":[{"title":"code","dataKey":"web_content_code"},{"title":"title","dataKey":"web_content_title"},{"title":"description","dataKey":"web_content_description"},{"title":"content","dataKey":"web_content_content"}]},"query":{"from":[],"rule":[{"key":"web_content.code","comparator":"Contiene","value":"map","conector":null,"escape":true,"type":"value"}],"group":[],"select":["web_content.code","web_content.code","web_content.title","web_content.description","web_content.content"]}}},
props:["view","update","remove","md","maps"],
computed: {
geojsonOptions:function(props=null){
return {
onEachFeature: (feature, layer) => {
let props = Object.keys(feature.properties)
let template = ''
if(props.length>0){
props.forEach((prop)=>{
template += `${prop}: ${feature.properties[prop]}
`
})
layer.on('click', function (e) {
console.log(e.target.feature.properties)
});
layer.bindTooltip(template,{ permanent: false, sticky: true });
}
}
};
}
},
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:this.query,
props:router.history.current.query
}).then((response)=>{
this.list = response.data
this.$emit('loading-screen','aXt4As3S')
})
},
setUrl:function(act,id){
if(act=='remove'){
this.to_remove = true
this.remove_item = id
} else {
if(this.$root.page.active==null){
this.$root.GetPage(this.$root.p,act,id,'page')
} else {
this.$root.GetPage(this.$root.p,act,id,'page')
}
}
},
geojsonOption:function(main_props){
var self = this
return {
style: (feature) => {
return {
fillColor: main_props.color?main_props.color:this.$root.randomColor(feature.properties.id),
weight: 2,
opacity: 1,
color: '#3b3b3b',
dashArray: '3',
fillOpacity: 0.7
}
},
onEachFeature: (feature, layer) => {
let props = Object.keys(feature.properties)
let template = ''
if(props.length>0 && main_props.tooltip){
props.forEach((prop)=>{
template += `${prop}: ${feature.properties[prop]}
`
})
layer.on('click', function (e) {
self.$root.GetPage(self.$root.p,main_props.screen,feature.properties[main_props.id],'page')
});
layer.bindTooltip(template,{ permanent: false, sticky: true });
}
}
};
},
generate:function(type='pdf'){
var cols = this.export.headers;
var doc = new jsPDF({
orientation:'portrait',
unit:'in',
format:'letter'
});
doc.setFontSize(16).text(this.title,0.5,1.0);
doc.setLineWidth(0.01).line(0.5,1.1,8.0,1.1);
doc.autoTable({
cols,
body:this.list,
margin:{left:0.5,top:1.25}
});
doc
.setFont('times')
.setFontSize(11)
.setFontStyle('italic')
.setTextColor(0,0,255)
.text("Pie de pagina",0.5,doc.internal.pageSize.height-0.5)
.save(this.title+'.pdf')
},
},
created(){
document.title = this.title
this.json_data = null
this.maps.geojson.forEach((value,index)=>{
this.json_props = {
color: value.color,
id: value.id,
screen: value.screen,
tooltip: value.tooltip,
}
axios.get(value.path).then((response)=>{
this.geojson.push({... {data:response.data,props:this.json_props} })
})
})
if(!this.maps){
this.maps = {"center":{"lat":6.795535,"lng":-64.379883},"zoom":5,"layers":["https:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png"]}
}
this.Data() }
})
Vue.component('K3pAyZIC',{template: `
{{title}}
{{ $t(message) }}
Cerrar
bi bi-cloud-arrow-up
`,
data:()=>{return {"form":{"title":"","description":"","content":""},"title":"Map Edit","formHasErrors":false,"alert":false,"message":""}},
props:["after_send","success_message","error_message","btn_text"],
computed:{
form_valid(){
return{
}
}
},
methods:{
Data:function(){
axios.post('Database/render_read/web_content',{
data:{
rule:[{'key':'code','comparator':'=','value':this.$root.url.id,'conector':null,'escape':true}]
},
result:'row'
}).then((response)=>{
this.form = response.data
})
},
Save:function(){
this.$refs.form.validate()
this.formHasErrors = this.$refs.form.validate()
if(this.formHasErrors){
axios.post('Database/render_update/web_content',{
data:this.form,
where:{'code':this.$root.url.id}
})
.then((response)=>{
if(response.status==200){
if(this.after_send.path !== null){
route.push({query:{p:this.after_send.path,t:'page'}})
this.message=this.success_message;
this.alert=true;
} else {
this.message=this.success_message;
this.alert=true;
if(this.after_send.key !== null){
this.$root.Url(this.$root.url.c+'-'+this.after_send.key,null,'page')
}
}
} else{
this.message=this.error_message;
}
})
} else {
this.message='Por favor complete los campos solicitados';
this.alert=true;
}
},
Fill:function(table=null,field=null,input=null,value=null){
if(table!==null){
axios.post('Database/render_read/'+table,{
data:{
select:[field,value]
}
}).then((response)=>{
if(response.data.status==500){
this.alert = true;
this.message = 'Ha ocurrido un error, no se pudo consulta la tabla ['+table+']';
} else{
this.$set(this.fill,input,response.data)
}
})
} else {
this.$set(this.fill,input,field);
}
},
RenderFile(r,f) {
if (this.$refs[r].lazyValue !== null) {
const file = this.$refs[r].lazyValue
const reader = new FileReader()
reader.onload = (e) => {
this.form[f] = e.target.result
}
reader.readAsDataURL(file)
} else {
this.form[f] = null
}
},
RenderFiles(r,f) {
for(var i=0; i < this.$refs[r].lazyValue.length; i++){
console.log(this.$refs[r].lazyValue[i])
if (this.$refs[r].lazyValue[i] !== null) {
const file = this.$refs[r].lazyValue[i]
const reader = new FileReader()
reader.onload = (e) => {
this.form[f].push(e.target.result)
}
reader.readAsDataURL(file)
}
}
},
content_marker:function(e){this.form.content = [e.latlng.lat,e.latlng.lng]},ready_content_marker:function(e){this.form.content = [6.795535,-64.379883]} },
created(){
document.title = this.title
this.ready_content_marker() },
mounted(){
document.title = this.title
this.Data()
}
})