Donati compatibility conditions for membrane and flexural shells