1
0
forked from poc/pds

Add TimescaleDB migration for QDS

This commit is contained in:
dhanabalan
2025-08-12 16:14:41 +05:30
parent dc9f929fa2
commit 390e013ccb
36 changed files with 2002 additions and 44 deletions

View File

@@ -0,0 +1 @@
@import '../../../../vendor/filament/filament/resources/css/theme.css';

View File

@@ -1 +1,3 @@
import './bootstrap';

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Gemini Chat</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
}
#chat-box {
border: 1px solid #ccc;
padding: 15px;
height: 300px;
overflow-y: scroll;
margin-bottom: 10px;
}
.user, .bot {
margin-bottom: 10px;
}
.user {
text-align: right;
color: blue;
}
.bot {
text-align: left;
color: green;
}
</style>
</head>
<body>
<h2>Gemini Chat</h2>
<div id="chat-box"></div>
<textarea id="prompt" rows="3" cols="60" placeholder="Type your message here..."></textarea><br>
<button onclick="sendPrompt()">Send</button>
<script>
async function getGeminiResponse(prompt) {
try {
const res = await fetch('http://172.31.31.51:8000/api/chatbot/message', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ message: prompt })
});
if (!res.ok) {
const errorText = await res.text();
console.error(`Server returned ${res.status}:`, errorText);
throw new Error(`HTTP error! Status: ${res.status}`);
}
const data = await res.json();
return data.reply || "Sorry, no response.";
} catch (e) {
console.error('Fetch error:', e);
return "Error fetching response.";
}
}
async function sendPrompt() {
const promptInput = document.getElementById('prompt');
const prompt = promptInput.value.trim();
if (!prompt) return;
appendMessage('user', prompt);
promptInput.value = '';
const reply = await getGeminiResponse(prompt);
appendMessage('bot', reply);
}
function appendMessage(sender, text) {
const chatBox = document.getElementById('chat-box');
const message = document.createElement('div');
message.className = sender;
message.textContent = text;
chatBox.appendChild(message);
chatBox.scrollTop = chatBox.scrollHeight;
}
</script>
</body>
</html>

View File

@@ -0,0 +1,8 @@
<button
type="button"
wire:click="updateInvoice"
class="px-2 py-1 border border-primary-500 text-primary-600 rounded hover:bg-primary-50 hover:border-primary-700 transition text-sm"
>
Update Invoice
</button>