Skip to content

Commit

Permalink
add date field to contribution remove confirm (forgor)
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Jul 26, 2024
1 parent 146d223 commit 4246104
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pages/contribution/contribution-remove-confirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<li>ID: {{ data.id }}</li>
<li>Name: {{ data.name }}</li>
<li>Pack: {{ data.pack }}</li>
<li>Date: {{ data.date }} ({{ timestampToDate(data.date) }})</li>
<li>
Authors:
<ul>
Expand All @@ -21,6 +22,7 @@

<script>
import axios from "axios";
import moment from "moment";
import RemoveConfirm from "../components/remove-confirm.vue";
export default {
Expand Down Expand Up @@ -50,6 +52,9 @@ export default {
};
},
methods: {
timestampToDate(t) {
return moment(new Date(t)).format("ll");
},
deleteContribution() {
axios
.delete(`${this.$root.apiURL}/contributions/${this.data.id}`, this.$root.apiOptions)
Expand Down

0 comments on commit 4246104

Please sign in to comment.