----------------------------------------------------------------------------------------------------------------------------------------------------------------

INSERT INTO public.core_assets (asset_type,asset_name,description,custom,asset_innerhtml,asset_parameters,asset_code,before_trigger,after_trigger,failure_rollback,exec_order,meta,role_id) VALUES
	 ('form','stash_files_form','Form to add and edit files',false,'','{
  "form": [
    [
      {
        "id": "select ",
        "cols": 3,
        "name": "file",
        "type": "file",
        "label": "form_stash_files_select",
        "onchange": "jivaCoreFunc.loadFile(this); getFileName();",
        "mandatory": true
      },
      {
        "id": "title",
        "cols": 3,
        "name": "title",
        "type": "text",
        "label": "form_stash_files_title",
        "mandatory": false
      },
      {
        "id": "folder",
        "cols": 3,
        "list": ",documents,images,videos,settings,secret",
        "name": "folder",
        "type": "dropdown",
        "label": "form_stash_files_select_folder",
        "mandatory": false
      },
      {
        "id": "filename",
        "cols": 3,
        "name": "filename",
        "type": "text",
        "label": "form_stash_files_filename",
        "mandatory": false
      },
      {
        "id": "id",
        "cols": 3,
        "name": "objectId",
        "type": "hidden",
        "label": "",
        "mandatory": false
      }
    ]
  ]
}'::jsonb,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

----------------------------------------------------------------------------------------------------------------------------------------------------------------


INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XFILEGT','stash_files_list_get','SSFILES','getStashFiles','','stash/files','stash','Permission to get files','EXE','',1,false,false,NULL),
	 ('SSSHSRV','stash_backend_only','MSTASH','','','','stash','Permission to access backend only','SEC','',1,false,false,NULL),
	 ('MSTASH','stash',NULL,NULL,NULL,'stash','stash','Access to stash module','MOD','fab fa-docker',1200,false,false,NULL),
	 ('XFILADD','stash_files_add','SFILEDT','addStashFiles','','stash/files','stash','Permission to add files','EXE','',1,false,false,NULL),
	 ('PSFILES','stash_files_list','MSTASH','getObjects','','stash/files','stash','Permission to view files page','PAG','far fa-file',1,false,false,NULL),
	 ('BFILSAV','stash_files_list_view_save','SFILEDT','','','stash/files','stash','Permission to save button','BUT','fas fa-save',1,false,false,NULL),
	 ('BFILDEL','stash_files_list_view_delete','SSFILES','','','stash/files','stash','permission for files delete button','BUT','fas fa-trash',1,false,false,NULL),
	 ('BFBKEDT','stash_files_list_edit_back','SFILEDT','','','stash/files','stash','Permission to back button','BUT','fas fa-arrow-left',1,false,false,NULL),
	 ('BFILEDT','stash_files_list_view_edit','SSFILES','','','stash/files','stash','Permission to view files edit button','BUT','fas fa-edit',1,false,false,NULL),
	 ('JSTASH','mobile_stash_jason','MSTASH','stashPage.json','','stash/mobile','stash','Permission to view stash page mobile','MOB','',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('SFILEDT','stash_files_list_edit','PSFILES','','','stash/files','stash','Permission to view edit section','SEC','',1,false,false,NULL),
	 ('BFILADD','stash_files_list_view_add','SSFILES','','','stash/files','stash','Permission to for add files button','BUT','fas fa-plus',1,false,false,NULL),
	 ('XSTSOBJ','stash_set_object','SSSHSRV','setStashObject','','','stash','Permission to set stash object','EXE','',1,false,false,NULL),
	 ('SSFILES','stash_files_list_view','PSFILES','','','stash/files','stash','Perimission to view stash section','SEC','',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XDELFIL','stash_files_delete','SSSHSRV','delStashFiles','','stash/files','stash','Permission to delete stash files','EXE','',1,false,false,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
   	 ('XSTDTDD','stash_entity_add','SFILEDT','addStashEntity','','stash/files','stash','Permission to add files/entities (V2)','EXE','',1,false,false,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XENTYGT','stash_files_list_entity_get','SSFILES','getStashEntity','','stash/files','stash','Permission to get files','EXE','',1,false,false,NULL);
