Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
feat: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKanera committed Jan 25, 2021
1 parent 28d524f commit cbbccb5
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions components/chips/chips.sass
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
@apply bg-ps-primary text-ps-white
@apply border-ps-green border-b-2 border-solid

min-height: 40px

.chip
@apply flex items-center select-none
@apply px-2 py-1 m-1
Expand Down
8 changes: 6 additions & 2 deletions components/chips/chips.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
.chip-container
.chip(v-for='(chip, index) in chips', :key='index')
span {{ chip }}
.close-btn(@click='removeChip(index)')
.close-btn(v-if='edittable', @click='removeChip(index)')
closeIcon(:size='18')/
input(v-model='currentInput', @keydown.enter='addChip', @keydown.tab.prevent='addChip', @keydown.delete='backspaceRemove')
input(v-if='edittable', v-model='currentInput', @keydown.enter='addChip', @keydown.tab.prevent='addChip', @keydown.delete='backspaceRemove')
.mt-1.text-sm.text-ps-white.ml-auto.float-right Klíčové slovo potvrdíš tabem/enterem
</template>

Expand All @@ -27,6 +27,10 @@ export default defineComponent({
type: String,
default: '',
},
edittable: {
type: Boolean,
default: true,
},
},
setup(props, { emit }) {
watch(props, (newProps) => {
Expand Down
2 changes: 1 addition & 1 deletion components/my-project/my-project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
.ml-2.underline {{ file.fileName }}
ps-btn(v-if='modificable', text, @click='removeFile(file.filePath)', :disabled='removing', :loading='removing')
bin-icon(:size='20')
ps-chips(v-model='keywordsRef', placeholder='Klíčová slova')
ps-chips(v-model='keywordsRef', :edittable='modificable', placeholder='Klíčová slova')
.mt-8.w-full.flex.flex.justify-center
ps-btn.mr-4(@click='saveChanges', :disabled='awaiting || submittedRef || !modificable', :loading='awaiting') Uložit
ps-btn.ml-4(@click='checkModal', :disabled='awaiting || submittedRef || !modificable', :loading='awaiting') Odevzdat
Expand Down
2 changes: 1 addition & 1 deletion components/ui/tabs/tabs.sass
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@apply mb-4 px-5 py-1
@apply bg-ps-secondary shadow rounded-lg cursor-pointer
@apply text-ps-white capitalize
@apply flex flex justify-center
@apply flex flex justify-center items-center

transition: border ease-in .1s

Expand Down
2 changes: 0 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export default defineComponent({
for (let i = 0; i < 5; i++) {
const year = (new Date().getFullYear() + i).toString();
console.log(year);
graduationYears.value.push({
placeholder: year,
value: year,
Expand Down
4 changes: 2 additions & 2 deletions pages/students.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)
ps-tabs(:tabs='extern ? ["oponent"] : ["studenti", "předpřipravené zadání", "oponent"]', :selected='selectedTab', @selected='setTab')
ps-tab(v-if='!extern', :active='selectedTab == "studenti"')
.flex.justify-between
.flex.justify-between(v-if='projects.length > 0')
span.text-2xl.text-ps-white.font-medium Moji studenti
.flex.flex-col.mt-4.flex-wrap.justify-between(class='lg:flex-row')
ps-teacher-project(
Expand All @@ -29,7 +29,7 @@
:teacher='project.teacher',
:opponent='project.opponent'
)
.flex.justify-between.mt-2
.flex.justify-between.mt-2(v-if='submittedProjects.length > 0')
span.text-2xl.text-ps-white.font-medium Projekty k hodnocení
.flex.flex-col.mt-4.flex-wrap.justify-between(class='lg:flex-row')
ps-teacher-project(
Expand Down
2 changes: 1 addition & 1 deletion server/api/proposal/accept.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default async (req: Request, res: Response) => {
try {
await admin.firestore().runTransaction(async (transaction) => {
const sfDoc = await transaction.get(proposalRef);
const userDoc = await transaction.get(admin.firestore().collection('users').doc(sfDoc.data()?.currentYear));
const userDoc = await transaction.get(admin.firestore().collection('users').doc(sfDoc.data()?.studentId));

const projectRef = admin.firestore().collection('projects').doc();

Expand Down

0 comments on commit cbbccb5

Please sign in to comment.