Skip to content

Commit

Permalink
replace eng with norsk for navn
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulijuz committed Feb 27, 2024
1 parent 39f2668 commit 28b057b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion public/js/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function Page() {
<ul>
{users.map((user) => (
// Assuming user object has a 'firstname' and 'lastname' field
<li key={user.id}>{user.firstname} {user.lastname}</li>
<li key={user.id}>{user.fornavn} {user.etternavn}</li>
))}
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions public/live_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h1>Omegaauctionen</h1>
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;
Expand All @@ -137,7 +137,7 @@ <h1>Omegaauctionen</h1>
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;
Expand Down
4 changes: 2 additions & 2 deletions public/templates/auctionitems.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ <h1>AUKSJONSOBJEKTER</h1>
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);
Expand Down
2 changes: 1 addition & 1 deletion public/templates/live_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1>Omegaauctionen</h1>
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;
Expand Down
2 changes: 1 addition & 1 deletion public/templates/viewAuctionItem.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h4 id="fixedItemMessage" style="display: none;">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!");
}
Expand Down
4 changes: 2 additions & 2 deletions public/users-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ <h1 id="registration-tekst" style="display: none;">Registrer deg her!</h1>
// });

return db.collection("users").doc(user.uid).set({
firstname,
lastmame,
fornavn: firstname,
etternavn: lastmame,
email,
grade
});
Expand Down

0 comments on commit 28b057b

Please sign in to comment.