This commit is contained in:
xfarrow
2024-03-28 09:22:46 +01:00
parent e21550f803
commit 3440713d71
5 changed files with 419 additions and 4 deletions

View File

@ -73,9 +73,10 @@ async function findById(jobOfferId) {
} }
/** /**
* Get all job offers for a specific organization, including their tags * Get all job offers for a specific organization
* @param {*} organizationId * @param {*} organizationId The organization id for which
* @returns * you're looking job offers for
* @returns An array of JobOffers plus associated tags
*/ */
async function findByOrganizationId(organizationId) { async function findByOrganizationId(organizationId) {
// This is equal to // This is equal to

View File

@ -28,7 +28,7 @@ async function findBySecret(secret) {
} }
/** /**
* Given a secret and a new password, update the Peron's personal password * Given a secret and a new password, update the Peron's password
* *
* @param {*} password The new (hashed) password * @param {*} password The new (hashed) password
* @param {*} secret The secret received via e-mail (table RequestResetPassword) * @param {*} secret The secret received via e-mail (table RequestResetPassword)

View File

@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<title>Multi-row Bootstrap Cards</title>
<style>
/* Add some custom styling if needed */
.card {
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="container">
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
<!-- Card 1 -->
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">Programmatore informatico</h5>
<p class="card-text">Cerchiamo uno sviluppatore in grado di programmare in NodeJS/Javascript</p>
</div>
</div>
</div>
<!-- Card 2 -->
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 2</h5>
<p class="card-text">This is another sample card.</p>
</div>
</div>
</div>
<!-- Card 3 -->
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 3</h5>
<p class="card-text">This is yet another sample card.</p>
</div>
</div>
</div>
<!-- Repeat cards as needed -->
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 3</h5>
<p class="card-text">This is yet another sample card.</p>
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 3</h5>
<p class="card-text">This is yet another sample card.</p>
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 3</h5>
<p class="card-text">This is yet another sample card.</p>
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 3</h5>
<p class="card-text">This is yet another sample card.</p>
</div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 3</h5>
<p class="card-text">This is yet another sample card.</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,178 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chat Template</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
.container {
display: flex;
max-width: 800px;
margin: 20px auto;
background-color: #fff;
border-radius: 8px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.chat-list {
flex: 1;
border-right: 1px solid #ccc;
padding: 20px;
overflow-y: auto;
}
.chat-list-item {
cursor: pointer;
padding: 10px;
border-bottom: 1px solid #ccc;
}
.chat-list-item.active {
background-color: #f0f0f0;
}
.chat-area {
flex: 2;
padding: 20px;
overflow-y: auto;
}
.message {
margin-bottom: 10px;
max-width: 70%;
padding: 10px;
border-radius: 8px;
word-wrap: break-word;
clear: both;
}
.message.sent {
float: right;
background-color: #4CAF50;
color: white;
}
.message.received {
float: left;
background-color: #ddd;
}
.message-input-container {
padding: 20px;
}
.message-input {
width: calc(100% - 40px); /* Adjusting width to match the chat area */
margin-right: 10px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
resize: none;
float: left;
}
.send-button {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
float: right;
}
.message-confirm {
color: #4CAF50;
font-style: italic;
margin-top: 5px;
clear: both;
}
</style>
</head>
<body>
<div class="container">
<div class="chat-list">
<div class="chat-list-item active" onclick="selectChat(1)">Chat 1</div>
<div class="chat-list-item" onclick="selectChat(2)">Chat 2</div>
<div class="chat-list-item" onclick="selectChat(3)">Chat 3</div>
<!-- Add more chat list items as needed -->
</div>
<div class="chat-area" id="chat-area">
<!-- Messages will be displayed here -->
</div>
</div>
<div class="message-input-container">
<textarea class="message-input" id="message-input" placeholder="Type your message..." onkeydown="sendMessage(event)"></textarea>
<button class="send-button" onclick="sendMessage()">Send</button>
<div class="message-confirm" id="message-confirm" style="display: none;">Message Sent!</div>
</div>
<script>
function selectChat(chatId) {
// Simulate fetching messages from server
const messages = [
{ text: "Hello!", sentByMe: true },
{ text: "Hi there!", sentByMe: false },
{ text: "How are you?", sentByMe: false },
{ text: "I'm good, thanks!", sentByMe: true },
{ text: "Great to hear!", sentByMe: false }
];
// Clear previous messages
const chatArea = document.getElementById('chat-area');
chatArea.innerHTML = '';
// Display messages
messages.forEach(message => {
const messageElement = document.createElement('div');
messageElement.classList.add('message');
if (message.sentByMe) {
messageElement.classList.add('sent');
} else {
messageElement.classList.add('received');
}
messageElement.innerText = message.text;
chatArea.appendChild(messageElement);
});
// Highlight selected chat
const chatListItems = document.querySelectorAll('.chat-list-item');
chatListItems.forEach(item => item.classList.remove('active'));
chatListItems[chatId - 1].classList.add('active');
}
function sendMessage(event) {
const messageInput = document.getElementById('message-input');
const messageConfirm = document.getElementById('message-confirm');
// Get the typed message
const messageText = messageInput.value.trim();
if (messageText === '') {
return;
}
// Create a new message element
const messageElement = document.createElement('div');
messageElement.classList.add('message', 'sent');
messageElement.innerText = messageText;
// Append the new message to the chat area
const chatArea = document.getElementById('chat-area');
chatArea.appendChild(messageElement);
// Clear the message input
messageInput.value = '';
// Show message confirmation
messageConfirm.style.display = 'block';
// Hide message confirmation after 2 seconds
setTimeout(function() {
messageConfirm.style.display = 'none';
}, 2000);
// Scroll to the bottom of the chat area
chatArea.scrollTop = chatArea.scrollHeight;
}
// Select the first chat by default
selectChat(1);
</script>
</body>
</html>

View File

@ -0,0 +1,141 @@
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body style="background-color: #ecf2fa;">
<div class="container py-5">
<div class="row">
<div class="col">
<nav aria-label="breadcrumb" class="bg-light rounded-3 p-3 mb-4">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item"><a href="#">User</a></li>
<li class="breadcrumb-item active" aria-current="page">User Profile</li>
</ol>
</nav>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<div class="card mb-4">
<div class="card-body text-center">
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-chat/ava3.webp" alt="avatar"
class="rounded-circle img-fluid" style="width: 150px;">
<h5 class="my-3">John Doe</h5>
<p class="text-muted mb-1">Full Stack Developer</p>
<p class="text-muted mb-4">Napoli, Italy</p>
<div class="d-flex justify-content-center mb-2">
<!-- <button type="button" class="btn btn-primary">Follow</button> -->
<button type="button" class="btn btn-outline-primary ms-1">Message</button>
</div>
</div>
</div>
<div class="card mb-4 mb-lg-0">
<div class="card-body p-0">
<ul class="list-group list-group-flush rounded-3">
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
<i class="fas fa-globe fa-lg text-warning"></i>
<p class="mb-0"><a href="#">johndoe.com</a></p>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
<i class="fab fa-github fa-lg" style="color: #333333;"></i>
<p class="mb-0"><a href="https://github.com/xfarrow">johndoe</a></p>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
<i class="fab fa-twitter fa-lg" style="color: #55acee;"></i>
<p class="mb-0">@mdbootstrap</p>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
<i class="fab fa-instagram fa-lg" style="color: #ac2bac;"></i>
<p class="mb-0">mdbootstrap</p>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
<i class="fab fa-facebook-f fa-lg" style="color: #3b5998;"></i>
<p class="mb-0">mdbootstrap</p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-lg-8">
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-sm-3">
<p class="mb-0">Full Name</p>
</div>
<div class="col-sm-9">
<p class="text-muted mb-0">Johnatan Smith</p>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<p class="mb-0">Email</p>
</div>
<div class="col-sm-9">
<p class="text-muted mb-0">example@example.com</p>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<p class="mb-0">Phone</p>
</div>
<div class="col-sm-9">
<p class="text-muted mb-0">(097) 234-5678</p>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<p class="mb-0">Address</p>
</div>
<div class="col-sm-9">
<p class="text-muted mb-0">Bay Area, San Francisco, CA</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="card mb-4 mb-md-0">
<div class="card-body">
<p class="mb-4">Skills</p>
<p class="mb-1" style="font-size: .77rem;">Web Design</p>
<div class="progress rounded" style="height: 5px;">
<div class="progress-bar" role="progressbar" style="width: 80%" aria-valuenow="80"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<p class="mt-4 mb-1" style="font-size: .77rem;">Website Markup</p>
<div class="progress rounded" style="height: 5px;">
<div class="progress-bar" role="progressbar" style="width: 72%" aria-valuenow="72"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<p class="mt-4 mb-1" style="font-size: .77rem;">One Page</p>
<div class="progress rounded" style="height: 5px;">
<div class="progress-bar" role="progressbar" style="width: 89%" aria-valuenow="89"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<p class="mt-4 mb-1" style="font-size: .77rem;">Mobile Template</p>
<div class="progress rounded" style="height: 5px;">
<div class="progress-bar" role="progressbar" style="width: 55%" aria-valuenow="55"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
<p class="mt-4 mb-1" style="font-size: .77rem;">Backend API</p>
<div class="progress rounded mb-2" style="height: 5px;">
<div class="progress-bar" role="progressbar" style="width: 66%" aria-valuenow="66"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>