Added logic for create modal of data