ali 3 vuotta sitten
vanhempi
commit
1cc1a78051

+ 2 - 2
package.json

@@ -51,8 +51,8 @@
     "process": "^0.11.10",
     "quasar": "^2.12.0",
     "quasar-app-extension-q-page-builder": "^0.1.51",
-    "quasar-crud": "^0.3.45",
-    "quasar-form-builder": "^0.1.108",
+    "quasar-crud": "^0.3.50",
+    "quasar-form-builder": "^0.1.110",
     "quasar-template-builder": "^1.0.23",
     "quasar-ui-q-page-builder": "^0.1.51",
     "socket.io-client": "^4.6.1",

+ 24 - 11
src/components/Widgets/Content/AdminContentList/AdminContentList.vue

@@ -17,7 +17,14 @@
                   :show-expand-button="false"
                   :show-reload-button="false">
       <template #entity-index-table-cell="{inputData}">
-        <template v-if="inputData.col.name === 'action'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'thumbnail'">
+          <q-img :src="inputData.col.value"
+                 width="100px" />
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <q-btn color="primary"
                  :to="{name: 'Admin.Content.Show', params: {id: inputData.props.row.id}}">
             مشاهده جزییات
@@ -33,7 +40,6 @@
 
 <script>
 import { EntityIndex } from 'quasar-crud'
-import { Ticket } from 'src/models/Ticket.js'
 import { mixinWidget } from 'src/mixin/Mixins.js'
 import { APIGateway } from 'src/api/APIGateway.js'
 
@@ -55,25 +61,32 @@ export default {
       table: {
         columns: [
           {
-            name: 'title',
+            name: 'number',
             required: true,
-            label: 'موضوع پیام',
+            label: 'شماره',
             align: 'left',
-            field: row => row.title
+            field: () => ''
+          },
+          {
+            name: 'thumbnail',
+            required: true,
+            label: 'تصویر',
+            align: 'left',
+            field: row => row.thumbnail
           },
           {
-            name: 'sender',
+            name: 'title',
             required: true,
-            label: 'فرستنده',
+            label: 'عنوان',
             align: 'left',
-            field: row => row.creator_info.firstname + ' ' + row.creator_info.lastname
+            field: row => row.title
           },
           {
-            name: 'status',
+            name: 'category_info',
             required: true,
-            label: 'وضعیت',
+            label: 'دسته',
             align: 'left',
-            field: row => (new Ticket(row)).status_info.label
+            field: row => row.category_info?.title
           },
           {
             name: 'action',

+ 22 - 1
src/components/Widgets/ContentCategory/AdminContentCategoryList/AdminContentCategoryList.vue

@@ -18,7 +18,14 @@
                   :show-expand-button="false"
                   :show-reload-button="false">
       <template #entity-index-table-cell="{inputData}">
-        <template v-if="inputData.col.name === 'action'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'thumbnail'">
+          <q-img :src="inputData.col.value"
+                 width="100px" />
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <q-btn color="primary"
                  :to="{name: 'Admin.ContentCategory.Show', params: {id: inputData.props.row.id}}">
             مشاهده جزییات
@@ -69,6 +76,20 @@ export default {
       ],
       table: {
         columns: [
+          {
+            name: 'number',
+            required: true,
+            label: 'شماره',
+            align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'thumbnail',
+            required: true,
+            label: 'تصویر',
+            align: 'left',
+            field: row => row.thumbnail
+          },
           {
             name: 'title',
             required: true,

+ 12 - 1
src/components/Widgets/Invoice/AdminInvoiceList/AdminInvoiceList.vue

@@ -13,7 +13,10 @@
                   :show-expand-button="false"
                   :show-reload-button="false">
       <template #entity-index-table-cell="{inputData}">
-        <template v-if="inputData.col.name === 'action'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <q-btn color="primary"
                  :to="{name: 'Admin.Invoice.Show', params: {id: inputData.props.row.id}}">
             جزییات جزییات
@@ -68,11 +71,19 @@ export default {
           col: 'col-md-3 col-12'
         },
         { type: 'select', name: 'category', options: [], label: 'وضعیت تراکنش', placeholder: ' ', col: 'col-md-2 col-12' },
+        { type: 'hidden', name: 'per_page', value: 5 },
         { type: 'input', name: 'category', label: 'نوع صورتحساب', placeholder: ' ', col: 'col-md-2 col-12' },
         { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'جستجو', placeholder: ' ', atClick: () => {}, col: 'col-md-2 col-12' }
       ],
       table: {
         columns: [
+          {
+            name: 'number',
+            required: true,
+            label: 'شماره',
+            align: 'left',
+            field: () => ''
+          },
           {
             name: 'id',
             required: true,

+ 15 - 2
src/components/Widgets/Invoice/InvoiceList/InvoiceList.vue

@@ -14,7 +14,10 @@
                   :show-expand-button="false"
                   :show-reload-button="false">
       <template #entity-index-table-cell="{inputData}">
-        <template v-if="inputData.col.name === 'action'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <q-btn color="primary"
                  :to="{name: 'UserPanel.Invoice.Show', params: {id: inputData.props.row.id}}">
             مشاهده جزییات
@@ -27,7 +30,10 @@
       <template #entity-index-table-item-cell="{inputData}">
         <entity-index-grid-item :input-data="inputData">
           <template #col="{col, row}">
-            <template v-if="col.name === 'action'">
+            <template v-if="col.name === 'number'">
+              {{ inputData.rowNumber }}
+            </template>
+            <template v-else-if="col.name === 'action'">
               <q-btn color="primary"
                      :to="{name: 'UserPanel.Invoice.Show', params: {id: row.id}}">
                 مشاهده جزییات
@@ -87,6 +93,13 @@ export default {
       ],
       table: {
         columns: [
+          {
+            name: 'number',
+            required: true,
+            label: 'شماره',
+            align: 'left',
+            field: () => ''
+          },
           {
             name: 'id',
             required: true,

+ 15 - 2
src/components/Widgets/Payment/PaymentList/PaymentList.vue

@@ -14,7 +14,10 @@
                   :show-expand-button="false"
                   :show-reload-button="false">
       <template #entity-index-table-cell="{inputData}">
-        <template v-if="inputData.col.name === 'action'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <q-btn color="primary"
                  :to="{name: 'UserPanel.Payment.Show', params: {id: inputData.props.row.id}}">
             مشاهده جزییات
@@ -27,7 +30,10 @@
       <template #entity-index-table-item-cell="{inputData}">
         <entity-index-grid-item :input-data="inputData">
           <template #col="{col, row}">
-            <template v-if="col.name === 'action'">
+            <template v-if="col.name === 'number'">
+              {{ inputData.rowNumber }}
+            </template>
+            <template v-else-if="col.name === 'action'">
               <q-btn color="primary"
                      :to="{name: 'UserPanel.Payment.Show', params: {id: row.id}}">
                 مشاهده جزییات
@@ -88,6 +94,13 @@ export default {
       ],
       table: {
         columns: [
+          {
+            name: 'number',
+            required: true,
+            label: 'شماره',
+            align: 'left',
+            field: () => ''
+          },
           {
             name: 'id',
             required: true,

+ 11 - 1
src/components/Widgets/Ticket/AdminTicketList/AdminTicketList.vue

@@ -12,7 +12,10 @@
                   :show-expand-button="false"
                   :show-reload-button="false">
       <template #entity-index-table-cell="{inputData}">
-        <template v-if="inputData.col.name === 'action'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <q-btn color="primary"
                  :to="getShowRoute(inputData.props.row.id)">
             مشاهده جزییات
@@ -60,6 +63,13 @@ export default {
       ],
       table: {
         columns: [
+          {
+            name: 'number',
+            required: true,
+            label: 'شماره',
+            align: 'left',
+            field: () => ''
+          },
           {
             name: 'title',
             required: true,

+ 13 - 3
src/pages/Admin/Category/index.vue

@@ -16,7 +16,10 @@
                   :show-reload-button="false"
                   :show-expand-button="false">
       <template v-slot:entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
-        <template v-if="inputData.col.name === 'actions'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <div class="action-column-entity-index">
             <q-btn size="md"
                    color="primary"
@@ -61,10 +64,17 @@ export default {
       table: {
         columns: [
           {
-            name: 'id',
+            name: 'number',
             required: true,
             label: 'شماره',
             align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
             field: row => row.id
           },
           {
@@ -96,7 +106,7 @@ export default {
             field: row => ShamsiDate.getDateTime(row.last_modification_time)
           },
           {
-            name: 'actions',
+            name: 'action',
             required: true,
             label: 'عملیات',
             align: 'left',

+ 13 - 3
src/pages/Admin/Classroom/index.vue

@@ -28,7 +28,10 @@
                   :show-reload-button="false"
                   :show-search-button="false">
       <template v-slot:entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
-        <template v-if="inputData.col.name === 'actions'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <div class="action-column-entity-index">
             <q-btn size="md"
                    color="primary"
@@ -92,10 +95,17 @@ export default {
       table: {
         columns: [
           {
-            name: 'id',
+            name: 'number',
             required: true,
             label: 'شماره',
             align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
             field: row => row.id
           },
           {
@@ -155,7 +165,7 @@ export default {
             field: row => (row.beginning_registration_period) ? ShamsiDate.getTerm(row.beginning_registration_period) : '-'
           },
           {
-            name: 'actions',
+            name: 'action',
             required: true,
             label: 'عملیات',
             align: 'left',

+ 12 - 2
src/pages/Admin/DiscussionCirclesCategory/index.vue

@@ -16,7 +16,10 @@
                   :show-reload-button="false"
                   :show-expand-button="false">
       <template v-slot:entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
-        <template v-if="inputData.col.name === 'actions'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'actions'">
           <div class="action-column-entity-index">
             <q-btn size="md"
                    color="primary"
@@ -62,10 +65,17 @@ export default {
       table: {
         columns: [
           {
-            name: 'id',
+            name: 'number',
             required: true,
             label: 'شماره',
             align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
             field: row => row.id
           },
           {

+ 13 - 3
src/pages/Admin/DiscussionCirclesClassroom/index.vue

@@ -28,7 +28,10 @@
                   :show-reload-button="false"
                   :show-search-button="false">
       <template v-slot:entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
-        <template v-if="inputData.col.name === 'actions'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <div class="action-column-entity-index">
             <q-btn size="md"
                    color="primary"
@@ -76,10 +79,17 @@ export default {
       table: {
         columns: [
           {
-            name: 'id',
+            name: 'number',
             required: true,
             label: 'شماره',
             align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
             field: row => row.id
           },
           {
@@ -139,7 +149,7 @@ export default {
             field: row => (row.beginning_registration_period) ? ShamsiDate.getTerm(row.beginning_registration_period) : '-'
           },
           {
-            name: 'actions',
+            name: 'action',
             required: true,
             label: 'عملیات',
             align: 'left',

+ 13 - 3
src/pages/Admin/User/index.vue

@@ -11,7 +11,10 @@
                   :show-reload-button="false"
                   :show-search-button="false">
       <template v-slot:entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
-        <template v-if="inputData.col.name === 'actions'">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
           <div class="action-column-entity-index">
             <q-btn size="md"
                    color="primary"
@@ -69,10 +72,17 @@ export default {
       table: {
         columns: [
           {
-            name: 'id',
+            name: 'number',
             required: true,
             label: 'شماره',
             align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
             field: row => row.id
           },
           {
@@ -111,7 +121,7 @@ export default {
             field: row => row.is_active
           },
           {
-            name: 'actions',
+            name: 'action',
             required: true,
             label: '',
             align: 'left',

+ 16 - 3
src/pages/User/Profile/classrooms.vue

@@ -11,7 +11,10 @@
                 :show-reload-button="false"
                 :show-search-button="false">
     <template #entity-index-table-cell="{inputData}">
-      <template v-if="inputData.col.name === 'action'">
+      <template v-if="inputData.col.name === 'number'">
+        {{ inputData.rowNumber }}
+      </template>
+      <template v-else-if="inputData.col.name === 'action'">
         <q-btn size="md"
                color="primary"
                label="جزییات"
@@ -24,7 +27,10 @@
     <template #entity-index-table-item-cell="{inputData}">
       <entity-index-grid-item :input-data="inputData">
         <template #col="{col, row}">
-          <template v-if="col.name === 'action'">
+          <template v-if="col.name === 'number'">
+            {{ inputData.rowNumber }}
+          </template>
+          <template v-else-if="col.name === 'action'">
             <q-btn size="md"
                    color="primary"
                    label="جزییات"
@@ -111,10 +117,17 @@ export default {
       table: {
         columns: [
           {
-            name: 'id',
+            name: 'number',
             required: true,
             label: 'شماره',
             align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
             field: row => row.id
           },
           {

+ 9 - 9
yarn.lock

@@ -5406,23 +5406,23 @@ quasar-app-extension-q-page-builder@^0.1.51:
   dependencies:
     quasar-ui-q-page-builder "^0.1.51"
 
-quasar-crud@^0.3.45:
-  version "0.3.45"
-  resolved "https://registry.yarnpkg.com/quasar-crud/-/quasar-crud-0.3.45.tgz#636bb8f6a20a53d37b2fc0cc48ed3c69d21223ea"
-  integrity sha512-ECSGAmnz3K0frgFmdY1soCKErKs9WW4+TJt+7up7+0msuv8bf9vtyWjPK8ii/hW4tvu5mDsun47ZDhf8HP6JVA==
+quasar-crud@^0.3.50:
+  version "0.3.50"
+  resolved "https://registry.yarnpkg.com/quasar-crud/-/quasar-crud-0.3.50.tgz#98739c901447226675db088fa96134b75654ebfc"
+  integrity sha512-FwUh03+C6rC2E/1hgKEjVXMo4kw7YkErhN+lgFwOFYYYLXKFOBfPGjqojeU2e5fSlI4qsH6mKk1ou0lZCRgzqA==
   dependencies:
     "@quasar/extras" "^1.16.5"
     axios "^1.4.0"
     moment-jalaali "^0.10.0"
     quasar "^2.12.2"
-    quasar-form-builder "^0.1.108"
+    quasar-form-builder "^0.1.110"
     shvl "^3.0.0"
     vue "^3.2.47"
 
-quasar-form-builder@^0.1.108:
-  version "0.1.108"
-  resolved "https://registry.yarnpkg.com/quasar-form-builder/-/quasar-form-builder-0.1.108.tgz#47c1e5a6bd5b1f6bf9e4806487ec9f435a44e68c"
-  integrity sha512-vnVKFXQpuwLmm5aeRE9fEOgugwqcRPzdZDoR40cjE/Hh0WzPQL+mFnFYiRgAGqIiIR6bt3i/6vZNZHYZpjlLxA==
+quasar-form-builder@^0.1.110:
+  version "0.1.110"
+  resolved "https://registry.yarnpkg.com/quasar-form-builder/-/quasar-form-builder-0.1.110.tgz#cdc1baf57bf9567387803d44ea4ff5a1acdda024"
+  integrity sha512-7Q8FZFgXu7FlV9Gqf06+efLEl3OptHcG6cC6Sps97GJ8/q3/1NcTFu8PEoQKQkBWDA4ZSaz+9fv2aRJLvWM8lA==
   dependencies:
     "@quasar/extras" "^1.16.5"
     core-js "^3.31.1"