I'm having problem with if structure in blaze.
I've some recorders in my db called chamadas, some of these has value E and others null. When I try to iterate, it ever enter in the first if.
I want to separate the recorders by the status.
{{#each chamada in chamadas}}
{{#if chamada.status = 'E' }}
<tr class="success">
<td>{{chamada.senha}}</td>
<td>{{chamada.tempo}}</td>
<td>{{chamada.data_inicio}}</td>
<td></td>
<th><button id="{{chamada._id}}" value="{{chamada.senha}}" class="btn btn-block">Chamar</button></th>
<td>{{chamada.status}}</td>
</tr>
{{else}}
{{#if chamada.status = 'A'}}
<tr class="danger">
<td>{{chamada.senha}}</td>
<td>{{chamada.tempo}}</td>
<td>{{chamada.data_inicio}}</td>
<td></td>
<th><button id="{{chamada._id}}" value="{{chamada.senha}}" class="btn btn-block">Chamar</button></th>
<td>{{chamada.status}}</td>
</tr>
{{else}}
{{#if chamada.status = 'F'}}
<tr class="info">
<td>{{chamada.senha}}</td>
<td>{{chamada.tempo}}</td>
<td>{{chamada.data_inicio}}</td>
<td>{{chamada.data_fim}}</td>
<td>{{chamada.status}}</td>
</tr>
{{/if}}
{{/if}}
{{/if}}
{{/each}}