15
15
class =" content-container"
16
16
:style =" { 'max-height': contentMaxHeight }"
17
17
>
18
+ <span id =" synthesis-reactants-label" class =" subheading mt-2 pb-2 ml-2" >
19
+ <label for =" synthesis-reactants-table" >Reactants, reagents, inputs</label >
20
+ </span >
18
21
<div class =" card component-card" >
19
22
<div class =" card-body pt-2 pb-0 mb-0 pl-5" >
20
23
<CompactConstituentTable
21
- id =" synthesis-table"
24
+ id =" synthesis-reactants- table"
22
25
v-model =" constituents"
23
26
:types-to-query =" ['samples', 'starting_materials']"
24
27
/>
25
28
</div >
26
29
</div >
27
- <span id =" synthesis-procedure-label" class =" subheading ml-2" >Procedure</span >
30
+ <span id =" synthesis-products-label" class =" subheading mt-2 pb-2 ml-2"
31
+ ><label for =" synthesis-products-table" >Products</label ></span
32
+ >
33
+ <div class =" component-card" >
34
+ <div class =" card-body pt-2 pb-0 mb-0 pl-5" >
35
+ <CompactConstituentTable
36
+ id =" synthesis-products-table"
37
+ v-model =" products"
38
+ :types-to-query =" ['samples', 'starting_materials']"
39
+ />
40
+ </div >
41
+ </div >
42
+ <span id =" synthesis-procedure-label" class =" subheading ml-2" ><label >Procedure</label ></span
43
+ >
28
44
<TinyMceInline
29
45
v-model =" SynthesisDescription"
30
46
aria-labelledby =" synthesis-procedure-label"
@@ -59,6 +75,7 @@ export default {
59
75
},
60
76
computed: {
61
77
constituents: createComputedSetterForItemField (" synthesis_constituents" ),
78
+ products: createComputedSetterForItemField (" synthesis_products" ),
62
79
SynthesisDescription: createComputedSetterForItemField (" synthesis_description" ),
63
80
},
64
81
watch: {
@@ -69,6 +86,12 @@ export default {
69
86
},
70
87
deep: true ,
71
88
},
89
+ products: {
90
+ handler () {
91
+ this .$store .commit (" setItemSaved" , { item_id: this .item_id , isSaved: false });
92
+ },
93
+ deep: true ,
94
+ },
72
95
SynthesisDescription: {
73
96
handler () {
74
97
this .$store .commit (" setItemSaved" , { item_id: this .item_id , isSaved: false });
@@ -80,6 +103,7 @@ export default {
80
103
// Auto-collapsed when initialised empty
81
104
this .isExpanded =
82
105
(this .constituents && this .constituents .length > 0 ) ||
106
+ (this .products && this .products .length > 0 ) ||
83
107
(this .SynthesisDescription && this .SynthesisDescription .trim () !== " " );
84
108
// If expanded set height to none, otherwise set to 0px
85
109
if (this .isExpanded ) {
@@ -201,7 +225,6 @@ export default {
201
225
font-size : small ;
202
226
font-weight : 600 ;
203
227
text-transform : uppercase ;
204
- margin-bottom : 0px ;
205
228
}
206
229
207
230
.content-container {
0 commit comments