Generate question bank domain model from JDL

This commit is contained in:
jieun committed 2026-10-20 18:46:29 +09:00
1 parent 1d97cc4e31
commit 1d74d8f04b
160 files changed
+26900 -2

No files matched your search

@@ -0,0 +1,140 @@
<template>
<div>
<h2 id="page-heading" data-cy="ExamAttemptHeading">
<span id="exam-attempt">{{ t$('questionBankApp.examAttempt.home.title') }}</span>
<div class="d-flex justify-content-end">
<button class="btn btn-info me-2" @click="handleSyncList" :disabled="isFetching">
<font-awesome-icon icon="sync" :spin="isFetching"></font-awesome-icon>
<span>{{ t$('questionBankApp.examAttempt.home.refreshListLabel') }}</span>
</button>
<router-link :to="{ name: 'ExamAttemptCreate' }" custom v-slot="{ navigate }">
<button
@click="navigate"
id="jh-create-entity"
data-cy="entityCreateButton"
class="btn btn-primary jh-create-entity create-exam-attempt"
>
<font-awesome-icon icon="plus"></font-awesome-icon>
<span>{{ t$('questionBankApp.examAttempt.home.createLabel') }}</span>
</button>
</router-link>
</div>
</h2>
<br />
<div class="alert alert-warning" v-if="!isFetching && examAttempts?.length === 0">
<span>{{ t$('questionBankApp.examAttempt.home.notFound') }}</span>
</div>
<div class="table-responsive" v-if="examAttempts?.length > 0">
<table class="table table-striped" aria-describedby="examAttempts">
<thead>
<tr>
<th scope="col" @click="changeOrder('id')">
<span>{{ t$('global.field.id') }}</span>
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'id'"></jhi-sort-indicator>
</th>
<th scope="col" @click="changeOrder('startedAt')">
<span>{{ t$('questionBankApp.examAttempt.startedAt') }}</span>
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'startedAt'"></jhi-sort-indicator>
</th>
<th scope="col" @click="changeOrder('submittedAt')">
<span>{{ t$('questionBankApp.examAttempt.submittedAt') }}</span>
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'submittedAt'"></jhi-sort-indicator>
</th>
<th scope="col" @click="changeOrder('status')">
<span>{{ t$('questionBankApp.examAttempt.status') }}</span>
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'status'"></jhi-sort-indicator>
</th>
<th scope="col" @click="changeOrder('score')">
<span>{{ t$('questionBankApp.examAttempt.score') }}</span>
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'score'"></jhi-sort-indicator>
</th>
<th scope="col" @click="changeOrder('subject.name')">
<span>{{ t$('questionBankApp.examAttempt.subject') }}</span>
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'subject.name'"></jhi-sort-indicator>
</th>
<th scope="col" @click="changeOrder('user.login')">
<span>{{ t$('questionBankApp.examAttempt.user') }}</span>
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'user.login'"></jhi-sort-indicator>
</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr v-for="examAttempt in examAttempts" :key="examAttempt.id" data-cy="entityTable">
<td>
<router-link :to="{ name: 'ExamAttemptView', params: { examAttemptId: examAttempt.id } }">{{ examAttempt.id }}</router-link>
</td>
<td>{{ formatDateShort(examAttempt.startedAt) || '' }}</td>
<td>{{ formatDateShort(examAttempt.submittedAt) || '' }}</td>
<td>{{ t$('questionBankApp.AttemptStatus.' + examAttempt.status) }}</td>
<td>{{ examAttempt.score }}</td>
<td>
<div v-if="examAttempt.subject">
<router-link :to="{ name: 'SubjectView', params: { subjectId: examAttempt.subject.id } }">{{
examAttempt.subject.name
}}</router-link>
</div>
</td>
<td>
{{ examAttempt.user ? examAttempt.user.login : '' }}
</td>
<td class="text-end">
<div class="btn-group">
<router-link :to="{ name: 'ExamAttemptView', params: { examAttemptId: examAttempt.id } }" custom v-slot="{ navigate }">
<button @click="navigate" class="btn btn-info btn-sm details" data-cy="entityDetailsButton">
<font-awesome-icon icon="eye"></font-awesome-icon>
<span class="d-none d-md-inline">{{ t$('entity.action.view') }}</span>
</button>
</router-link>
<router-link :to="{ name: 'ExamAttemptEdit', params: { examAttemptId: examAttempt.id } }" custom v-slot="{ navigate }">
<button @click="navigate" class="btn btn-primary btn-sm edit" data-cy="entityEditButton">
<font-awesome-icon icon="pencil-alt"></font-awesome-icon>
<span class="d-none d-md-inline">{{ t$('entity.action.edit') }}</span>
</button>
</router-link>
<b-button @click="prepareRemove(examAttempt)" variant="danger" class="btn btn-sm" data-cy="entityDeleteButton">
<font-awesome-icon icon="times"></font-awesome-icon>
<span class="d-none d-md-inline">{{ t$('entity.action.delete') }}</span>
</b-button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<b-modal ref="removeEntity" id="removeEntity">
<template #title>
<span id="questionBankApp.examAttempt.delete.question" data-cy="examAttemptDeleteDialogHeading">{{
t$('entity.delete.title')
}}</span>
</template>
<div class="modal-body">
<p id="jhi-delete-examAttempt-heading">{{ t$('questionBankApp.examAttempt.delete.question', { id: removeId }) }}</p>
</div>
<template #footer>
<div>
<button type="button" class="btn btn-secondary" @click="closeDialog()">{{ t$('entity.action.cancel') }}</button>
<button
type="button"
class="btn btn-primary"
id="jhi-confirm-delete-examAttempt"
data-cy="entityConfirmDeleteButton"
@click="removeExamAttempt"
>
{{ t$('entity.action.delete') }}
</button>
</div>
</template>
</b-modal>
<div v-show="examAttempts?.length > 0">
<div class="d-flex justify-content-center">
<jhi-item-count :page="page" :total="queryCount" :items-per-page="itemsPerPage"></jhi-item-count>
</div>
<div class="d-flex justify-content-center">
<b-pagination size="md" :total-rows="totalItems" v-model="page" :per-page="itemsPerPage"></b-pagination>
</div>
</div>
</div>
</template>
<script lang="ts" src="./exam-attempt.component.ts"></script>