Skip to content

Commit 8a5265c

Browse files
[8.x] Update status log stack (#1260)
* Update status log stack * require the first beta
1 parent 79cf8fc commit 8a5265c

4 files changed

Lines changed: 15 additions & 12 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"paypal/paypal-checkout-sdk": "^1.0",
3838
"pixelfear/composer-dist-plugin": "^0.1.0",
3939
"spatie/ignition": "^1.13",
40-
"statamic/cms": "^6.0.0-alpha.1",
40+
"statamic/cms": "^6.0.0-beta.1",
4141
"stillat/proteus": "^4.0",
4242
"stripe/stripe-php": "^13.0"
4343
},

resources/js/components/Fieldtypes/StatusLogFieldtype.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
@click="showStatusLog = true"
99
/>
1010

11-
<Stack name="status-log" v-if="showStatusLog" @closed="showStatusLog = false" :narrow="true">
11+
<Stack
12+
ref="statusLogStack"
13+
size="narrow"
14+
:title="__('Status Log')"
15+
v-model:open="showStatusLog"
16+
>
1217
<status-log
1318
slot-scope="{ close }"
1419
:index-url="meta.indexUrl"
@@ -18,7 +23,7 @@
1823
:payment-statuses="meta.paymentStatuses"
1924
:current-order-status="currentOrderStatus"
2025
:current-payment-status="currentPaymentStatus"
21-
@closed="close"
26+
@closed="$refs.statusLogStack.close()"
2227
/>
2328
</Stack>
2429
</div>

resources/js/components/StatusLog/StatusLog.vue

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
<template>
2-
<div class="m-2 flex h-full flex-col rounded-xl bg-white dark:bg-gray-800">
3-
<header
4-
class="flex items-center justify-between rounded-t-xl border-b border-gray-300 px-4 mb-3 py-2 dark:border-gray-950 dark:bg-gray-800"
5-
>
6-
<Heading size="lg">{{ __('Status Log') }}</Heading>
7-
<Button icon="x" variant="ghost" class="-me-2" @click="close" />
8-
</header>
9-
10-
<div class="flex-1 overflow-auto">
2+
<div>
3+
<div>
114
<div class="loading flex h-full items-center justify-center" v-if="loading">
125
<Icon name="loading" />
136
</div>

resources/js/components/StatusLog/StatusLogEvent.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
<script>
3838
import axios from 'axios';
39+
import { DateFormatter } from '@statamic/cms';
3940
import { Badge, Subheading, Avatar } from '@statamic/cms/ui'
4041
4142
export default {
@@ -73,6 +74,10 @@ export default {
7374
return moment.unix(this.event.timestamp);
7475
},
7576
77+
time() {
78+
return DateFormatter.format(this.event.timestamp * 1000, 'time');
79+
},
80+
7681
isCurrent() {
7782
return this.event.status === this.currentOrderStatus
7883
|| this.event.status === this.currentPaymentStatus;

0 commit comments

Comments
 (0)