Skip to content
Snippets Groups Projects
Commit 768ef788 authored by Titus Netland's avatar Titus Netland
Browse files

Merge branch 'main' into 'add-new-item-groups'

# Conflicts:
#   src/components/ItemComponents/NewItemForm.vue
parents 5b25b4f8 35ae8b32
No related branches found
No related tags found
1 merge request!76new item with communities
Pipeline #179371 failed
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="flex items-center justify-between mx-4"> <div class="flex items-center justify-between mx-4">
<div class="flex-1 min-w-0"> <div class="flex-1 min-w-0">
<h2 <h2
class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:truncate" class="text-xl md:text-2xl text-gray-600 font-medium w-full sm:truncate"
> >
{{ community.name }} {{ community.name }}
</h2> </h2>
......
<template> <template>
<div class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full p-4"> <div class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full p-4">
<!-- Component heading --> <!-- Component heading -->
<h3 <div
class="text-xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8" class="text-xl md:text-2xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-10"
> >
Opprett ny gruppe Opprett ny gruppe
</h3> </div>
<!-- Radio boxes --> <!-- Radio boxes -->
<div class="mt-6"> <div class="mt-6">
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
<div class="mt-6" :class="{ error: v$.group.place.$errors.length }"> <div class="mt-6" :class="{ error: v$.group.place.$errors.length }">
<label <label
class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
id="positionLabel"
>By/Sted</label >By/Sted</label
> >
<input <input
......
<template> <template>
<div class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full"> <div class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full">
<div class="px-6 py-4 mt-4"> <div class="px-6 py-4 mt-4">
<h3 <div
class="text-xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8" class="text-xl md:text-2xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8"
> >
Logg på Logg på
</h3> </div>
<div> <div>
<div <div
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full p-4" class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full p-4"
> >
<h3 class="text-xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8">Endre passord</h3> <div class="text-2xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8">Endre passord</div>
<div <div
id="firstPasswordField" id="firstPasswordField"
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<div <div
class="w-full max-w-md mx-auto mb-auto md:ring-1 ring-gray-300 overflow-hidden rounded-xl p-4" class="w-full max-w-md mx-auto mb-auto md:ring-1 ring-gray-300 overflow-hidden rounded-xl p-4"
> >
<h3 <div
class="text-xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8" class="text-xl md:text-2xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8" id="registerLabel"
> >
Opprett ny bruker Opprett ny konto
</h3> </div>
<form @submit.prevent> <form @submit.prevent>
<div class="grid grid-cols-1 gap-6 mt-4"> <div class="grid grid-cols-1 gap-6 mt-4">
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
</div> </div>
<div class="flex justify-end mt-6"> <div class="flex justify-end mt-6">
<Button @click="submit" :text="'Lagre'"></Button> <Button @click="submit" :text="'Opprett'"></Button>
</div> </div>
</form> </form>
</div> </div>
......
<template> <template>
<div class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full p-4"> <div class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full p-4">
<h3 class="text-xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8">Glemt passordet ditt?</h3> <div class="text-2xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8">Glemt passordet ditt?</div>
<div <div
id="emailField" id="emailField"
......
<template> <template>
<div class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full p-4"> <div class="md:ring-1 ring-gray-300 rounded-xl overflow-hidden mx-auto mb-auto max-w-md w-full p-4">
<!-- Component heading --> <!-- Component heading -->
<h3 class="text-xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-8">Opprett ny utleie</h3> <div class="text-xl md:text-2xl font-medium text-center text-gray-600 dark:text-gray-200 mt-4 mb-10">Opprett ny utleie</div>
<!-- Title --> <!-- Title -->
<div class="mb-6" :class="{ error: v$.item.title.$errors.length }"> <div class="mb-6" :class="{ error: v$.item.title.$errors.length }">
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
class="block w-full px-4 py-2 mt-2 text-gray-700 placeholder-gray-500 bg-white border rounded-md dark:bg-gray-800 dark:border-gray-600 dark:placeholder-gray-400 focus:border-primary-light dark:focus:border-primary-light focus:ring-opacity-40 focus:outline-none focus:ring focus:ring-primary-light" class="block w-full px-4 py-2 mt-2 text-gray-700 placeholder-gray-500 bg-white border rounded-md dark:bg-gray-800 dark:border-gray-600 dark:placeholder-gray-400 focus:border-primary-light dark:focus:border-primary-light focus:ring-opacity-40 focus:outline-none focus:ring focus:ring-primary-light"
> >
<option class="text-gray-400" value="" disabled selected> <option class="text-gray-400" value="" disabled selected>
Select a category Velg en kategori
</option> </option>
<option <option
v-for="category in categories" v-for="category in categories"
...@@ -69,8 +69,27 @@ ...@@ -69,8 +69,27 @@
<!-- Select Group --> <!-- Select Group -->
<div class="mb-6"> <div class="mb-6">
<label <label
class="block text-sm font-medium text-gray-900 dark:text-gray-400" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-400"
>Grupper</label> id="selectCommunityLabel"
>Gruppe</label
>
<select
v-model="v$.item.selectGroup.$model"
class="block w-full px-4 py-2 mt-2 text-gray-700 placeholder-gray-500 bg-white border rounded-md dark:bg-gray-800 dark:border-gray-600 dark:placeholder-gray-400 focus:border-primary-light dark:focus:border-primary-light focus:ring-opacity-40 focus:outline-none focus:ring focus:ring-primary-light"
>
<option class="text-gray-400" value="" disabled selected>
Velg en gruppe
</option>
<option
v-for="group in groups"
:key="group"
class="text-gray-900 text-sm"
>
{{ group }}
</option>
</select>
<!-- error message for select box -->
<div <div
class="overflow-auto w-full h-32 mt-2 text-base list-none bg-white rounded divide-y divide-gray-100 dark:bg-gray-700" class="overflow-auto w-full h-32 mt-2 text-base list-none bg-white rounded divide-y divide-gray-100 dark:bg-gray-700"
> >
...@@ -152,6 +171,7 @@ ...@@ -152,6 +171,7 @@
<div class="mb-6" :class="{ error: v$.item.address.$errors.length }"> <div class="mb-6" :class="{ error: v$.item.address.$errors.length }">
<label <label
class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
id="addressLabel"
>Adresse</label >Adresse</label
> >
<input <input
......
<template> <template>
<div v-if="loggedIn"> <div v-if="loggedIn">
<div class="flex flex-row p-4 relative"> <div class="flex flex-row p-4 relative">
<p class="capitalize font-bold w-full">Mine felleskap</p> <div class="text-xl md:text-2xl text-gray-600 font-medium w-full">Mine grupper</div>
<UserAddIcon <UserAddIcon
class="cursor-pointer max-h-6 max-w-6 float-right grow" class="cursor-pointer max-h-6 max-w-6 float-right grow"
@click="$router.push('/newCommunity')" @click="$router.push('/newCommunity')"
v-if="loggedIn" alt="Opprett ny gruppe"
alt="Lag ett nytt felleskap"
/> />
</div> </div>
<CommunityList :communities="myCommunities" :member="true"/> <CommunityList :communities="myCommunities" :member="true"/>
</div> </div>
<p class="capitalize font-bold w-full p-4">Offentlige felleskap</p> <p class="text-xl md:text-2xl text-gray-600 font-medium w-full p-4">Offentlige grupper</p>
<CommunityList :communities="publicCommunities" :member="false"/> <CommunityList :communities="publicCommunities" :member="false"/>
</template> </template>
......
...@@ -17,7 +17,7 @@ describe("RegisterFormComponent", () => { ...@@ -17,7 +17,7 @@ describe("RegisterFormComponent", () => {
}); });
it("renders the h2 text correctly", () => { it("renders the h2 text correctly", () => {
expect(wrapper.find("h3").text()).toBe("Opprett ny bruker"); expect(wrapper.find("#registerLabel").text()).toBe("Opprett ny konto");
}); });
it("has a button", () => { it("has a button", () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment