Skip to content

Commit

Permalink
fix: frontend dependencies upgrade issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bayang committed Apr 20, 2024
1 parent a2b2c19 commit 78cf03b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/jelu-ui/src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ const submit = () => {
<o-input
v-model="form.login"
type="text"
value="john"
maxlength="50"
class="input focus:input-accent"
/>
Expand All @@ -146,7 +145,6 @@ const submit = () => {
<o-input
v-model="loginValidation"
type="text"
value="john"
maxlength="50"
class="input focus:input-accent"
/>
Expand All @@ -157,7 +155,6 @@ const submit = () => {
</label>
<o-input
v-model="form.password"
value="123"
type="password"
maxlength="150"
password-reveal
Expand All @@ -174,7 +171,6 @@ const submit = () => {
</label>
<o-input
v-model="passwordValidation"
value="123"
type="password"
maxlength="150"
password-reveal
Expand Down
14 changes: 8 additions & 6 deletions src/jelu-ui/src/components/UserModal.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<script setup lang="ts">
import { setErrors } from '@formkit/vue';
import { useProgrammatic } from "@oruga-ui/oruga-next";
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { UpdateUser, User } from "../model/User";
import { useStore } from 'vuex';
import { User } from "../model/User";
import dataService from "../services/DataService";
import { key } from '../store';
import { ObjectUtils } from "../utils/ObjectUtils";
import { useProgrammatic } from "@oruga-ui/oruga-next";
import { useStore } from 'vuex'
import { key } from '../store'
const { t } = useI18n({
inheritLocale: true,
Expand All @@ -20,7 +21,7 @@ const props = defineProps<{
currentUser: User,
}>()
const createUser: UpdateUser = {"password" : "", "isAdmin" : undefined}
const createUser = ref({"password" : "", "isAdmin" : undefined})
console.log(props.currentUser)
console.log(createUser)
Expand All @@ -31,9 +32,10 @@ const emit = defineEmits<{
async function editUser(user: any) {
console.log("edit user")
console.log(createUser)
console.log(user)
if (props.currentUser.id != null) {
try {
let modified = await dataService.updateUser(props.currentUser.id, createUser)
let modified = await dataService.updateUser(props.currentUser.id, {"isAdmin": user.isAdmin, "password": user.password})
store.commit('user', modified)
ObjectUtils.toast(oruga, "success", t('admin_user.user_updated', {name : props.currentUser.login}), 2500)
emit('close')
Expand Down

0 comments on commit 78cf03b

Please sign in to comment.