Quark doesn't constitutes more fundamental particle and proton and neutron consist of quarks. Now come to beta decay.
$n \rightarrow p + e^{-} + \bar{\nu}_e $
How can an electron emit from an neutron whereas electron is a fundamental particle? Is the electron created from gluon?