This commit is contained in:
Suvodip
2024-05-16 21:22:56 +05:30
parent 8da340c40b
commit ef2bd86aa0
8 changed files with 194 additions and 219 deletions

View File

@@ -186,9 +186,9 @@
<p style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;"><?php echo $row['time']; ?></p>
</div>
</div>
<div class="grid grid-cols-3 p-3 border-b-2 border-[#D9D9D9] space-x-6" style="text-align: left;">
<div class="grid grid-cols-2 md:grid-cols-3 p-3 border-b-2 border-[#D9D9D9] space-x-6" style="text-align: left;">
<div>
<p><b>Follow Update</b></p>
<p><b>Followup Date</b></p>
<input class="w-full" type="date" name="date" id="date" value="<?php echo $row['date']; ?>" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;" />
</div>
<div>
@@ -317,7 +317,7 @@
</form>
<div class="flex flex-col div-custom-margin" style="width: 100%;" >
<div class="bg-[#F6F6F6] rounded-xl p-3">
<div class="flex flex-row place-content-between" style="border-bottom: 2px solid #7E8299; border-style: dashed; padding-bottom: 3px;">
<div class="flex-container-x2y place-content-between" style="border-bottom: 2px solid #7E8299; border-style: dashed; padding-bottom: 3px;">
<p style="font-size: 25px; font-weight: bold;">Comments: <span><?php echo $totalRecords; ?></span></p>
<button id="toggleButton" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); color: #fff; border-radius: 6px; padding: 6px 20px 6px 20px;">Add Comment</button>
</div>
@@ -546,29 +546,51 @@
</div>
<script>
const copyButtons = document.querySelectorAll('.copy-btn');
copyButtons.forEach(button => {
button.addEventListener('click', event => {
event.preventDefault();
const inputId = button.getAttribute('data-input-id');
const inputElement = document.getElementById(inputId);
if (inputElement && inputElement.value) {
navigator.clipboard.writeText(inputElement.value)
.then(() => {
button.classList.add('copied');
setTimeout(() => {
button.classList.remove('copied');
}, 1000);
})
.catch(err => {
console.error('Unable to copy:', err);
});
}
document.addEventListener('DOMContentLoaded', () => {
const copyButtons = document.querySelectorAll('.copy-btn');
copyButtons.forEach(button => {
button.addEventListener('click', event => {
event.preventDefault();
const inputId = button.getAttribute('data-input-id');
const inputElement = document.getElementById(inputId);
if (inputElement && inputElement.value) {
if (navigator.clipboard) {
navigator.clipboard.writeText(inputElement.value)
.then(() => {
button.classList.add('copied');
setTimeout(() => {
button.classList.remove('copied');
inputElement.blur(); // Remove focus from input element
}, 1000);
})
.catch(err => {
console.error('Unable to copy using clipboard API:', err);
});
} else {
// Fallback method for older browsers
inputElement.select();
inputElement.setSelectionRange(0, inputElement.value.length); // For mobile devices
try {
document.execCommand('copy');
button.classList.add('copied');
setTimeout(() => {
button.classList.remove('copied');
inputElement.blur(); // Remove focus from input element
}, 1000);
} catch (err) {
console.error('Fallback: Unable to copy', err);
}
}
}
});
});
});
// function fetchCountries() {
// fetch('https://api.siliconpin.com/v3/list/country/')
// .then(res => res.json())
@@ -693,6 +715,27 @@ copyButtons.forEach(button => {
});
</script>
<style>
#name::selection, #email::selection, #phone::selection {
background-color: transparent;
}
#name:focus, #email:focus, #phone:focus {
outline: none;
}
.flex-container-x2y {
display: flex;
}
@media only screen and (max-width: 600px) {
.flex-container-x2y {
flex-direction: column;
}
}
@media only screen and (min-width: 601px) {
.flex-container-x2y {
flex-direction: row;
}
}
.add-appt-modal, .add-appt-edit-modal{
background-color: #F8F8F8;
display: none;