(wip) schedle generation;
added confirmations on schedule DELETE!!! better reports page; log every delete over API, more logging;
This commit is contained in:
@ -62,7 +62,7 @@ export default function Reports() {
|
||||
const { data } = await axiosInstance.get("/api/data/locations");
|
||||
setLocations(data);
|
||||
console.log(data);
|
||||
axiosInstance.get(`/api/data/reports?include=publisher,location`)
|
||||
axiosInstance.get(`/api/data/reports?include=publisher,location,shift`)
|
||||
.then((res) => {
|
||||
// let reports = res.data;
|
||||
// reports.forEach((report) => {
|
||||
@ -123,8 +123,12 @@ export default function Reports() {
|
||||
{filteredReports.map((report) => (
|
||||
<tr key={report.id}>
|
||||
<td className="border px-2 py-2">{report.publisher.firstName + " " + report.publisher.lastName}</td>
|
||||
<td className="border px-2 py-2">{common.getDateFormated(new Date(report.date))}</td>
|
||||
<td className="border px-2 py-2">{report.location?.name}</td>
|
||||
<td className="border px-2 py-2">{common.getDateFormated(new Date(report.date))}
|
||||
{report.type === ReportType.ServiceReport ? (report.shift ? " от " + common.getTimeFormatted(report.shift?.startTime) + " ч." : "") : common.getTimeFormatted(report.date)}
|
||||
</td>
|
||||
<td className="border px-2 py-2">{report.location?.name}
|
||||
{report.type === ReportType.ServiceReport ? (report.shift ? "" : "за целия ден") : report.comments}
|
||||
</td>
|
||||
<td className="border px-2 py-2">
|
||||
{(report.type === ReportType.ServiceReport)
|
||||
? (
|
||||
@ -145,12 +149,16 @@ export default function Reports() {
|
||||
<span style={{ color: 'blue' }}> - Предложение</span> :
|
||||
""}
|
||||
</div>
|
||||
<div dangerouslySetInnerHTML={{ __html: report.experienceInfo }} />
|
||||
<div style={{ maxHeight: '960px', maxWidth: '960px', overflow: 'auto' }}>
|
||||
<div dangerouslySetInnerHTML={{ __html: report.experienceInfo }} />
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<div><strong>Случка</strong></div>
|
||||
<div dangerouslySetInnerHTML={{ __html: report.experienceInfo }} />
|
||||
<div style={{ maxHeight: '960px', maxWidth: '960px', overflow: 'auto' }}>
|
||||
<div dangerouslySetInnerHTML={{ __html: report.experienceInfo }} />
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user