Compare commits
No commits in common. "cc7862b0d4867778eb8b004d75c9a508dc81802a" and "7770d3b6cc27344372cddd039070bb56233b85c0" have entirely different histories.
cc7862b0d4
...
7770d3b6cc
|
@ -34,7 +34,6 @@
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.menu {
|
.menu {
|
||||||
z-index: 100;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
@ -177,7 +177,7 @@ export default class ProjectTag {
|
||||||
parseOptionUpdate(json: any) {
|
parseOptionUpdate(json: any) {
|
||||||
if (!json) return;
|
if (!json) return;
|
||||||
|
|
||||||
const option = this._options.find((option) => option.id === json.option_id);
|
const option = this._options.find((option) => option.id === json.id);
|
||||||
if (!option) return;
|
if (!option) return;
|
||||||
|
|
||||||
option.parseUpdate(json);
|
option.parseUpdate(json);
|
||||||
|
|
|
@ -221,15 +221,18 @@ function applyProjectTag(data: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyProjectTagOption(data: any) {
|
function applyProjectTagOption(data: any) {
|
||||||
|
const projectTag = ProjectTag.fromId(data.project_tag_id);
|
||||||
|
if (!projectTag) {
|
||||||
|
toastWarning('Failed to parse project tag option update: project tag not found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (data.action === 'create') {
|
if (data.action === 'create') {
|
||||||
const projectTag = ProjectTag.fromId(data.data.tag_id);
|
projectTag.parseOption(data.data);
|
||||||
projectTag?.parseOption(data.data);
|
|
||||||
} else if (data.action === 'update') {
|
} else if (data.action === 'update') {
|
||||||
const projectTag = ProjectTag.fromId(data.tag_id);
|
projectTag.parseOptionUpdate(data.changes);
|
||||||
projectTag?.parseOptionUpdate(data.changes);
|
|
||||||
} else if (data.action === 'delete') {
|
} else if (data.action === 'delete') {
|
||||||
const projectTag = ProjectTag.fromId(data.tag_id);
|
projectTag.parseOptionDelete(data.id);
|
||||||
projectTag?.parseOptionDelete(data.option_id);
|
|
||||||
} else {
|
} else {
|
||||||
toastWarning('Failed to parse project tag option update: unknown action');
|
toastWarning('Failed to parse project tag option update: unknown action');
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue