12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <template>
- <div>
- <modal title="View Punishment">
- <div slot="body">
- <article class="message">
- <div class="message-body">
- <strong>Type:</strong>
- {{ punishment.type }}
- <br />
- <strong>Value:</strong>
- {{ punishment.value }}
- <br />
- <strong>Reason:</strong>
- {{ punishment.reason }}
- <br />
- <strong>Active:</strong>
- {{ punishment.active }}
- <br />
- <strong>Expires at:</strong>
- {{
- moment(punishment.expiresAt).format(
- "MMMM Do YYYY, h:mm:ss a"
- )
- }}
- ({{ moment(punishment.expiresAt).fromNow() }})
- <br />
- <strong>Punished at:</strong>
- {{
- moment(punishment.punishedAt).format(
- "MMMM Do YYYY, h:mm:ss a"
- )
- }}
- ({{ moment(punishment.punishedAt).fromNow() }})
- <br />
- <strong>Punished by:</strong>
- {{ punishment.punishedBy }}
- <br />
- </div>
- </article>
- </div>
- <div slot="footer">
- <button
- class="button is-danger"
- @click="
- closeModal({
- sector: 'admin',
- modal: 'viewPunishment'
- })
- "
- >
- <span> Close</span>
- </button>
- </div>
- </modal>
- </div>
- </template>
- <script>
- import { mapState, mapActions } from "vuex";
- import io from "../../io";
- import Modal from "./Modal.vue";
- export default {
- components: { Modal },
- data() {
- return {
- ban: {},
- moment
- };
- },
- computed: {
- ...mapState("admin/punishments", {
- punishment: state => state.punishment
- })
- },
- mounted: function() {
- let _this = this;
- io.getSocket(socket => (_this.socket = socket));
- },
- methods: {
- ...mapActions("modals", ["closeModal"])
- }
- };
- </script>
|