ezidam: settings: branding: show updated_at
This commit is contained in:
parent
14bff68cbf
commit
c8700cfdc8
4 changed files with 10 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ pub mod content {
|
|||
pub struct AdminSettingsBranding {
|
||||
pub user: JwtClaims,
|
||||
pub business_name: String,
|
||||
pub updated_at: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ pub async fn settings_branding(mut db: Connection<Database>, admin: JwtAdmin) ->
|
|||
super::content::AdminSettingsBranding {
|
||||
user: admin.0,
|
||||
business_name: settings.business_name().to_string(),
|
||||
updated_at: settings.updated_at().to_string(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@
|
|||
value="{{ business_name }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="mt-4 text-muted">Settings last updated on {{ updated_at | date(format="%A %-d %B %Y") }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Save -->
|
||||
|
|
|
|||
|
|
@ -26,4 +26,10 @@ impl Settings {
|
|||
pub fn url(&self) -> Option<&str> {
|
||||
self.url.as_deref()
|
||||
}
|
||||
pub fn created_at(&self) -> DateTime<Utc> {
|
||||
self.created_at
|
||||
}
|
||||
pub fn updated_at(&self) -> DateTime<Utc> {
|
||||
self.updated_at
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue