|
99 | 99 | <v-row class="mt-8"> |
100 | 100 | <v-col cols="12"> |
101 | 101 | <h5 class="text-h5 mb-3">Bulk Message History</h5> |
102 | | - <v-data-table |
103 | | - :headers="historyHeaders" |
104 | | - :items="bulkOrders" |
105 | | - :loading="loadingHistory" |
106 | | - :items-per-page="10" |
107 | | - hide-default-footer |
108 | | - loading-text="Loading bulk message history..." |
109 | | - no-data-text="No bulk message orders found" |
110 | | - class="elevation-1" |
111 | | - > |
112 | | - <template #[`item.request_id`]="{ item }"> |
113 | | - <span class="font-weight-medium">{{ item.request_id }}</span> |
114 | | - </template> |
115 | | - <template #[`item.created_at`]="{ item }"> |
116 | | - {{ item.created_at | timestamp }} |
117 | | - </template> |
118 | | - <template #[`item.actions`]="{ item }"> |
119 | | - <v-btn |
120 | | - small |
121 | | - color="primary" |
122 | | - text |
123 | | - :to="`/search-messages?query=${item.request_id}`" |
124 | | - > |
125 | | - <v-icon small left>{{ mdiEye }}</v-icon> |
126 | | - View |
127 | | - </v-btn> |
| 102 | + <p class="text--secondary"> |
| 103 | + Your 10 most recent bulk SMS uploads are listed below with a |
| 104 | + breakdown of message delivery status. Click |
| 105 | + <strong>View</strong> to see all individual messages in a batch. |
| 106 | + </p> |
| 107 | + <v-progress-linear |
| 108 | + v-if="loadingHistory" |
| 109 | + indeterminate |
| 110 | + class="mb-4" |
| 111 | + ></v-progress-linear> |
| 112 | + <v-simple-table v-if="bulkOrders.length"> |
| 113 | + <template #default> |
| 114 | + <thead> |
| 115 | + <tr class="text-uppercase subtitle-2"> |
| 116 | + <th class="text-left">Name</th> |
| 117 | + <th class="text-center">Total</th> |
| 118 | + <th class="text-center">Scheduled</th> |
| 119 | + <th class="text-center">Pending</th> |
| 120 | + <th class="text-center">Sent</th> |
| 121 | + <th class="text-center">Delivered</th> |
| 122 | + <th class="text-center">Failed</th> |
| 123 | + <th class="text-center">Created At</th> |
| 124 | + <th class="text-center">Action</th> |
| 125 | + </tr> |
| 126 | + </thead> |
| 127 | + <tbody> |
| 128 | + <tr v-for="order in bulkOrders" :key="order.request_id"> |
| 129 | + <td class="text-left font-weight-medium"> |
| 130 | + {{ order.request_id }} |
| 131 | + </td> |
| 132 | + <td class="text-center">{{ order.total }}</td> |
| 133 | + <td class="text-center">{{ order.scheduled_count }}</td> |
| 134 | + <td class="text-center">{{ order.pending_count }}</td> |
| 135 | + <td class="text-center">{{ order.sent_count }}</td> |
| 136 | + <td class="text-center">{{ order.delivered_count }}</td> |
| 137 | + <td class="text-center">{{ order.failed_count }}</td> |
| 138 | + <td class="text-center"> |
| 139 | + {{ order.created_at | timestamp }} |
| 140 | + </td> |
| 141 | + <td class="text-center"> |
| 142 | + <v-btn |
| 143 | + small |
| 144 | + color="primary" |
| 145 | + text |
| 146 | + :to="`/search-messages?query=${order.request_id}`" |
| 147 | + > |
| 148 | + <v-icon small left>{{ mdiEye }}</v-icon> |
| 149 | + View |
| 150 | + </v-btn> |
| 151 | + </td> |
| 152 | + </tr> |
| 153 | + </tbody> |
128 | 154 | </template> |
129 | | - </v-data-table> |
| 155 | + </v-simple-table> |
| 156 | + <p v-else-if="!loadingHistory" class="text--secondary"> |
| 157 | + No bulk message uploads found. |
| 158 | + </p> |
130 | 159 | </v-col> |
131 | 160 | </v-row> |
132 | 161 | </v-container> |
@@ -183,17 +212,6 @@ export default Vue.extend({ |
183 | 212 | errorMessages: new ErrorMessages(), |
184 | 213 | dialog: false, |
185 | 214 | bulkOrders: [] as any[], |
186 | | - historyHeaders: [ |
187 | | - { text: 'Name', value: 'request_id' }, |
188 | | - { text: 'Total', value: 'total', sortable: false }, |
189 | | - { text: 'Scheduled', value: 'scheduled_count', sortable: false }, |
190 | | - { text: 'Pending', value: 'pending_count', sortable: false }, |
191 | | - { text: 'Sent', value: 'sent_count', sortable: false }, |
192 | | - { text: 'Delivered', value: 'delivered_count', sortable: false }, |
193 | | - { text: 'Failed', value: 'failed_count', sortable: false }, |
194 | | - { text: 'Created At', value: 'created_at' }, |
195 | | - { text: 'Actions', value: 'actions', sortable: false }, |
196 | | - ], |
197 | 215 | } |
198 | 216 | }, |
199 | 217 | head() { |
|
0 commit comments