Influence of magnetic fields on the coherence effects in the Nai D$\mathsf{_1}$ and D$\mathsf{_2}$ lines