Skip to content

Commit

Permalink
Merge pull request #685 from RudraJy/remove-unused-vars
Browse files Browse the repository at this point in the history
Removed unused variables (JS-0128)
  • Loading branch information
robotichead authored Oct 7, 2024
2 parents 364a49c + c556320 commit 26e08ea
Show file tree
Hide file tree
Showing 53 changed files with 81 additions and 93 deletions.
6 changes: 3 additions & 3 deletions src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {createApp} from "vue/dist/vue.esm-bundler";
import {store} from "./vuex-store";

//Import Bootstrap
import {createPopper} from "@popperjs/core";
import bootstrap from "bootstrap";



//SCSS Library
import "../sass/main.scss";
Expand All @@ -23,7 +23,7 @@ const axiosInstance = axios.create({
});

//nextTick
import {nextTick} from 'vue';


//Naive-ui
import {NConfigProvider} from "naive-ui";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/administration/AdminAddUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default {
this.axios.post(
`${this.rootUrl}admin_add_user/`,
data_to_send
).then((response) => {
).then(() => {
//Just refresh the page (for now)
window.location.reload(true);
}).catch((error) => {
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/card_information/CardNotes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
//Clear the card note model
this.cardNoteModel = "";
}).catch((error) => {
});
},
closeModal() {
Expand Down
8 changes: 4 additions & 4 deletions src/js/components/change_task/ChangeTaskInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export default {
`${this.rootUrl}change_task_information/${this.changeTaskResults[0].pk}/save/`,
data_to_send
)
.then((response) => {
.then(() => {
//If successful, go back
this.$store.dispatch("newToast", {
header: "Saved Change Task",
Expand All @@ -340,7 +340,7 @@ export default {
});
//window.location.href = `${this.rootUrl}rfc_information/${this.changeTaskResults[0].fields.request_for_change}/`;
})
.catch((error) => {
.catch(() => {
this.$store.dispatch("newToast", {
header: "Can not save",
message: "Sorry, we could not save your change task",
Expand Down Expand Up @@ -378,11 +378,11 @@ export default {
`${this.rootUrl}change_task_update_status/${this.changeTaskResults[0].pk}/`,
data_to_send
)
.then((response) => {
.then(() => {
//Reload the page
window.location.reload(true);
})
.catch((error) => {
.catch(() => {
this.$store.dispatch("newToast", {
header: "Can not save",
message: "Sorry, we could not save your change task",
Expand Down
10 changes: 4 additions & 6 deletions src/js/components/change_task/modules/ChangeTaskDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default {
}
},
methods: {
customUploadImage(blobInfo, success, failure, progress) {
customUploadImage(blobInfo, success) {
//Create the form
const data_to_send = new FormData();
data_to_send.set(
Expand All @@ -80,11 +80,9 @@ export default {
//Configuration for axios
const config = {
onUploadProgress: (progressEvent) => {
onUploadProgress: () => {
//As the document gets uploaded - we want to update the upload Percentage
progress =
parseFloat(progressEvent.loaded) /
parseFloat(progressEvent.total);
},
};
Expand All @@ -98,7 +96,7 @@ export default {
).then((response) => {
//Just send the location to the success
success(`/private/${response.data[0].document_key_id}`);
}).catch((error) => {
});
},
updateDescription() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default {
//Return results
return results;
})
}).catch((error) => {});
});
},
},
mounted() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default {
//Send the trigger
this.axios.post(
`${this.rootUrl}change_task_information/${this.changeTaskResults[0].pk}/delete/`
).then((response) => {
).then(() => {
//If successful, go back
window.location.href = `${this.rootUrl}rfc_information/${this.changeTaskResults[0].fields.request_for_change}/`;
});
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/customers/NewCustomer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default {
}, 500);
}
},
getOrganisationData(search, loading) {
getOrganisationData(search) {
// Save the seach data in FormData
const data_to_send = new FormData();
data_to_send.set("search", search);
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/customers/NewCustomerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</template>

<script>
import {Modal} from "bootstrap";
import {Icon} from "@iconify/vue";
import NewCustomerForm from "./NewCustomerForm.vue";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/gantt_chart/GanttInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<script>
import {mapGetters} from "vuex";
import {DateTime} from "luxon";
import {NConfigProvider} from "naive-ui";
//Components
import ConfirmObjectRemove from "../modules/wizards/ConfirmObjectRemove.vue";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/groups/ConfirmGroupDelete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<script>
import {mapGetters} from "vuex";
import {Modal} from "bootstrap";
export default {
name: "ConfirmGroupDelete",
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/kanban/ArchiveCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default {
`${this.rootUrl}kanban_information/archive_kanban_cards/`,
data_to_send
)
.catch((error) => {
.catch(() => {
//TODO: Return cards back into state management. They errored out.
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/kanban/ConfirmCardArchive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default {
`${this.rootUrl}kanban_information/archive_kanban_cards/`,
data_to_send
)
.catch((error) => {
.catch(() => {
//TODO: show card error
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/kanban/KanbanBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import KanbanRow from "./KanbanRow.vue";
//VueX
import {mapGetters} from "vuex";
import {nextTick} from 'vue';
export default {
name: "KanbanBoard",
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/kanban/KanbanColumnDraggable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ export default {
//Setup variables (for shorthand)
const new_card_column = new_elem.dataset.column,
new_card_level = new_elem.dataset.level,
new_card_sort_number = event.newIndex,
old_card_column = old_elem.dataset.column,
old_card_level = old_elem.dataset.level,
old_card_sort_number = event.oldIndex,
column_property = new_elem.dataset.columnProperty;
//Data to send
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/kanban/KanbanPropertyOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export default {
this.axios.post(
url,
data_to_send
).then((response) => {
).then(() => {
//Filter out the id we want to remove
this.localPropertyList = this.localPropertyList.filter(
(row) => {
Expand Down Expand Up @@ -576,7 +576,7 @@ export default {
const data_to_send = new FormData();
// Insert a new row for each group list item
this.localPropertyList.forEach((row, index) => {
this.localPropertyList.forEach((row) => {
data_to_send.append("item", row.id);
});
Expand Down
3 changes: 1 addition & 2 deletions src/js/components/modules/sub_modules/AssociatedObjects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ export default {
this.projectResults = response.data.project;
this.requirementResults = response.data.requirement;
this.taskResults = response.data.task;
})
.catch((error) => {
});
},
getFriendlyDate(input_date) {
Expand Down
8 changes: 3 additions & 5 deletions src/js/components/modules/sub_modules/ListTagsModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ export default {
)
.then((response) => {
this.tagList = response.data;
})
.catch((error) => {
});
},
removeTag(tag_id) {
Expand All @@ -115,13 +114,12 @@ export default {
`${this.rootUrl}object_data/delete_tag/`,
data_to_send
)
.then((response) => {
.then(() => {
//Remove data from tagList
this.tagList = this.tagList.filter((row) => {
return row.pk !== tag_id;
});
})
.catch((error) => {
});
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/modules/wizards/AddFolderWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

<script>
import {Icon} from "@iconify/vue";
import {Modal} from "bootstrap";
//VueX
import {mapGetters} from "vuex";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/modules/wizards/AddLinkWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ import reopenCardInformation from "../../../mixins/reopenCardInformation"
import useVuelidate from "@vuelidate/core";
import {required, url} from "@vuelidate/validators";
import ValidationRendering from "../../validation/ValidationRendering.vue";
import {Modal} from "bootstrap";
export default {
name: "AddLinkWizard",
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/modules/wizards/AddUserWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<script>
import {Icon} from "@iconify/vue";
import {NSelect} from "naive-ui";
import {Modal} from "bootstrap";
//VueX
import {mapGetters} from "vuex";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/modules/wizards/ConfirmFileDelete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<script>
import {mapGetters} from "vuex";
import {Modal} from "bootstrap";
//Mixins
import reopenCardInformation from "../../../mixins/reopenCardInformation";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/modules/wizards/ConfirmFolderDelete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<script>
import {mapGetters} from "vuex";
import {Modal} from "bootstrap";
//Mixins
import reopenCardInformation from "../../../mixins/reopenCardInformation";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/modules/wizards/ConfirmNoteDelete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<script>
import {mapGetters} from "vuex";
import {Modal} from "bootstrap";
//Mixins
import reopenCardInformation from "../../../mixins/reopenCardInformation";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/modules/wizards/ConfirmRemoveSprint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<script>
import {mapGetters} from "vuex";
import {Modal} from "bootstrap";
export default {
name: "ConfirmRemoveSprint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import Editor from "@tinymce/tinymce-vue";
//VueX
import {mapGetters} from "vuex";
import {Modal} from "bootstrap";
export default {
name: "EditHistoryNoteWizard",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export default {
//Clear the search term results
this.searchTermModel = "";
})
.catch((error) => {
.catch(() => {
this.$store.dispatch("newToast", {
header: "Error retrieving links",
message: "We are currently having issues obtaining data",
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/modules/wizards/UploadDocumentWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@

<script>
import {Icon} from "@iconify/vue";
import {Modal} from "bootstrap";
//VueX
import {mapGetters} from "vuex";
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/my_planner/NewPlannerObjectWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
</template>

<script>
import {Icon} from "@iconify/vue";
import {NSelect} from "naive-ui";
//VueX
Expand Down
6 changes: 3 additions & 3 deletions src/js/components/notifications/NotificationInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ export default {
this.axios.post(
`${this.rootUrl}notification_information/delete/`,
data_to_send,
).then(response => {
).then(() => {
//Go back to search
window.location.href = `${this.rootUrl}search/notification/`;
}).catch((error) => {
}).catch(() => {
this.$store.dispatch("newToast", {
header: "Can not delete",
message: "Sorry, we are having issues deleting this notification. Please contact your system admin",
Expand Down Expand Up @@ -210,7 +210,7 @@ export default {
this.axios.post(
`${this.rootUrl}notification_information/${this.notificationResults[0].pk}/save/`,
data_to_send,
).then((response) => {
).then(() => {
//Tell user that this was successful
this.$store.dispatch("newToast", {
header: "Saved Notification",
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/object_scheduler/NewScheduledObject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ import uploadMixin from "../../mixins/uploadMixin";
//Validations
import useVuelidate from "@vuelidate/core";
import {required, maxLength} from "@vuelidate/validators";
import {required} from "@vuelidate/validators";
import ValidationRendering from "../validation/ValidationRendering.vue";
//VueX
Expand Down Expand Up @@ -333,7 +333,7 @@ export default {
);
// Insert a new row for each group list item
this.groupModel.forEach((row, index) => {
this.groupModel.forEach((row) => {
data_to_send.append("group_list", row);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ import uploadMixin from "../../mixins/uploadMixin";
//Validations
import useVuelidate from "@vuelidate/core";
import {required, maxLength} from "@vuelidate/validators";
import {required} from "@vuelidate/validators";
import ValidationRendering from "../validation/ValidationRendering.vue";
//VueX
Expand Down
Loading

0 comments on commit 26e08ea

Please sign in to comment.