Skip to content

Instantly share code, notes, and snippets.

@basz
Created May 16, 2018 10:04
Show Gist options
  • Select an option

  • Save basz/d2dba716ce2e4acac3e52ebcc6358798 to your computer and use it in GitHub Desktop.

Select an option

Save basz/d2dba716ce2e4acac3e52ebcc6358798 to your computer and use it in GitHub Desktop.
properties: hasMany('dossier/order-property', { async: true }),
propertyValue(propertyName) {
return this.get('properties').then((properties) => {
const property = properties.findBy('name', propertyName);
if (isNone(property)) {
return null;
}
return property.get('value');
});
},
{{#each (await orderStep.order.properties) as |property|}}
{{#if (eq property.name orderPropertiesPath.SOME_PROPERTYNAME)}}
...
{{#each (await orderStep.order.properties) as |property|}}
{{#if (eq property.name orderPropertiesPath.OTHER_PROPERTYNAME)}}
...
{{#each (await orderStep.order.properties) as |property|}}
{{#if (eq property.name orderPropertiesPath.AN_PROPERTYNAME)}}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment