diff --git a/public/js/page.js b/public/js/page.js
index 4636356..8369647 100644
--- a/public/js/page.js
+++ b/public/js/page.js
@@ -22,7 +22,7 @@ export default function Page() {
{users.map((user) => (
// Assuming user object has a 'firstname' and 'lastname' field
- - {user.firstname} {user.lastname}
+ - {user.fornavn} {user.etternavn}
))}
diff --git a/public/live_view.html b/public/live_view.html
index a0cc74b..65d9341 100644
--- a/public/live_view.html
+++ b/public/live_view.html
@@ -127,7 +127,7 @@ Omegaauctionen
if (auctionItemDoc.data().fixedPrice) {
for (const buyer of auctionItemDoc.data().buyers) {
let user = await usersRef.doc(buyer).get();
- const fullName = `${user.data().firstname} ${user.data().lastname}`;
+ const fullName = `${user.data().fornavn} ${user.data().etternavn}`;
spenders[fullName] = (spenders[fullName] || 0) + auctionItemDoc.data().currentPrice;
total += auctionItemDoc.data().currentPrice;
@@ -137,7 +137,7 @@ Omegaauctionen
const userDoc = await usersRef.doc(auctionItemDoc.data().highestBidder).get();
if (userDoc.exists) {
- const fullName = `${userDoc.data().firstname} ${userDoc.data().lastname}`;
+ const fullName = `${userDoc.data().fornavn} ${userDoc.data().etternavn}`;
spenders[fullName] = (spenders[fullName] || 0) + auctionItemDoc.data().currentPrice;
total += auctionItemDoc.data().currentPrice;
diff --git a/public/templates/auctionitems.html b/public/templates/auctionitems.html
index 9bbaa57..6c45c67 100644
--- a/public/templates/auctionitems.html
+++ b/public/templates/auctionitems.html
@@ -116,9 +116,9 @@ AUKSJONSOBJEKTER
if (doc.exists) {
const currBidTitle = document.createElement("h5");
currBidTitle.textContent = "Høyeste bud";
- const firstname = doc.data().firstname;
+ const firstname = doc.data().fornavn;
const bidderName = document.createElement("small");
- bidderName.textContent = doc.data().firstname + " " + doc.data().lastname;
+ bidderName.textContent = doc.data().fornavn + " " + doc.data().etternavn;
cardBody.appendChild(currBidTitle);
cardBody.appendChild(bidderName);
cardBody.appendChild(currentPrice);
diff --git a/public/templates/live_view.html b/public/templates/live_view.html
index e5f72b4..f87b5b4 100644
--- a/public/templates/live_view.html
+++ b/public/templates/live_view.html
@@ -131,7 +131,7 @@ Omegaauctionen
const userDoc = await usersRef.doc(auctionItemDoc.data().highestBidder).get();
if (userDoc.exists) {
- const fullName = `${userDoc.data().firstname} ${userDoc.data().lastname}`;
+ const fullName = `${userDoc.data().fornavn} ${userDoc.data().etternavn}`;
if (spenders[fullName] === undefined) {
spenders[fullName] = auctionItemDoc.data().currentPrice;
diff --git a/public/templates/viewAuctionItem.html b/public/templates/viewAuctionItem.html
index 4e37028..eb4fb34 100644
--- a/public/templates/viewAuctionItem.html
+++ b/public/templates/viewAuctionItem.html
@@ -135,7 +135,7 @@ Dette objektet selges til fast
userRef.get().then((userDoc) => {
if (userDoc.exists) {
const userData = userDoc.data();
- document.getElementById('currentBidder').textContent = "til " + userData.firstname + " " + userData.lastname;
+ document.getElementById('currentBidder').textContent = "til " + userData.foravn + " " + userData.etternavn;
} else {
console.log("No such user!");
}
diff --git a/public/users-test.html b/public/users-test.html
index 5148581..d080bd6 100644
--- a/public/users-test.html
+++ b/public/users-test.html
@@ -152,8 +152,8 @@ Registrer deg her!
// });
return db.collection("users").doc(user.uid).set({
- firstname,
- lastmame,
+ fornavn: firstname,
+ etternavn: lastmame,
email,
grade
});