stash
This commit is contained in:
parent
a56fea6454
commit
a8ee12668b
2 changed files with 10 additions and 29 deletions
|
@ -3,20 +3,23 @@
|
||||||
<i class="avatar | small">
|
<i class="avatar | small">
|
||||||
<font-awesome-icon icon="user"/>
|
<font-awesome-icon icon="user"/>
|
||||||
</i>
|
</i>
|
||||||
<!--span><a href="#">$USER</a> has changed state to <span
|
<span><a href="#">$USER</a> has claimed sipping code
|
||||||
class="badge badge-pill badge-primary" :class="'bg-' + colorLookup">{{ lookupState.text }}</span> at <time
|
<ClipboardButton class="btn btn-primary badge badge-pill" title="Copy shipping code to clipboard" :payload="item.code">{{ item.code }}
|
||||||
:datetime="timestamp">{{ timestamp }}</time>
|
<font-awesome-icon icon="clipboard"/>
|
||||||
</span-->
|
</ClipboardButton> of type <span class="badge badge-pill badge-secondary">{{ item.code_type }}</span> for this ticket at <time
|
||||||
{{item}}
|
:datetime="timestamp">{{ timestamp }}</time>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {mapState} from "vuex";
|
import {mapState} from "vuex";
|
||||||
|
import ClipboardButton from "@/components/inputs/ClipboardButton.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TimelineShippingCode',
|
name: 'TimelineShippingCode',
|
||||||
|
components: {ClipboardButton},
|
||||||
props: {
|
props: {
|
||||||
'item': {
|
'item': {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -25,28 +28,6 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['state_options']),
|
...mapState(['state_options']),
|
||||||
lookupState: function () {
|
|
||||||
try {
|
|
||||||
if (this.item.state)
|
|
||||||
return this.state_options.find(state => state.value === this.item.state);
|
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
text: 'Unknown',
|
|
||||||
value: 'unknown'
|
|
||||||
};
|
|
||||||
},
|
|
||||||
colorLookup: function () {
|
|
||||||
if (this.item.state.startsWith('closed_')) {
|
|
||||||
return 'secondary';
|
|
||||||
} else if (this.item.state.startsWith('pending_')) {
|
|
||||||
return 'warning';
|
|
||||||
} else if (this.item.state.startsWith('waiting_')) {
|
|
||||||
return 'primary';
|
|
||||||
} else {
|
|
||||||
return 'danger';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'timestamp': function () {
|
'timestamp': function () {
|
||||||
return new Date(this.item.timestamp).toLocaleString();
|
return new Date(this.item.timestamp).toLocaleString();
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,13 +44,13 @@ import {
|
||||||
faClipboard,
|
faClipboard,
|
||||||
faTasks,
|
faTasks,
|
||||||
faAngleRight,
|
faAngleRight,
|
||||||
faAngleDown
|
faAngleDown, faTruck, faObjectGroup
|
||||||
} from '@fortawesome/free-solid-svg-icons';
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
|
||||||
|
|
||||||
library.add(faPlus, faCheckCircle, faEdit, faTrash, faCat, faSyncAlt, faSort, faSortUp, faSortDown, faTh, faList,
|
library.add(faPlus, faCheckCircle, faEdit, faTrash, faCat, faSyncAlt, faSort, faSortUp, faSortDown, faTh, faList,
|
||||||
faWindowClose, faCamera, faStop, faPen, faCheck, faTimes, faSave, faEye, faComment, faUser, faComments, faEnvelope,
|
faWindowClose, faCamera, faStop, faPen, faCheck, faTimes, faSave, faEye, faComment, faUser, faComments, faEnvelope,
|
||||||
faArchive, faMinus, faExclamation, faHourglass, faClipboard, faTasks, faAngleDown, faAngleRight);
|
faArchive, faMinus, faExclamation, faHourglass, faClipboard, faTasks, faAngleDown, faAngleRight, faTruck, faObjectGroup);
|
||||||
|
|
||||||
|
|
||||||
sync(store, router);
|
sync(store, router);
|
||||||
|
|
Loading…
Reference in a new issue