A company's office: its GPS position and a photo
The company form has a field for the office's GPS position (migration 0004, column companies.office_gps). It takes what people have at hand: the numbers Google Maps copies, a link to the place on Google Maps or OpenStreetMap, a geo: URI, or degrees, minutes and seconds. It keeps decimal degrees with six decimals and refuses a position outside Thailand, which catches a swapped pair; a short maps.app.goo.gl link is refused with a hint, as it holds no position (src/gps.rs, with unit tests). The company's page has an Office card: the position with links that open it on OpenStreetMap and Google Maps, the newest photo of the office, and a strip that uploads a photo (kind "Photo of the office") and returns to the card. The photos are documents like any other: encrypted on the server and audited. A refused photo shows its errors on the card only; office photos that are PDFs are counted under Company documents. The demo company has a position. Tests: the position read from a link, from degrees, minutes and seconds, the three refusals, the audit entry and its removal; a photo uploaded from the card, shown, and its errors placed.
This commit is contained in:
1 parent
e88bb74e1e
commit
2a6e972b68
14 files changed
+642
-8
No files matched your search
@@ -937,6 +937,66 @@ textarea.mrz {
|
||||
.upload-row .field {
|
||||
min-width: 0;
|
||||
}
|
||||
/* ---- a company's office: its photo beside the position on the map */
|
||||
.office {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
|
||||
gap: 16px 24px;
|
||||
align-items: start;
|
||||
}
|
||||
.office-pic img,
|
||||
.office-none {
|
||||
display: block;
|
||||
width: 100%;
|
||||
aspect-ratio: 4 / 3;
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--line);
|
||||
background: var(--panel2);
|
||||
}
|
||||
.office-pic img {
|
||||
object-fit: cover;
|
||||
}
|
||||
.office-pic p {
|
||||
margin: 6px 0 0;
|
||||
}
|
||||
.office-none {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: 1.5px dashed var(--stroke);
|
||||
color: var(--mute);
|
||||
font-size: 13.5px;
|
||||
}
|
||||
.maplinks {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 2px 14px;
|
||||
margin-left: 14px;
|
||||
}
|
||||
.office-info .hint {
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
.office-up {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 8px 10px;
|
||||
align-items: center;
|
||||
margin: 14px 0 0;
|
||||
}
|
||||
.office-up > .notice {
|
||||
grid-column: 1 / -1;
|
||||
margin: 0;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.office,
|
||||
.office-up {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
.maplinks {
|
||||
display: flex;
|
||||
margin: 2px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* the list runs to the card's edges */
|
||||
.tblwrap.bleed {
|
||||
margin: 0 -20px -18px;
|
||||
|
||||
Reference in new issue
Block a user