Skip to content

Commit

Permalink
updated quick add and expanded tag entry - name check
Browse files Browse the repository at this point in the history
  • Loading branch information
di0-nne committed Apr 25, 2024
1 parent 67882a8 commit ee24e6b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
19 changes: 8 additions & 11 deletions src/components/ExpandedTagEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,23 +209,19 @@ export default {
console.log("saving");
let docTitle = document.getElementById("inputTagName").value;
let docStart = document
.getElementById("inputStartDate")
.value.replace("T", " ");
let docEnd = document
.getElementById("inputEndDate")
.value.replace("T", " ");
let docCalendar_name = document.getElementById(
"selectInputCalendarName"
).value;
//add calendar id later on
let docStart = document.getElementById("inputStartDate").value.replace("T", " ");
let docEnd = document.getElementById("inputEndDate").value.replace("T", " ");
let docCalendar_name = document.getElementById("selectInputCalendarName").value;
let docColor = document.getElementById("customColor").value;
let docCompleted = false;
try {
if (docTitle === ""){
throw new Error(`Please Enter a Tag Name`)
}
//create a new tag
const tagDocRef = await addDoc(collection(db, "Tags"), {
//id: docId,
title: docTitle,
start: docStart,
end: docEnd,
Expand Down Expand Up @@ -304,6 +300,7 @@ export default {
this.$emit("tag-submitted");
} catch (error) {
console.error("Error adding document: ", error);
alert(error);
}
//after save reroute to misc tags
Expand Down
2 changes: 0 additions & 2 deletions src/components/MiscellaneousTags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,10 @@ export default {
};
})
);
//filter for those that have no calendar
this.tableRows = this.tableRows.filter((row) => !row.calendar_name);
},
addQuickTag(event) {
// do we need a cancllation button - or will it auto cancel itself
console.log("Add Quick Tag");
this.addingtag = true;
},
Expand Down
4 changes: 1 addition & 3 deletions src/components/ProgressBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default {
(row) => row.color
),
borderSkipped: false,
// borderRadius: 10,
borderRadius: 10,
barPercentage: 0.2,
categoryPercentage: 0.8,
},
Expand All @@ -166,8 +166,6 @@ export default {
},
scales: {
x: {
min:0,
max: 100,
display: false,
grid: {
display: false,
Expand Down
6 changes: 5 additions & 1 deletion src/components/QuickTagEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
v-model="inputData"
id="quickAddTag"
required="yes"
title="Enter a Tag name and indicate its importance with '!' e.g. Buy Groceries!"
/>
<!-- not sure how to put icon over form -->

<i class="expandTag" @click="expandTagEntry">
<BIconArrowsAngleExpand />
</i>

</form>
</div>
</template>
Expand Down Expand Up @@ -172,11 +174,13 @@ input {
color: #f5f5f5;
}
input::placeholder {
color: #f5f5f5;
}
.expandTag {
color: #f5f5f5;
}
</style>

0 comments on commit ee24e6b

Please sign in to comment.