Skip to content

Commit

Permalink
merge: #4029
Browse files Browse the repository at this point in the history
4029: fix(sdf): Ensure we pass correct variant display_name on update r=stack72 a=stack72



Co-authored-by: stack72 <[email protected]>
  • Loading branch information
si-bors-ng[bot] and stack72 authored Jun 23, 2024
2 parents c66e7ca + b466860 commit f671ec7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/web/src/components/AssetDetailsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@
placeholder="(mandatory) Provide the asset a name"
@blur="updateAsset"
/>

<VormInput
id="menuName"
id="displayName"
v-model="editingAsset.displayName"
type="text"
label="Display name"
Expand Down
4 changes: 2 additions & 2 deletions lib/sdf-server/src/server/service/variant/get_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct GetVariantResponse {
pub id: SchemaId,
pub default_schema_variant_id: SchemaVariantId,
pub name: String,
pub menu_name: Option<String>,
pub display_name: Option<String>,
pub category: String,
pub color: String,
pub link: Option<String>,
Expand Down Expand Up @@ -65,7 +65,7 @@ pub async fn get_variant(
id: request.id,
default_schema_variant_id,
name: schema.name().into(),
menu_name: variant.display_name(),
display_name: variant.display_name(),
category: variant.category().into(),
color: variant.get_color(&ctx).await?,
link: variant.link(),
Expand Down
6 changes: 3 additions & 3 deletions lib/sdf-server/src/server/service/variant/update_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct UpdateVariantRequest {
pub id: SchemaId,
pub default_schema_variant_id: SchemaVariantId,
pub name: String,
pub menu_name: Option<String>,
pub display_name: Option<String>,
pub category: String,
pub color: String,
pub link: Option<String>,
Expand All @@ -41,7 +41,7 @@ pub async fn update_variant(
&ctx,
request.default_schema_variant_id,
request.name.clone(),
request.menu_name.clone(),
request.display_name.clone(),
request.category.clone(),
request.color,
request.link,
Expand All @@ -59,7 +59,7 @@ pub async fn update_variant(
serde_json::json!({
"variant_name": request.name.clone(),
"variant_category": request.category.clone(),
"variant_menu_name": request.menu_name.clone(),
"variant_menu_name": request.display_name.clone(),
"variant_id": updated_schema_variant_id,
}),
);
Expand Down

0 comments on commit f671ec7

Please sign in to comment.