show.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. <template>
  2. <q-card class="AdminClassroomShow">
  3. <q-tabs v-model="tab"
  4. dense
  5. class="text-grey"
  6. active-color="primary"
  7. indicator-color="primary"
  8. align="justify"
  9. narrow-indicator>
  10. <q-tab name="classroomInfo"
  11. label="مشخصات" />
  12. <q-tab name="educations"
  13. label="لیست جلسات" />
  14. <q-tab name="movies1"
  15. label="پروژه‌ها" />
  16. <q-tab name="movies2"
  17. label="آزمون" />
  18. <q-tab name="members"
  19. label="اندیشه جویان" />
  20. <q-tab name="live_streaming_url"
  21. label="بخش آنلاین" />
  22. </q-tabs>
  23. <q-separator />
  24. <q-tab-panels v-model="tab"
  25. animated>
  26. <q-tab-panel name="classroomInfo"
  27. class="q-pa-none">
  28. <entity-edit v-if="mounted"
  29. ref="classroomEntityEdit"
  30. :key="classroomEntityEditKey"
  31. v-model:value="inputs"
  32. title="مشخصات دوره آموزشی"
  33. :api="api"
  34. :entity-id-key="entityIdKey"
  35. :entity-param-key="entityParamKey"
  36. :show-route-name="showRouteName"
  37. :show-close-button="false"
  38. :show-edit-button="false"
  39. :show-expand-button="false"
  40. :show-save-button="false"
  41. :show-reload-button="false"
  42. :after-load-input-data="afterLoadInputData">
  43. <template #after-form-builder>
  44. <div class="flex justify-end">
  45. <q-btn color="primary"
  46. label="بروزرسانی اطلاعات"
  47. @click="updateClassroom" />
  48. </div>
  49. </template>
  50. </entity-edit>
  51. <q-skeleton v-else
  52. type="rect"
  53. height="200px" />
  54. </q-tab-panel>
  55. <q-tab-panel name="educations"
  56. class="q-pa-none">
  57. <entity-index v-if="mounted"
  58. v-model:value="sessionListInputs"
  59. title="لیست جلسات"
  60. :api="sessionListApi"
  61. :table="sessionListTable"
  62. :table-keys="sessionListTableKeys"
  63. :show-search-button="false"
  64. :show-reload-button="false"
  65. :show-expand-button="false">
  66. <template v-slot:entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
  67. <template v-if="inputData.col.name === 'actions'">
  68. <div class="action-column-entity-index">
  69. <q-btn size="md"
  70. color="primary"
  71. label="جزییات"
  72. :to="{name: 'Admin.Session.Show', params: {id: inputData.props.row.id}}"
  73. class="q-mr-md" />
  74. <delete-btn @click="showConfirmRemoveDialog(inputData.props.row, 'id', getRemoveMessage(inputData.props.row))" />
  75. </div>
  76. </template>
  77. <template v-else>
  78. {{ inputData.col.value }}
  79. </template>
  80. </template>
  81. </entity-index>
  82. <q-skeleton v-else
  83. type="rect"
  84. height="200px" />
  85. </q-tab-panel>
  86. <q-tab-panel name="movies1">
  87. پروژه‌ها
  88. </q-tab-panel>
  89. <q-tab-panel name="movies2">
  90. آزمون
  91. </q-tab-panel>
  92. <q-tab-panel name="members"
  93. class="q-pa-none">
  94. <entity-index v-if="mounted"
  95. ref="membersList"
  96. v-model:value="membersListInputs"
  97. title="لیست کاربران"
  98. :api="membersListApi"
  99. :table="membersListTable"
  100. :table-keys="membersListTableKeys"
  101. :show-search-button="false"
  102. :show-reload-button="false"
  103. :show-expand-button="false">
  104. <template v-slot:entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
  105. <template v-if="inputData.col.name === 'actions'">
  106. <div class="action-column-entity-index">
  107. <q-btn size="md"
  108. color="primary"
  109. outline
  110. label="سابقه آموزشی"
  111. class="q-mr-md" />
  112. <!-- :to="{name: 'Admin.Session.Show', params: {id: inputData.props.row.id}}"-->
  113. <delete-btn @click="showConfirmRemoveDialog(inputData.props.row, 'id', getRemoveMessage(inputData.props.row))" />
  114. </div>
  115. </template>
  116. <template v-else>
  117. {{ inputData.col.value }}
  118. </template>
  119. </template>
  120. </entity-index>
  121. <q-skeleton v-else
  122. type="rect"
  123. height="200px" />
  124. </q-tab-panel>
  125. <q-tab-panel name="live_streaming_url">
  126. <q-btn class="full-width q-mb-lg"
  127. color="primary"
  128. @click="goToLiveStreamUrl">
  129. رفتن به کلاس
  130. </q-btn>
  131. <iframe :src="classroom.live_streaming_url"
  132. title="W3Schools Free Online Web Tutorials"
  133. style="height: 80vh"
  134. class="full-width" />
  135. </q-tab-panel>
  136. </q-tab-panels>
  137. </q-card>
  138. </template>
  139. <script>
  140. import { shallowRef } from 'vue'
  141. import Enums from 'src/assets/Enums/Enums.js'
  142. import ShamsiDate from 'src/assets/ShamsiDate.js'
  143. import { APIGateway } from 'src/api/APIGateway.js'
  144. import { Classroom } from 'src/models/Classroom.js'
  145. import { EntityEdit, EntityIndex } from 'quasar-crud'
  146. import { FormBuilderAssist } from 'quasar-form-builder'
  147. import BtnControl from 'src/components/Control/btn.vue'
  148. import DeleteBtn from 'src/components/Control/DeleteBtn.vue'
  149. const BtnControlComp = shallowRef(BtnControl)
  150. export default {
  151. name: 'Admin.Classroom.Show',
  152. components: {
  153. EntityEdit,
  154. EntityIndex,
  155. DeleteBtn
  156. },
  157. data () {
  158. return {
  159. mounted: false,
  160. classroomEntityEditKey: Date.now(),
  161. tab: 'classroomInfo',
  162. api: null,
  163. entityIdKey: 'id',
  164. entityParamKey: 'id',
  165. showRouteName: 'Admin.Classroom.Show',
  166. inputs: [
  167. { type: 'separator', name: 'space', label: 'مشخصات دوره', className: 'custom-separator', col: 'col-12' },
  168. { type: 'file', name: 'thumbnail', responseKey: 'thumbnail', label: 'آپلود عکس دوره', col: 'col-md-3 col-12' },
  169. { type: 'separator', name: 'space', size: '0', col: 'col-md-12' },
  170. { type: 'select', name: 'category', responseKey: 'unit_info.category_info.id', options: [], value: null, placeholder: ' ', label: 'دسته بندی', col: 'col-md-3 col-12' },
  171. { type: 'select', name: 'unit', responseKey: 'unit', options: [], value: null, placeholder: ' ', label: 'درس', col: 'col-md-3 col-12' },
  172. { type: 'select', name: 'holding_type', responseKey: 'holding_type', options: Enums.classroomHoldingTypes, value: null, placeholder: ' ', label: 'نوع برگزاری', col: 'col-md-3 col-12' },
  173. { type: 'input', name: 'price', responseKey: 'price', placeholder: ' ', label: 'هزینه برگزاری', col: 'col-md-3 col-12' },
  174. { type: 'input', name: 'live_streaming_url', responseKey: 'live_streaming_url', placeholder: ' ', label: 'لینک مکان مجازی دوره', col: 'col-12' },
  175. { type: 'inputEditor', name: 'classroom_address', responseKey: 'classroom_address', placeholder: ' ', label: 'آدرس مکان فیزیکی دوره', col: 'col-12' },
  176. {
  177. type: 'select',
  178. name: 'holding_year',
  179. responseKey: 'holding_year',
  180. options: [1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410],
  181. value: null,
  182. label: 'انتخاب سال دوره',
  183. placeholder: ' ',
  184. col: 'col-md-3'
  185. },
  186. {
  187. type: 'select',
  188. name: 'holding_month',
  189. responseKey: 'holding_month',
  190. options: [
  191. 'فروردین',
  192. 'اردیبهشت',
  193. 'خرداد',
  194. 'تیر',
  195. 'مرداد',
  196. 'شهریور',
  197. 'مهر',
  198. 'آبان',
  199. 'آذر',
  200. 'دی',
  201. 'بهمن',
  202. 'اسفند'
  203. ],
  204. value: null,
  205. label: 'انتخاب ماه دوره',
  206. placeholder: ' ',
  207. col: 'col-md-3'
  208. },
  209. { type: 'input', name: 'sessions_frequency', responseKey: 'sessions_frequency', placeholder: ' ', label: 'دوره تناوب', col: 'col-12' },
  210. { type: 'select', name: 'professor', responseKey: 'professor', options: [], value: null, placeholder: ' ', label: 'استاد دوره', col: 'col-md-3 col-12' },
  211. { type: 'separator', name: 'space', label: 'مشخصات اندیشه جو', className: 'custom-separator', col: 'col-12' },
  212. { type: 'select', name: 'audience_status_wwwww', responseKey: 'audience_status_wwwww', options: [], placeholder: ' ', label: 'وضعیت(؟)', col: 'col-md-3 col-12' },
  213. { type: 'select', name: 'category', responseKey: 'category', options: [], placeholder: ' ', label: 'مجموعه(؟)', col: 'col-md-3 col-12' },
  214. { type: 'select', name: 'audience_gender_type', responseKey: 'audience_gender_type', options: Enums.genders, placeholder: ' ', label: 'جنسیت', col: 'col-md-3 col-12' },
  215. { type: 'select', name: 'audience_bashgah_wwwww', responseKey: 'audience_bashgah_wwwww', options: [], placeholder: ' ', label: 'باشگاه(؟)', col: 'col-md-3 col-12' },
  216. { type: 'separator', name: 'space', label: 'تنظیمات دوره', className: 'custom-separator', col: 'col-12' },
  217. { type: 'input', name: 'capacity', responseKey: 'capacity', placeholder: ' ', label: 'ظرفیت گروه درسی', col: 'col-md-3 col-12' },
  218. { type: 'input', name: 'allowed_absence_count', responseKey: 'allowed_absence_count', placeholder: ' ', label: 'تعداد مجاز غیبت', col: 'col-md-3 col-12' },
  219. { type: 'input', name: 'effective_absence_coefficient', responseKey: 'effective_absence_coefficient', placeholder: ' ', label: 'ضریب نمره حضور و غیاب', col: 'col-md-3 col-12' },
  220. { type: 'input', name: 'mandatory_assignment_count', responseKey: 'mandatory_assignment_count', placeholder: ' ', label: 'تعداد تکالیف اجباری', col: 'col-md-3 col-12' },
  221. { type: 'input', name: 'special_passing_mark', responseKey: 'special_passing_mark', placeholder: ' ', label: 'نمره قبولی مشروطی ها', col: 'col-md-3 col-12' },
  222. { type: 'input', name: 'minimum_conditional_passing_mark', responseKey: 'minimum_conditional_passing_mark', placeholder: ' ', label: 'نمره قبولی مشروط', col: 'col-md-3 col-12' },
  223. { type: 'input', name: 'minimum_clean_passing_mark', responseKey: 'minimum_clean_passing_mark', placeholder: ' ', label: 'نمره قبولی', col: 'col-md-3 col-12' },
  224. { type: 'separator', name: 'space', label: 'ثبت نام و حذف و اضافه', className: 'custom-separator', col: 'col-12' },
  225. { type: 'dateTime', name: 'beginning_enrollment_period', responseKey: 'beginning_enrollment_period', placeholder: ' ', label: 'تاریخ شروع پیش ثبت نام', col: 'col-md-6 col-12' },
  226. { type: 'dateTime', name: 'ending_enrollment_period', responseKey: 'ending_enrollment_period', placeholder: ' ', label: 'تاریخ پایان پیش ثبت نام', col: 'col-md-6 col-12' },
  227. { type: 'dateTime', name: 'beginning_registration_period', responseKey: 'beginning_registration_period', placeholder: ' ', label: 'تاریخ شروع ثبت نام', col: 'col-md-6 col-12' },
  228. { type: 'dateTime', name: 'ending_registration_period', responseKey: 'ending_registration_period', placeholder: ' ', label: 'تاریخ پایان ثبت نام', col: 'col-md-6 col-12' },
  229. { type: 'input', name: 'registration_period_refund_percent', responseKey: 'registration_period_refund_percent', placeholder: ' ', label: 'درصد برگشت هزینه انصراف در بازه ثبت نام', col: 'col-md-3 col-12' },
  230. { type: 'checkbox', name: 'allow_dropping_on_drop_add_period', responseKey: 'allow_dropping_on_drop_add_period', label: 'امکان انصراف در بازه ثبت نام', col: 'col-md-9 col-12' },
  231. { type: 'dateTime', name: 'beginning_drop_add_period', responseKey: 'beginning_drop_add_period', placeholder: ' ', label: 'تاریخ شروع حذف و اضافه', col: 'col-md-6 col-12' },
  232. { type: 'dateTime', name: 'ending_drop_add_period', responseKey: 'ending_drop_add_period', placeholder: ' ', label: 'تاریخ پایان حذف و اضافه', col: 'col-md-6 col-12' },
  233. { type: 'input', name: 'drop_add_period_refund_percent', responseKey: 'drop_add_period_refund_percent', placeholder: ' ', label: 'درصد برگشت هزینه انصراف در بازه حذف و اضافه', col: 'col-md-3 col-12' },
  234. { type: 'checkbox', name: 'allow_dropping_on_drop_add_period', responseKey: 'allow_dropping_on_drop_add_period', label: 'امکان انصراف در بازه ثبت نام', col: 'col-md-3 col-12' },
  235. { type: 'checkbox', name: 'allow_dropping_on_drop_add_period', responseKey: 'allow_dropping_on_drop_add_period', label: 'امکان انصراف در بازه ثبت نام', col: 'col-md-6 col-12' },
  236. { type: 'dateTime', name: 'publish_time', responseKey: 'publish_time', placeholder: ' ', label: 'تاریخ انتشار', col: 'col-md-6 col-12' },
  237. { type: 'separator', name: 'space', label: 'قوانین', className: 'custom-separator', col: 'col-12' },
  238. { type: 'inputEditor', name: 'rules', responseKey: 'rules', label: 'قوانین دوره آموزشی', col: 'col-12' },
  239. // -----------------------------------------------------------------------------------------------------------
  240. { type: 'separator', name: 'space', label: 'موارد زیر در طرح نبودند', className: 'custom-separator', col: 'col-12' },
  241. { type: 'select', name: 'audience_role', responseKey: 'audience_role', options: Enums.groups, placeholder: ' ', label: 'نقش', col: 'col-md-4 col-12' },
  242. { type: 'inputEditor', name: 'description', responseKey: 'description', label: '??توضیحات', col: 'col-12' },
  243. { type: 'hidden', name: 'id', responseKey: 'id', label: 'id', col: 'col-md-3 col-12' }
  244. ],
  245. classroom: new Classroom(),
  246. sessionListInputs: [
  247. { type: 'hidden', name: 'classroom', value: this.$route.params.id, label: 'نام دوره', col: 'col-12' }
  248. ],
  249. sessionListApi: APIGateway.session.APIAdresses.base,
  250. sessionListTable: {
  251. columns: [
  252. {
  253. name: 'id',
  254. required: true,
  255. label: 'شماره',
  256. align: 'left',
  257. field: row => row.id
  258. },
  259. {
  260. name: 'title',
  261. required: true,
  262. label: 'عنوان جلسه',
  263. align: 'left',
  264. field: row => row.title
  265. },
  266. {
  267. name: 'creation_time',
  268. required: true,
  269. label: 'زمان شروع جلسه',
  270. align: 'left',
  271. field: row => row.starting_time ? ShamsiDate.getDateTime(row.starting_time) : '-'
  272. },
  273. {
  274. name: 'last_modification_time',
  275. required: true,
  276. label: 'زمان پایان جلسه',
  277. align: 'left',
  278. field: row => row.ending_time ? ShamsiDate.getDateTime(row.ending_time) : '-'
  279. },
  280. {
  281. name: 'actions',
  282. required: true,
  283. label: 'عملیات',
  284. align: 'left',
  285. field: ''
  286. }
  287. ],
  288. data: []
  289. },
  290. sessionListTableKeys: {
  291. data: 'results',
  292. total: 'count',
  293. currentPage: 'current',
  294. perPage: 'per_page',
  295. pageKey: 'page'
  296. },
  297. membersListInputs: [
  298. { type: 'select', name: 'classroom', value: null, label: 'وضعیت', placeholder: ' ', col: 'col-md-3 col-12' },
  299. { type: BtnControlComp, name: 'btn', label: 'جستجو', placeholder: ' ', atClick: () => {}, col: 'col-md-2 col-12' }
  300. ],
  301. membersListApi: null,
  302. membersListTable: {
  303. columns: [
  304. {
  305. name: 'id',
  306. required: true,
  307. label: 'شماره',
  308. align: 'left',
  309. field: row => row.id
  310. },
  311. {
  312. name: 'owner_info.fullname',
  313. required: true,
  314. label: 'نام و نام خانوادگی',
  315. align: 'left',
  316. field: row => row.owner_info.firstname + ' ' + row.owner_info.lastname
  317. },
  318. {
  319. name: 'owner_info.fullname',
  320. required: true,
  321. label: 'کد ملی',
  322. align: 'left',
  323. field: row => row.owner_info.national_code
  324. },
  325. {
  326. name: 'is_project_done',
  327. required: true,
  328. label: 'پروژه',
  329. align: 'left',
  330. field: row => row.is_project_done
  331. },
  332. {
  333. name: 'done_assignment_count',
  334. required: true,
  335. label: 'تکالیف انجام شده',
  336. align: 'left',
  337. field: row => row.done_assignment_count
  338. },
  339. {
  340. name: 'is_allowed_absence_count',
  341. required: true,
  342. label: 'حضور و غیاب',
  343. align: 'left',
  344. field: row => row.is_allowed_absence_count // bool
  345. },
  346. {
  347. name: 'attendance_score',
  348. required: true,
  349. label: 'نمره حضور و غیاب',
  350. align: 'left',
  351. field: row => row.attendance_score
  352. },
  353. {
  354. name: 'final_test',
  355. required: true,
  356. label: 'آزمون',
  357. align: 'left',
  358. field: row => row.final_test // number - null
  359. },
  360. {
  361. name: 'final_status',
  362. required: true,
  363. label: 'وضعیت نهایی',
  364. align: 'left',
  365. field: row => row.final_status
  366. },
  367. {
  368. name: 'actions',
  369. required: true,
  370. label: 'سابقه آموزشی',
  371. align: 'left',
  372. field: ''
  373. }
  374. ],
  375. data: []
  376. },
  377. membersListTableKeys: {
  378. data: 'results',
  379. total: 'count',
  380. currentPage: 'current',
  381. perPage: 'per_page',
  382. pageKey: 'page'
  383. }
  384. }
  385. },
  386. computed: {
  387. selectedCategoryId () {
  388. return this.getInputValue('category')
  389. }
  390. },
  391. watch: {
  392. selectedCategoryId () {
  393. if (!this.mounted) {
  394. return
  395. }
  396. this.setInputValue('unit', null)
  397. this.getUnits(this.selectedCategoryId)
  398. }
  399. },
  400. mounted () {
  401. this.api = APIGateway.classroom.APIAdresses.byId(this.$route.params.id)
  402. this.membersListApi = APIGateway.classroom.APIAdresses.members(this.$route.params.id)
  403. this.preLoadData()
  404. .then(() => {
  405. this.mounted = true
  406. })
  407. .catch(() => {
  408. this.mounted = true
  409. })
  410. },
  411. methods: {
  412. setMembersListActionBtn () {
  413. FormBuilderAssist.setAttributeByName(this.membersListInputs, 'btn', 'atClick', this.searchMembersList)
  414. },
  415. searchMembersList () {
  416. this.$refs.membersList.search()
  417. },
  418. goToLiveStreamUrl () {
  419. window.open(this.classroom.live_streaming_url, '_blank')
  420. },
  421. afterLoadInputData (data) {
  422. this.classroom = new Classroom(data)
  423. // const gg = data.beginning_enrollment_period.replace('T', ' ')
  424. // this.setInputAttr('beginning_enrollment_period', 'value', gg)
  425. },
  426. setInputAttr (name, attr, value) {
  427. FormBuilderAssist.setAttributeByName(this.inputs, name, attr, value)
  428. // this.$refs.classroomEntityEdit.setInputAttributeByName(name, attr, value)
  429. },
  430. preLoadData () {
  431. return new Promise((resolve, reject) => {
  432. APIGateway.classroom.get(this.$route.params.id)
  433. .then((classroom) => {
  434. this.setInputAttr('category', 'value', classroom.unit_info.category_info.id)
  435. this.setInputAttr('unit', 'value', classroom.unit)
  436. this.beforeLoadInputData(classroom)
  437. .then((classroom) => {
  438. resolve()
  439. })
  440. .catch(() => {
  441. reject()
  442. })
  443. })
  444. .catch(() => {
  445. reject()
  446. })
  447. })
  448. },
  449. beforeLoadInputData (responseData) {
  450. return new Promise((resolve, reject) => {
  451. const promise1 = this.getProfessors()
  452. const promise2 = this.getCategories()
  453. const promise3 = this.getUnits(responseData.unit_info.category)
  454. this.$nextTick(() => {
  455. Promise.all([promise1, promise2, promise3])
  456. .then(() => {
  457. // this.setInputAttr('category', 'value', responseData.unit_info.category)
  458. // this.setInputAttr('unit', 'value', responseData.unit)
  459. this.classroomEntityEditKey = Date.now()
  460. resolve()
  461. })
  462. .catch(() => {
  463. reject()
  464. })
  465. })
  466. })
  467. },
  468. getProfessors () {
  469. return APIGateway.user.index({ per_page: 9999, role: 'professor' })
  470. .then((users) => {
  471. this.setInputAttr('professor', 'options', users.list.list.map(item => {
  472. return {
  473. value: item.id,
  474. label: this.getUserFullname(item)
  475. }
  476. }))
  477. })
  478. .catch(() => {})
  479. },
  480. getCategories () {
  481. return APIGateway.unitCategory.index({ per_page: 9999 })
  482. .then((categories) => {
  483. this.setInputAttr('category', 'options', categories.list.list.map(item => {
  484. return {
  485. value: item.id,
  486. label: item.title
  487. }
  488. }))
  489. })
  490. .catch(() => {})
  491. },
  492. getUnits (selectedcategoryId) {
  493. return APIGateway.unit.index({ per_page: 9999, category: selectedcategoryId })
  494. .then((units) => {
  495. this.setInputAttr('unit', 'options', units.list.list.map(item => {
  496. return {
  497. value: item.id,
  498. label: item.title
  499. }
  500. }))
  501. })
  502. .catch(() => {})
  503. },
  504. getUserFullname (user) {
  505. return user.firstname + ' ' + user.lastname
  506. },
  507. getSelectOptions (result, value, label) {
  508. return result.map(item => {
  509. return {
  510. value: item[value],
  511. label: item[label]
  512. }
  513. })
  514. },
  515. getInputValue (name) {
  516. const inputIndex = this.inputs.findIndex(input => input.name === name)
  517. return this.inputs[inputIndex].value
  518. },
  519. setInputValue (name, value) {
  520. const inputIndex = this.inputs.findIndex(input => input.name === name)
  521. this.inputs[inputIndex].value = value
  522. },
  523. loadSelectOptions (name, value, setNewInputData) {
  524. const inputIndex = this.inputs.findIndex(input => input.name === name)
  525. this.inputs[inputIndex].options = value
  526. if (typeof setNewInputData === 'function') {
  527. setNewInputData(this.inputs)
  528. }
  529. },
  530. updateClassroom () {
  531. this.$refs.classroomEntityEdit.editEntity()
  532. },
  533. getRemoveMessage (row) {
  534. return 'آیا از حذف ' + row.title + ' اطمینان دارید؟'
  535. }
  536. }
  537. }
  538. </script>
  539. <style lang="scss" scoped>
  540. .AdminClassroomShow {
  541. .action-column-entity-index {
  542. display: flex;
  543. align-items: center;
  544. justify-content: flex-start;
  545. }
  546. }
  547. </style>