Small bug fixes + auto cycles are now debug only!
This commit is contained in:
@@ -17,12 +17,14 @@ const panelDropdowns = () => {
|
|||||||
new api.ODWorker("openticket:panel-dropdown-tickets",0,async (instance,params) => {
|
new api.ODWorker("openticket:panel-dropdown-tickets",0,async (instance,params) => {
|
||||||
const {panel,options} = params
|
const {panel,options} = params
|
||||||
|
|
||||||
const parsedOptions = options.map((option) => {
|
|
||||||
|
const parsedOptions: api.ODDropdownData["options"] = options.map((option) => {
|
||||||
|
const desc = option.get("openticket:description").value.substring(0,100)
|
||||||
return {
|
return {
|
||||||
label:option.get("openticket:button-label").value.substring(0,100),
|
label:option.get("openticket:button-label").value.substring(0,100),
|
||||||
value:"od:ticket-option_"+panel.id.value+"_"+option.id.value,
|
value:"od:ticket-option_"+panel.id.value+"_"+option.id.value,
|
||||||
emoji:option.get("openticket:button-emoji").value,
|
emoji:option.get("openticket:button-emoji").value,
|
||||||
description:option.get("openticket:description").value.substring(0,100)
|
description:(desc.length > 0) ? desc : undefined
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ export const defaultOptionsStructure = new api.ODCheckerArrayStructure("opentick
|
|||||||
//TICKET
|
//TICKET
|
||||||
{name:"ticket",priority:0,properties:[{key:"type",value:"ticket"}],checker:new api.ODCheckerObjectStructure("openticket:ticket",{children:[
|
{name:"ticket",priority:0,properties:[{key:"type",value:"ticket"}],checker:new api.ODCheckerObjectStructure("openticket:ticket",{children:[
|
||||||
{key:"id",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueId("openticket:ticket-id","openticket","option-ids",{regex:/^[A-Za-z0-9-éèçàêâôûî]+$/,minLength:3,maxLength:40})},
|
{key:"id",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueId("openticket:ticket-id","openticket","option-ids",{regex:/^[A-Za-z0-9-éèçàêâôûî]+$/,minLength:3,maxLength:40})},
|
||||||
{key:"name",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-name",{minLength:3,maxLength:50})},
|
{key:"name",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-name",{minLength:2,maxLength:50})},
|
||||||
{key:"description",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-description",{maxLength:256})},
|
{key:"description",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-description",{maxLength:256})},
|
||||||
|
|
||||||
//TICKET BUTTON
|
//TICKET BUTTON
|
||||||
@@ -361,7 +361,7 @@ export const defaultOptionsStructure = new api.ODCheckerArrayStructure("opentick
|
|||||||
//WEBSITE
|
//WEBSITE
|
||||||
{name:"website",priority:0,properties:[{key:"type",value:"website"}],checker:new api.ODCheckerObjectStructure("openticket:options-website",{children:[
|
{name:"website",priority:0,properties:[{key:"type",value:"website"}],checker:new api.ODCheckerObjectStructure("openticket:options-website",{children:[
|
||||||
{key:"id",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueId("openticket:website-id","openticket","option-ids",{regex:/^[A-Za-z0-9-éèçàêâôûî]+$/,minLength:3,maxLength:40})},
|
{key:"id",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueId("openticket:website-id","openticket","option-ids",{regex:/^[A-Za-z0-9-éèçàêâôûî]+$/,minLength:3,maxLength:40})},
|
||||||
{key:"name",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:website-name",{minLength:3,maxLength:50})},
|
{key:"name",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:website-name",{minLength:2,maxLength:50})},
|
||||||
{key:"description",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:website-description",{maxLength:256})},
|
{key:"description",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:website-description",{maxLength:256})},
|
||||||
|
|
||||||
//WEBSITE BUTTON
|
//WEBSITE BUTTON
|
||||||
@@ -386,7 +386,7 @@ export const defaultOptionsStructure = new api.ODCheckerArrayStructure("opentick
|
|||||||
//REACTION ROLES
|
//REACTION ROLES
|
||||||
{name:"role",priority:0,properties:[{key:"type",value:"role"}],checker:new api.ODCheckerObjectStructure("openticket:options-role",{children:[
|
{name:"role",priority:0,properties:[{key:"type",value:"role"}],checker:new api.ODCheckerObjectStructure("openticket:options-role",{children:[
|
||||||
{key:"id",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueId("openticket:role-id","openticket","option-ids",{regex:/^[A-Za-z0-9-éèçàêâôûî]+$/,minLength:3,maxLength:40})},
|
{key:"id",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueId("openticket:role-id","openticket","option-ids",{regex:/^[A-Za-z0-9-éèçàêâôûî]+$/,minLength:3,maxLength:40})},
|
||||||
{key:"name",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:role-name",{minLength:3,maxLength:50})},
|
{key:"name",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:role-name",{minLength:2,maxLength:50})},
|
||||||
{key:"description",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:role-description",{maxLength:256})},
|
{key:"description",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:role-description",{maxLength:256})},
|
||||||
|
|
||||||
//ROLE BUTTON
|
//ROLE BUTTON
|
||||||
|
|||||||
@@ -398,8 +398,8 @@ const loadAutoCode = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
openticket.log("Finished autoclose timeout cycle!","system",[
|
openticket.debug.debug("Finished autoclose timeout cycle!",[
|
||||||
{key:"interval",value:openticket.defaults.getDefault("autocloseCheckInterval").toString(),hidden:true},
|
{key:"interval",value:openticket.defaults.getDefault("autocloseCheckInterval").toString()},
|
||||||
{key:"closed",value:count.toString()}
|
{key:"closed",value:count.toString()}
|
||||||
])
|
])
|
||||||
},openticket.defaults.getDefault("autocloseCheckInterval"))
|
},openticket.defaults.getDefault("autocloseCheckInterval"))
|
||||||
@@ -451,8 +451,8 @@ const loadAutoCode = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
openticket.log("Finished autodelete timeout cycle!","system",[
|
openticket.debug.debug("Finished autodelete timeout cycle!",[
|
||||||
{key:"interval",value:openticket.defaults.getDefault("autodeleteCheckInterval").toString(),hidden:true},
|
{key:"interval",value:openticket.defaults.getDefault("autodeleteCheckInterval").toString()},
|
||||||
{key:"deleted",value:count.toString()}
|
{key:"deleted",value:count.toString()}
|
||||||
])
|
])
|
||||||
},openticket.defaults.getDefault("autodeleteCheckInterval"))
|
},openticket.defaults.getDefault("autodeleteCheckInterval"))
|
||||||
|
|||||||
Reference in New Issue
Block a user