|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="classroom-card row">
|
|
|
|
|
|
|
+ <q-card-section class="classroom-card row">
|
|
|
<div class="right-side col-6">
|
|
<div class="right-side col-6">
|
|
|
<img class="thumbnail"
|
|
<img class="thumbnail"
|
|
|
:src="registration.classroom_info.thumbnail">
|
|
:src="registration.classroom_info.thumbnail">
|
|
@@ -10,10 +10,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="left-side col-6">
|
|
<div class="left-side col-6">
|
|
|
<div class="title-box">
|
|
<div class="title-box">
|
|
|
- <q-banner class="banner">{{ registration.classroom_info.title }}</q-banner>
|
|
|
|
|
- {{ getHoldingType(registration.classroom_info.holding_type) }}
|
|
|
|
|
- |
|
|
|
|
|
- {{ registration.classroom_info.sessions_count }} جلسه
|
|
|
|
|
|
|
+ <q-banner class="banner">{{ convertClassroomTitle(registration.classroom_info.title) }}</q-banner>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{ getClassroomTitleCaption(registration.classroom_info.title) }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{ getHoldingType(registration.classroom_info.holding_type) }}
|
|
|
|
|
+ |
|
|
|
|
|
+ {{ registration.classroom_info.sessions_count }} جلسه
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="status-box">
|
|
<div class="status-box">
|
|
|
<div class="registration-status-box">
|
|
<div class="registration-status-box">
|
|
@@ -28,7 +33,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </q-card-section>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -104,6 +109,24 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getClassroomTitleCaption(title) {
|
|
|
|
|
+ const match = title.match(/^(.*?)\s*\((.*?)\)$/)
|
|
|
|
|
+ if (match) {
|
|
|
|
|
+ const insideParenthesis = match[2]
|
|
|
|
|
+ return `${insideParenthesis}`
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return ''
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ convertClassroomTitle(title) {
|
|
|
|
|
+ const match = title.match(/^(.*?)\s*\((.*?)\)$/)
|
|
|
|
|
+ if (match) {
|
|
|
|
|
+ const beforeParenthesis = match[1]
|
|
|
|
|
+ return `${beforeParenthesis}`
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return title
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
getTitledDateTime (dateTime) {
|
|
getTitledDateTime (dateTime) {
|
|
|
return ShamsiDate.getTitledDateTime(dateTime)
|
|
return ShamsiDate.getTitledDateTime(dateTime)
|
|
|
},
|
|
},
|
|
@@ -228,18 +251,21 @@ export default {
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
.classroom-card {
|
|
.classroom-card {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- margin-bottom: 8px;
|
|
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
|
align-self: stretch;
|
|
align-self: stretch;
|
|
|
- border-radius: 8px;
|
|
|
|
|
- background: #FFF;
|
|
|
|
|
- box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
|
|
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ :deep(.q-card__section--vert){
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .q-card__section.q-card__section--vert.classroom-card.row {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ }
|
|
|
.right-side {
|
|
.right-side {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
|
- padding: 0 4px;
|
|
|
|
|
|
|
+ padding: 0 4px 0 0;
|
|
|
|
|
|
|
|
.thumbnail {
|
|
.thumbnail {
|
|
|
max-width: 100%;
|
|
max-width: 100%;
|
|
@@ -250,11 +276,10 @@ export default {
|
|
|
.q-btn {
|
|
.q-btn {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
height: 48px;
|
|
height: 48px;
|
|
|
- padding: 8px 24px;
|
|
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
align-self: stretch;
|
|
align-self: stretch;
|
|
|
- border-radius: 0 0 0 8px;
|
|
|
|
|
|
|
+ border-radius: 0 0 0 4px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.left-side {
|
|
.left-side {
|
|
@@ -263,7 +288,7 @@ export default {
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
align-items: flex-end;
|
|
align-items: flex-end;
|
|
|
- gap: 12px;
|
|
|
|
|
|
|
+ gap: 16px;
|
|
|
align-self: stretch;
|
|
align-self: stretch;
|
|
|
|
|
|
|
|
.title-box {
|
|
.title-box {
|
|
@@ -272,6 +297,7 @@ export default {
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
|
align-self: stretch;
|
|
align-self: stretch;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
|
|
|
:deep(.q-banner) {
|
|
:deep(.q-banner) {
|
|
|
padding: 8px 4px;
|
|
padding: 8px 4px;
|