Study of weakly Ricci-symmetric spacetimes under gray’s decomposition and f (R,T)-gravity