editor and synchronization

This commit is contained in:
Julian Krauser 2024-10-29 15:23:35 +01:00
parent 28ac0a835b
commit d7596c3f2d
7 changed files with 12 additions and 7 deletions

View file

@ -97,6 +97,7 @@ export const useProtocolStore = defineStore("protocol", {
this.fetchProtocolById(this.origin.id)
.then((res) => {
this.origin = res.data;
if (this.detectedChangeProtocol) this.syncingProtocol = "detectedChanges";
})
.catch((err) => {});
},

View file

@ -49,7 +49,7 @@ export const useProtocolAgendaStore = defineStore("protocolAgenda", {
.post(`/admin/protocol/${protocolId}/agenda`)
.then((res) => {
this.agenda.push({
id: res.data,
id: Number(res.data),
topic: "",
context: "",
protocolId: Number(protocolId),
@ -74,6 +74,7 @@ export const useProtocolAgendaStore = defineStore("protocolAgenda", {
this.fetchProtocolAgendaPromise()
.then((res) => {
this.origin = res.data;
if (this.detectedChangeProtocolAgenda) this.syncingProtocolAgenda = "detectedChanges";
})
.catch((err) => {});
},

View file

@ -50,7 +50,7 @@ export const useProtocolDecisionStore = defineStore("protocolDecision", {
.post(`/admin/protocol/${protocolId}/decision`)
.then((res) => {
this.decision.push({
id: res.data,
id: Number(res.data),
topic: "",
context: "",
protocolId: Number(protocolId),
@ -75,6 +75,7 @@ export const useProtocolDecisionStore = defineStore("protocolDecision", {
this.fetchProtocolDecisionPromise()
.then((res) => {
this.origin = res.data;
if (this.detectedChangeProtocolDecision) this.syncingProtocolDecision = "detectedChanges";
})
.catch((err) => {});
},

View file

@ -58,6 +58,7 @@ export const useProtocolPresenceStore = defineStore("protocolPresence", {
this.fetchProtocolPresencePromise()
.then((result) => {
this.origin = result.data.map((d: ProtocolPresenceViewModel) => d.memberId);
if (this.detectedChangeProtocolPresence) this.syncingProtocolPresence = "detectedChanges";
})
.catch((err) => {});
},

View file

@ -50,7 +50,7 @@ export const useProtocolVotingStore = defineStore("protocolVoting", {
.post(`/admin/protocol/${protocolId}/voting`)
.then((res) => {
this.voting.push({
id: res.data,
id: Number(res.data),
topic: "",
context: "",
favour: 0,
@ -78,6 +78,7 @@ export const useProtocolVotingStore = defineStore("protocolVoting", {
this.fetchProtocolVotingPromise()
.then((res) => {
this.origin = res.data;
if (this.detectedChangeProtocolVoting) this.syncingProtocolVoting = "detectedChanges";
})
.catch((err) => {});
},