Skip to content

Commit

Permalink
Updated comments to organize sections of the code a bit easier.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeriousHorncat committed Nov 8, 2024
1 parent 3661b09 commit d0f317e
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions frontend/src/stores/analysisStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export const analysisStore = reactive({
Analyses.downloadSupportingEvidence(attachmentToDownload.attachment_id, attachmentToDownload.name);
},

/**
* User Edit Operations
*/
// -----------------------------------
// Edit Operations
// -----------------------------------

addUpdatedContent(header, field, value) {
if (!(header in this.updatedContent)) {
Expand All @@ -48,8 +48,6 @@ export const analysisStore = reactive({
};

this.forceUpdate(updated);
// this.analysis.sections.splice(0);
// this.analysis.sections.push(...updatedSections);
this.updatedContent = {};
},

Expand All @@ -68,9 +66,9 @@ export const analysisStore = reactive({
analysisStore.forceUpdate(updatedAnalysis);
},

/**
* Section Images
*/
// -----------------------------------
// Section Images
// -----------------------------------

async attachSectionImage(sectionName, field, attachment) {
const updatedSectionField = await Analyses.attachSectionImage(
Expand Down Expand Up @@ -123,9 +121,9 @@ export const analysisStore = reactive({
this.replaceAnalysisSection(sectionWithReplacedField);
},

/**
* Section Operations
*/
// -----------------------------------
// Section Attachments
// -----------------------------------

replaceFieldInSection(sectionName, updatedField) {
const sectionToUpdate = this.analysis.sections.find((section) => {
Expand Down Expand Up @@ -167,9 +165,9 @@ export const analysisStore = reactive({
this.analysis.discussions = discussions;
},

/**
* Analysis Attachments
*/
// -----------------------------------
// Analysis Attachments
// -----------------------------------

async addAttachment(attachment) {
const updatedAnalysisAttachments = await Analyses.attachSupportingEvidence(
Expand Down Expand Up @@ -205,9 +203,9 @@ export const analysisStore = reactive({
this.analysis.supporting_evidence_files.splice(attachmentIndex, 1);
},

/**
* Analysis Operations
*/
// -----------------------------------
// Analysis Operations
// -----------------------------------

forceUpdate(updatedAnalysis) {
Object.assign(this.analysis, updatedAnalysis);
Expand Down

0 comments on commit d0f317e

Please sign in to comment.