merge: database backed creation entry config
# Conflicts: # src/components/platform-entry/PlatformEntryFlowShellImpl.tsx
This commit is contained in:
@@ -9,6 +9,42 @@ use std::collections::BTreeMap;
|
||||
use crate::domain::*;
|
||||
use crate::errors::RuntimeProfileFieldError;
|
||||
use crate::format_utc_micros;
|
||||
use shared_contracts::creation_entry_config::{
|
||||
CreationEntryConfigResponse, CreationEntryStartCardResponse, CreationEntryTypeModalResponse,
|
||||
CreationEntryTypeResponse,
|
||||
};
|
||||
|
||||
pub fn build_creation_entry_config_response(
|
||||
snapshot: CreationEntryConfigSnapshot,
|
||||
) -> CreationEntryConfigResponse {
|
||||
CreationEntryConfigResponse {
|
||||
start_card: CreationEntryStartCardResponse {
|
||||
title: snapshot.start_card.title,
|
||||
description: snapshot.start_card.description,
|
||||
idle_badge: snapshot.start_card.idle_badge,
|
||||
busy_badge: snapshot.start_card.busy_badge,
|
||||
},
|
||||
type_modal: CreationEntryTypeModalResponse {
|
||||
title: snapshot.type_modal.title,
|
||||
description: snapshot.type_modal.description,
|
||||
},
|
||||
creation_types: snapshot
|
||||
.creation_types
|
||||
.into_iter()
|
||||
.map(|item| CreationEntryTypeResponse {
|
||||
id: item.id,
|
||||
title: item.title,
|
||||
subtitle: item.subtitle,
|
||||
badge: item.badge,
|
||||
image_src: item.image_src,
|
||||
visible: item.visible,
|
||||
open: item.open,
|
||||
sort_order: item.sort_order,
|
||||
updated_at_micros: item.updated_at_micros,
|
||||
})
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn build_runtime_setting_record(snapshot: RuntimeSettingSnapshot) -> RuntimeSettingsRecord {
|
||||
RuntimeSettingsRecord {
|
||||
|
||||
Reference in New Issue
Block a user