This commit is contained in:
2022-12-24 20:24:52 +00:00
parent 84d55331ea
commit e59e2c142e
3 changed files with 23 additions and 16 deletions

View File

@@ -221,6 +221,13 @@ export default {
});
break;
case socktype.Vendor:
vm.$router.push({
name: "vendor-edit",
params: { recordid: tid.id }
});
break;
default:
window.$gz.eventBus.$emit(
"notify-warning",

View File

@@ -50,7 +50,7 @@ export default {
errorMessages: { type: Array, default: null },
readonly: { type: Boolean, default: false },
disabled: { type: Boolean, default: false },
sockType: {
ayaType: {
type: Number,
default: 0
},
@@ -94,7 +94,7 @@ export default {
};
},
watch: {
sockType(val, oldVal) {
ayaType(val, oldVal) {
if (val != oldVal && oldVal != null) {
//change of type so clear out the list
this.searchResults = [];
@@ -166,7 +166,7 @@ export default {
idToOpen = this.lastSelection.id;
}
window.$gz.eventBus.$emit("openobject", {
type: this.sockType,
type: this.ayaType,
id: idToOpen
});
},
@@ -201,7 +201,7 @@ export default {
window.$gz.form.addNoSelectionItem(this.searchResults, true);
} else {
const pickListParams = {
sockType: this.sockType,
sockType: this.ayaType,
preselectedIds: [this.value]
};
if (this.variant != null) {
@@ -265,7 +265,7 @@ export default {
//default params for when called on init
if (!pickListParams) {
pickListParams = {
sockType: this.sockType
ayaType: this.ayaType
};
if (this.value != null) {
pickListParams["preselectedIds"] = [this.value];
@@ -370,7 +370,7 @@ export default {
}
//build parameter
const pickListParams = { sockType: vm.sockType };
const pickListParams = { ayaType: vm.ayaType };
if (!emptyQuery) {
let query = queryTerms[0];
if (queryTerms[1] != "[?]") {

View File

@@ -305,7 +305,7 @@ namespace Sockeye.Util
CREATE OR REPLACE PROCEDURE public.aydosearchindex(
wordlist TEXT[],
ayobjectid BIGINT,
socktype INTEGER,
stype INTEGER,
cleanfirst boolean)
LANGUAGE 'plpgsql'
@@ -317,12 +317,12 @@ BEGIN
RAISE EXCEPTION 'Bad object id --> %', ayobjectid;
END IF;
IF socktype=0 THEN
RAISE EXCEPTION 'Bad object type --> %', socktype;
IF stype=0 THEN
RAISE EXCEPTION 'Bad object type --> %', stype;
END IF;
IF cleanfirst=true THEN
delete from asearchkey where objectid=ayobjectid and sockType=socktype;
delete from asearchkey where objectid=ayobjectid and sockType=stype;
END IF;
FOREACH s IN ARRAY wordlist
@@ -330,9 +330,9 @@ BEGIN
SELECT id INTO wordid FROM asearchdictionary WHERE word = s;
IF wordid IS NULL THEN
insert into asearchdictionary (word) values(s) on conflict (word) do update set word=excluded.word returning id into wordid;
insert into asearchkey (wordid,objectid,sockType) values(wordid,ayobjectid,socktype);
insert into asearchkey (wordid,objectid,sockType) values(wordid,ayobjectid,stype);
ELSE
insert into asearchkey (wordid,objectid,sockType) values(wordid,ayobjectid,socktype);
insert into asearchkey (wordid,objectid,sockType) values(wordid,ayobjectid,stype);
END IF;
END LOOP;
END;
@@ -342,14 +342,14 @@ $BODY$;
//Original Name fetcher function, superseded by later updates
await ExecQueryAsync(@"
CREATE OR REPLACE FUNCTION PUBLIC.AYGETNAME(IN AYOBJECTID BIGINT, IN AYATYPE INTEGER,TRANSLATIONID integer) RETURNS TEXT AS $BODY$
CREATE OR REPLACE FUNCTION PUBLIC.AYGETNAME(IN AYOBJECTID BIGINT, IN stype INTEGER,TRANSLATIONID integer) RETURNS TEXT AS $BODY$
DECLARE
aytable TEXT DEFAULT '';
aynamecolumn TEXT DEFAULT 'name';
aytkey TEXT DEFAULT 'no';
returnstr TEXT DEFAULT '';
BEGIN
case socktype
case stype
when 0 then aytkey= 'NoType';
when 1 then aytkey= 'Global';
when 2 then return 'FormUserOptions';
@@ -666,14 +666,14 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
//UPDATED NAME FETCHER FOR INTEGRATION
await ExecQueryAsync(@"
CREATE OR REPLACE FUNCTION PUBLIC.AYGETNAME(IN AYOBJECTID BIGINT, IN AYATYPE INTEGER,TRANSLATIONID integer) RETURNS TEXT AS $BODY$
CREATE OR REPLACE FUNCTION PUBLIC.AYGETNAME(IN AYOBJECTID BIGINT, IN stype INTEGER,TRANSLATIONID integer) RETURNS TEXT AS $BODY$
DECLARE
aytable TEXT DEFAULT '';
aynamecolumn TEXT DEFAULT 'name';
aytkey TEXT DEFAULT 'no';
returnstr TEXT DEFAULT '';
BEGIN
case socktype
case stype
when 0 then aytkey= 'NoType';
when 1 then aytkey= 'Global';
when 2 then return 'FormUserOptions';