Show short address on green pool signal
This commit is contained in:
parent
89197df6b0
commit
0aeba98fb0
3 changed files with 19 additions and 9 deletions
|
|
@ -17,18 +17,18 @@ import (
|
|||
)
|
||||
|
||||
type Address struct {
|
||||
Country string `db:"country"`
|
||||
Locality string `db:"locality"`
|
||||
Number string `db:"number"`
|
||||
PostalCode string `db:"postal_code"`
|
||||
Region string `db:"region"`
|
||||
Street string `db:"street"`
|
||||
Unit string `db:"unit"`
|
||||
Country string `db:"country" json:"country"`
|
||||
Locality string `db:"locality" json:"locality"`
|
||||
Number string `db:"number" json:"number"`
|
||||
PostalCode string `db:"postal_code" json:"postal_code"`
|
||||
Region string `db:"region" json:"region"`
|
||||
Street string `db:"street" json:"street"`
|
||||
Unit string `db:"unit" json:"unit"`
|
||||
}
|
||||
type signal struct {
|
||||
Address Address
|
||||
Address Address `json:"address"`
|
||||
Addressed *time.Time `json:"addressed"`
|
||||
Addressor *platform.User `json:"addressed"`
|
||||
Addressor *platform.User `json:"addressor"`
|
||||
Created time.Time `json:"created"`
|
||||
Creator platform.User `json:"creator"`
|
||||
ID int32 `json:"id"`
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@
|
|||
></script>
|
||||
|
||||
<script>
|
||||
function shortAddress(a) {
|
||||
return a.number + " " + a.street + ", " + a.locality + ", " + a.region;
|
||||
}
|
||||
function workbench() {
|
||||
return {
|
||||
// API Configuration
|
||||
|
|
@ -337,6 +340,10 @@
|
|||
@click="toggleSignal(signal)"
|
||||
>
|
||||
<div class="small fw-semibold" x-text="signal.title"></div>
|
||||
<div
|
||||
class="signal-address"
|
||||
x-text="shortAddress(signal.address)"
|
||||
></div>
|
||||
<div
|
||||
class="text-muted small"
|
||||
x-text="signal.description"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
background-color: $primary-light-4;
|
||||
cursor: pointer;
|
||||
}
|
||||
.signal-address {
|
||||
font-size: 9pt;
|
||||
}
|
||||
.tool-button {
|
||||
width: 100%;
|
||||
margin-bottom: 0.5rem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue