My SMM panel
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

73 Zeilen
2.2 KiB

  1. <template>
  2. <div>
  3. <section class="pending-pane">
  4. <div class="actions"><a class="new-order" href="#new-order">New</a><a class="new-order" href="#credits">Add Credits</a></div>
  5. <h4>Pending Orders</h4>
  6. <ul>
  7. <template v-bind:key='order.id' v-for="order in orders">
  8. <div class="pending-item" v-if="order.status == 'pending'">
  9. <div class="pending-heading">
  10. <li @click="togglePending($event)">{{order.service.name}} ({{order.updated_at}})</li>
  11. <img class="chevron" src="../../images/chevron-down.svg" alt="">
  12. </div>
  13. <div class="pending-content">
  14. <p>ID: {{order.id}}<br>URL: {{order.url}}<br>Quantity: {{order.quantity}}<br>Note: {{order.note}}</p>
  15. </div>
  16. </div>
  17. </template>
  18. </ul>
  19. </section>
  20. <div class="info-grey"><p>Orders are typically completed within 1-5 days.</p><div></div></div>
  21. <section class="history-pane">
  22. <h4>Order History</h4>
  23. <table>
  24. <thead><th>Date</th><th>ID</th><th>Name</th><th>Status</th> <th>Quantity</th></thead>
  25. <tbody>
  26. <tr v-bind:key='order.id' v-for='order in orders.slice(historyPage*10-10, historyPage*10)'>
  27. <td>{{order.updated_at}}</td>
  28. <td>{{order.id}}</td>
  29. <td>{{order.service.name.length > 20 ? order.service.name.substring(0,
  30. 19) + '...' : order.service.name}}</td>
  31. <td :class="order.status"
  32. class="status"><span>{{order.status.charAt(0).toUpperCase() +
  33. order.status.slice(1)}}</span></td>
  34. <td>{{order.quantity}}</td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. <img @click="moveHistory(false)" class="nav-btn left" src="../../images/arrow-left-circle-fill.svg" alt=""/>
  39. <p class="nav-legend">{{historyPage}}/{{Math.ceil(orders.length/10)}}</p>
  40. <img @click="moveHistory(true)" class="nav-btn right" src="../../images/arrow-right-circle-fill.svg" alt=""/>
  41. </section>
  42. </div>
  43. </template>
  44. <script>
  45. function togglePending(event) {
  46. event.target.parentNode.parentNode.classList.toggle('selected')
  47. }
  48. function moveHistory(forward) {
  49. if (forward) {
  50. this.historyPage += 1
  51. } else {
  52. this.historyPage -= 1
  53. }
  54. if (this.historyPage < 1) {
  55. this.historyPage = 1
  56. return
  57. } else if (this.historyPage > this.orders.length/10+1) {
  58. this.historyPage -= 1
  59. return
  60. }
  61. }
  62. export default {
  63. data() {return {historyPage: 1}},
  64. methods: {
  65. togglePending, moveHistory
  66. },
  67. props: ['orders']
  68. }
  69. </script>