Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

formmanager.js 36KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  2. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  3. return new (P || (P = Promise))(function (resolve, reject) {
  4. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  5. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  6. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  7. step((generator = generator.apply(thisArg, _arguments || [])).next());
  8. });
  9. };
  10. var Unibase;
  11. (function (Unibase) {
  12. let Platform;
  13. (function (Platform) {
  14. let Forms;
  15. (function (Forms) {
  16. let Managers;
  17. (function (Managers) {
  18. class FormManager extends Platform.Core.BaseManager {
  19. getControls() {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/unibase/platform/forms/getcontrols';
  22. return yield this.dataHelper().getAsync(url).then(function (response) {
  23. if (response.result !== null)
  24. response.result = JSON.parse(response.result);
  25. return response;
  26. });
  27. });
  28. }
  29. refreshFormJson(FormId) {
  30. return __awaiter(this, void 0, void 0, function* () {
  31. const url = 'apis/v4/unibase/platform/forms/refreshformsjson/formid/' + FormId;
  32. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  33. return response;
  34. });
  35. });
  36. }
  37. refreshAllFormJson() {
  38. return __awaiter(this, void 0, void 0, function* () {
  39. const url = 'apis/v4/unibase/platform/forms/refreshallformsjson/np';
  40. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  41. return response;
  42. });
  43. });
  44. }
  45. getControlsByAppId(InstalledAppId) {
  46. return __awaiter(this, void 0, void 0, function* () {
  47. const url = 'apis/v4/unibase/platform/forms/controls/installedappid/' + InstalledAppId;
  48. return yield this.dataHelper().getAsync(url).then(function (response) {
  49. if (response.result !== null)
  50. response.result = JSON.parse(response.result);
  51. return response;
  52. });
  53. });
  54. }
  55. getControl(ControlId) {
  56. return __awaiter(this, void 0, void 0, function* () {
  57. const url = 'apis/v4/unibase/platform/forms/controls/' + ControlId;
  58. return yield this.dataHelper().getAsync(url).then(function (response) {
  59. if (response.result !== null)
  60. response.result = JSON.parse(response.result);
  61. return response;
  62. });
  63. });
  64. }
  65. getActionProvider(actionprovidertype) {
  66. return __awaiter(this, void 0, void 0, function* () {
  67. const url = 'apis/v4/unibase/platform/forms/getformaction/actionprovidertype/' + actionprovidertype;
  68. return yield this.dataHelper().getAsync(url).then(function (response) {
  69. response.result = JSON.parse(response.result);
  70. return response;
  71. });
  72. });
  73. }
  74. getAllFormActionProviders() {
  75. return __awaiter(this, void 0, void 0, function* () {
  76. const url = 'apis/v4/unibase/platform/forms/getallformactionproviders';
  77. return yield this.dataHelper().getAsync(url).then(function (response) {
  78. if (response.result !== null)
  79. response.result = JSON.parse(response.result);
  80. return response;
  81. });
  82. });
  83. }
  84. refreshControls() {
  85. return __awaiter(this, void 0, void 0, function* () {
  86. const url = 'apis/v4/unibase/platform/forms/refreshcontrols/np';
  87. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  88. return response.message;
  89. });
  90. });
  91. }
  92. saveControl(obj) {
  93. return __awaiter(this, void 0, void 0, function* () {
  94. const url = 'apis/v4/unibase/platform/forms/controls';
  95. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  96. return response;
  97. });
  98. });
  99. }
  100. getControlProperties(ControlId) {
  101. return __awaiter(this, void 0, void 0, function* () {
  102. const url = 'apis/v4/unibase/platform/forms/controlproperties/controlid/' + ControlId;
  103. return yield this.dataHelper().getAsync(url).then(function (response) {
  104. if (response.result !== null)
  105. response.result = JSON.parse(response.result);
  106. return response;
  107. });
  108. });
  109. }
  110. loadControlsByDataTypeId(DataTypeId) {
  111. return __awaiter(this, void 0, void 0, function* () {
  112. const url = 'apis/v4/unibase/platform/forms/controls/datatypeid/' + DataTypeId;
  113. return yield this.dataHelper().getAsync(url).then(function (response) {
  114. if (response.result !== null)
  115. response.result = JSON.parse(response.result);
  116. return response;
  117. });
  118. });
  119. }
  120. getSections(FormId) {
  121. return __awaiter(this, void 0, void 0, function* () {
  122. const url = 'apis/v4/unibase/platform/forms/sections/formid/' + FormId;
  123. return yield this.dataHelper().getAsync(url).then(function (response) {
  124. if (response.result !== null)
  125. response.result = JSON.parse(response.result);
  126. return response;
  127. });
  128. });
  129. }
  130. loadAppForms(InstalledAppId) {
  131. return __awaiter(this, void 0, void 0, function* () {
  132. const url = 'apis/v4/unibase/platform/forms/get/installedappid/' + InstalledAppId;
  133. var forms;
  134. return yield this.dataHelper().getAsync(url).then(function (response) {
  135. if (response.result !== null)
  136. response.result = JSON.parse(response.result);
  137. return response;
  138. });
  139. });
  140. }
  141. getFormsByAppId(FormId, InstalledAppId) {
  142. return __awaiter(this, void 0, void 0, function* () {
  143. const url = 'apis/v4/unibase/platform/forms/get/formid/' + FormId + '/installedappid/' + InstalledAppId;
  144. return yield this.dataHelper().getAsync(url).then(function (response) {
  145. if (response.result !== null)
  146. response.result = JSON.parse(response.result);
  147. return response;
  148. });
  149. });
  150. }
  151. getForms() {
  152. return __awaiter(this, void 0, void 0, function* () {
  153. const url = 'apis/v4/unibase/platform/forms/get';
  154. return yield this.dataHelper().getAsync(url).then(function (response) {
  155. if (response.result !== null)
  156. response.result = JSON.parse(response.result);
  157. return response;
  158. });
  159. });
  160. }
  161. getFormData(FormId, PkId) {
  162. return __awaiter(this, void 0, void 0, function* () {
  163. const url = 'apis/v4/unibase/platform/forms/get/formid/' + FormId + '/pkid/' + PkId;
  164. return yield this.dataHelper().getAsync(url).then(function (response) {
  165. if (response.result !== null)
  166. response.result = JSON.parse(response.result);
  167. return response;
  168. });
  169. });
  170. }
  171. getForm(FormId) {
  172. return __awaiter(this, void 0, void 0, function* () {
  173. const url = 'apis/v4/unibase/platform/forms/get/formid/' + FormId;
  174. return yield this.dataHelper().getAsync(url).then(function (response) {
  175. if (response.result !== null)
  176. response.result = JSON.parse(response.result);
  177. return response;
  178. });
  179. });
  180. }
  181. getFormbyUniqueId(FormUniqueId) {
  182. return __awaiter(this, void 0, void 0, function* () {
  183. const url = 'apis/v4/unibase/platform/forms/getform/formuniqueid/' + FormUniqueId;
  184. return yield this.dataHelper().getAsync(url).then(function (response) {
  185. if (response.result !== null)
  186. response.result = JSON.parse(response.result);
  187. return response;
  188. });
  189. });
  190. }
  191. saveForm(obj) {
  192. return __awaiter(this, void 0, void 0, function* () {
  193. const url = 'apis/v4/unibase/platform/forms/saveasnewform';
  194. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  195. return response;
  196. });
  197. });
  198. }
  199. refreshForms() {
  200. return __awaiter(this, void 0, void 0, function* () {
  201. const url = 'apis/v4/unibase/platform/forms/refreshforms/np';
  202. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  203. return response.message;
  204. });
  205. });
  206. }
  207. refreshAutocompletes() {
  208. return __awaiter(this, void 0, void 0, function* () {
  209. const url = 'apis/v4/unibase/platform/forms/executedeleteprocedures/np';
  210. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  211. return response.message;
  212. });
  213. });
  214. }
  215. refreshAllForms() {
  216. return __awaiter(this, void 0, void 0, function* () {
  217. const url = 'apis/v4/unibase/platform/forms/refreshallforms/formid/0';
  218. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  219. return response.message;
  220. });
  221. });
  222. }
  223. duplicateForm(obj) {
  224. return __awaiter(this, void 0, void 0, function* () {
  225. const url = 'apis/v4/unibase/platform/forms/DuplicateForm';
  226. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  227. if (response.result !== null)
  228. response.result = JSON.parse(response.result);
  229. return response;
  230. });
  231. });
  232. }
  233. exportForm(FormId) {
  234. return __awaiter(this, void 0, void 0, function* () {
  235. const url = 'apis/v4/unibase/platform/forms/exportform/' + FormId;
  236. return yield this.dataHelper().getAsync(url).then(function (response) {
  237. return response;
  238. });
  239. });
  240. }
  241. getSubFormsByParentForm(ParentFormId) {
  242. return __awaiter(this, void 0, void 0, function* () {
  243. const url = 'apis/v4/unibase/platform/forms/getsubformsbyparent/' + ParentFormId;
  244. return yield this.dataHelper().getAsync(url).then(function (response) {
  245. if (response.result !== null)
  246. response.result = JSON.parse(response.result);
  247. return response;
  248. });
  249. });
  250. }
  251. getFormProperty(FormPropertyId) {
  252. return __awaiter(this, void 0, void 0, function* () {
  253. const url = 'apis/v4/unibase/platform/forms/formproperty/' + FormPropertyId;
  254. return yield this.dataHelper().getAsync(url).then(function (response) {
  255. if (response.result !== null)
  256. response.result = JSON.parse(response.result);
  257. return response;
  258. });
  259. });
  260. }
  261. getFormProperties(FormId) {
  262. return __awaiter(this, void 0, void 0, function* () {
  263. const url = 'apis/v4/unibase/platform/forms/formproperties/formid/' + FormId;
  264. return yield this.dataHelper().getAsync(url).then(function (response) {
  265. if (response.result !== null)
  266. response.result = JSON.parse(response.result);
  267. return response;
  268. });
  269. });
  270. }
  271. deleteFormProperty(DocPropertyId, FormId) {
  272. return __awaiter(this, void 0, void 0, function* () {
  273. const url = 'apis/v4/unibase/platform/forms/formproperties/docpropertyid/' + DocPropertyId + '/formid/' + FormId;
  274. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  275. return response;
  276. });
  277. });
  278. }
  279. getFormRoleByAppConfiguration(AppConfigurationId) {
  280. return __awaiter(this, void 0, void 0, function* () {
  281. const url = 'apis/v4/unibase/platform/forms/formroles/appconfigurationid/' + AppConfigurationId;
  282. return yield this.dataHelper().getAsync(url).then(function (response) {
  283. if (response.result !== null && response.result != "")
  284. response.result = JSON.parse(response.result);
  285. return response;
  286. });
  287. });
  288. }
  289. getFormRoles(AppConfigurationId) {
  290. return __awaiter(this, void 0, void 0, function* () {
  291. const url = 'apis/v4/unibase/platform/forms/getformrolesbyconfigid/configurationid/' + AppConfigurationId;
  292. return yield this.dataHelper().getAsync(url).then(function (response) {
  293. if (response.result !== null)
  294. response.result = JSON.parse(response.result);
  295. return response;
  296. });
  297. });
  298. }
  299. getFormRolesConfiguration(AppConfigurationId, FormId) {
  300. return __awaiter(this, void 0, void 0, function* () {
  301. const url = 'apis/v4/unibase/platform/forms/getformrolesconfiguration/appconfigurationid/' + AppConfigurationId + '/formid/' + FormId + '/roleid/' + 0;
  302. return yield this.dataHelper().getAsync(url).then(function (response) {
  303. if (response.result !== null)
  304. response.result = JSON.parse(response.result);
  305. return response;
  306. });
  307. });
  308. }
  309. getFormRolesByInstalledAppId(Installedappid) {
  310. return __awaiter(this, void 0, void 0, function* () {
  311. const url = 'apis/v4/unibase/platform/forms/getappforms/installedappid/' + Installedappid;
  312. return yield this.dataHelper().getAsync(url).then(function (response) {
  313. if (response.result !== null)
  314. response.result = JSON.parse(response.result);
  315. return response;
  316. });
  317. });
  318. }
  319. getFormRolesByFormId(FormId) {
  320. return __awaiter(this, void 0, void 0, function* () {
  321. const url = 'apis/v4/unibase/platform/forms/formroles/formid/' + FormId;
  322. return yield this.dataHelper().getAsync(url).then(function (response) {
  323. if (response.result !== null)
  324. response.result = JSON.parse(response.result);
  325. return response;
  326. });
  327. });
  328. }
  329. dynamicAutoComplete(DocPropertyId, ColumnName, Value, Formpropertyid) {
  330. return __awaiter(this, void 0, void 0, function* () {
  331. const url = 'apis/v4/unibase/platform/forms/autocomplete/docpropertyid/' + DocPropertyId + '/columnname/' + ColumnName + '/value/' + Value + '/formpropertyid/' + Formpropertyid;
  332. return yield this.dataHelper().getAsync(url).then(function (response) {
  333. if (response.result !== null)
  334. response.result = JSON.parse(response.result);
  335. return response;
  336. });
  337. });
  338. }
  339. dynamicselect2(DocPropertyId, ColumnName, Value, Formpropertyid) {
  340. return __awaiter(this, void 0, void 0, function* () {
  341. const url = 'apis/v4/unibase/platform/forms/select2/docpropertyid/' + DocPropertyId + '/columnname/' + ColumnName + '/value/' + Value + '/formpropertyid/' + Formpropertyid;
  342. return yield this.dataHelper().getAsync(url).then(function (response) {
  343. if (response.result !== null)
  344. response.result = JSON.parse(response.result);
  345. return response;
  346. });
  347. });
  348. }
  349. getselect2data(formpropertyId, Idcoulmn) {
  350. return __awaiter(this, void 0, void 0, function* () {
  351. const url = 'apis/v4/unibase/platform/forms/getselect2databyidcolumn/formpropertyid/' + formpropertyId + '/idcolumn/' + Idcoulmn;
  352. return yield this.dataHelper().getAsync(url).then(function (response) {
  353. if (response.result !== null)
  354. response.result = JSON.parse(response.result);
  355. return response;
  356. });
  357. });
  358. }
  359. dynamicMultiSelectList(DocPropertyId, Ids, columnname, Value, search, Pagesize, PageIndex, FormId) {
  360. return __awaiter(this, void 0, void 0, function* () {
  361. const url = 'apis/v4/unibase/platform/forms/GetDynamicMultiSelectLists/docpropertyid/' + DocPropertyId + '/ids/' + Ids + '/columnname/' + columnname + '/value/' + Value + '/search/' + search + '/pagesize/' + Pagesize + '/pageindex/' + PageIndex + '/formid/' + FormId;
  362. return yield this.dataHelper().getAsync(url).then(function (response) {
  363. if (response.result !== null)
  364. response.result = JSON.parse(response.result);
  365. Unibase.Forms.Controls.multiselectlist.Instance().count = response.result.Count;
  366. return response.result.Data;
  367. });
  368. });
  369. }
  370. dynamicDropDown(DropDownColumnId) {
  371. return __awaiter(this, void 0, void 0, function* () {
  372. const url = 'apis/v4/unibase/platform/forms/dynamicdropdowncolumns/dropdowncolumnid/' + DropDownColumnId;
  373. return yield this.dataHelper().getAsync(url).then(function (response) {
  374. if (response.result !== null)
  375. response.result = JSON.parse(response.result);
  376. return response;
  377. });
  378. });
  379. }
  380. dynamicCheckBoxReportData(CheckBoxColumnId) {
  381. return __awaiter(this, void 0, void 0, function* () {
  382. const url = 'apis/v4/unibase/platform/forms/dynamiccheckboxreportdata/checkboxcolumnid/' + CheckBoxColumnId;
  383. return yield this.dataHelper().getAsync(url).then(function (response) {
  384. if (response.result !== null)
  385. response.result = JSON.parse(response.result);
  386. return response;
  387. });
  388. });
  389. }
  390. getDropDown(drpDwnColumnId) {
  391. return __awaiter(this, void 0, void 0, function* () {
  392. const url = 'apis/v4/unibase/platform/forms/dropdowncolumns/' + drpDwnColumnId;
  393. return yield this.dataHelper().getAsync(url).then(function (response) {
  394. if (response.result !== null)
  395. response.result = JSON.parse(response.result);
  396. return response;
  397. });
  398. });
  399. }
  400. getDropDownColumns(DocPropertyId) {
  401. return __awaiter(this, void 0, void 0, function* () {
  402. const url = 'apis/v4/unibase/platform/forms/dropdowncolumns/docpropertyid/' + DocPropertyId;
  403. return yield this.dataHelper().getAsync(url).then(function (response) {
  404. if (response.result !== null)
  405. response.result = JSON.parse(response.result);
  406. return response;
  407. });
  408. });
  409. }
  410. deleteOptionForControl(DropDownColumnId) {
  411. return __awaiter(this, void 0, void 0, function* () {
  412. const url = 'apis/v4/unibase/platform/forms/dropdowncolumns/' + DropDownColumnId;
  413. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  414. if (response.result !== null)
  415. response.result = JSON.parse(response.result);
  416. return response;
  417. });
  418. });
  419. }
  420. getCheckBoxColumns(DocPropertyId) {
  421. return __awaiter(this, void 0, void 0, function* () {
  422. const url = 'apis/v4/unibase/platform/forms/checkboxcolumns/docpropertyid/' + DocPropertyId;
  423. return yield this.dataHelper().getAsync(url).then(function (response) {
  424. if (response.result !== null)
  425. response.result = JSON.parse(response.result);
  426. return response;
  427. });
  428. });
  429. }
  430. deleteOptionForCheckboxControl(CheckBoxColumnId) {
  431. return __awaiter(this, void 0, void 0, function* () {
  432. const url = 'apis/v4/unibase/platform/forms/deleteOptionForCheckboxControl/' + CheckBoxColumnId;
  433. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  434. if (response.result !== null)
  435. response.result = JSON.parse(response.result);
  436. return response;
  437. });
  438. });
  439. }
  440. dynamicSave(FormId, postData) {
  441. return __awaiter(this, void 0, void 0, function* () {
  442. const url = 'apis/v4/unibase/platform/forms/savedynform/' + FormId;
  443. return yield this.dataHelper().postAsync(url, postData).then(function (response) {
  444. return response;
  445. });
  446. });
  447. }
  448. saveFormValidation(obj) {
  449. return __awaiter(this, void 0, void 0, function* () {
  450. const url = 'apis/v4/unibase/platform/forms/formvalidations';
  451. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  452. return response;
  453. });
  454. });
  455. }
  456. deleteFormValidation(formvalidationid) {
  457. return __awaiter(this, void 0, void 0, function* () {
  458. const url = 'apis/v4/unibase/platform/forms/formvalidation/formvalidationid/' + formvalidationid;
  459. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  460. if (response.result !== null)
  461. response.result = JSON.parse(response.result);
  462. return response;
  463. });
  464. });
  465. }
  466. getFormValidation(FormValidationId) {
  467. return __awaiter(this, void 0, void 0, function* () {
  468. const url = 'apis/v4/unibase/platform/forms/formvalidation/' + FormValidationId;
  469. return yield this.dataHelper().getAsync(url).then(function (response) {
  470. response.result = JSON.parse(response.result);
  471. return response;
  472. });
  473. });
  474. }
  475. getActionProviders(FormId) {
  476. return __awaiter(this, void 0, void 0, function* () {
  477. const url = 'apis/v4/unibase/platform/forms/getactionproviders/formid/' + FormId;
  478. return yield this.dataHelper().getAsync(url).then(function (response) {
  479. if (response.result !== null)
  480. response.result = JSON.parse(response.result);
  481. return response;
  482. });
  483. });
  484. }
  485. getFormActionProviderById(FormActionProviderId) {
  486. return __awaiter(this, void 0, void 0, function* () {
  487. const url = 'apis/v4/unibase/platform/forms/getformactionproviderbyid/formactionproviderid/' + FormActionProviderId;
  488. return yield this.dataHelper().getAsync(url).then(function (response) {
  489. if (response.result !== null)
  490. response.result = JSON.parse(response.result);
  491. return response;
  492. });
  493. });
  494. }
  495. saveDefaultSaveSetting(obj) {
  496. return __awaiter(this, void 0, void 0, function* () {
  497. const url = 'apis/v4/bizgaze/platform/forms/savedefaultsavesetting';
  498. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  499. return response;
  500. });
  501. });
  502. }
  503. refreshActionProviders() {
  504. return __awaiter(this, void 0, void 0, function* () {
  505. const url = 'apis/v4/unibase/platform/forms/refreshactionproviders/np';
  506. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  507. return response.message;
  508. });
  509. });
  510. }
  511. getFormsAutoComplete(term, authtoken) {
  512. return __awaiter(this, void 0, void 0, function* () {
  513. const url = 'apis/v4/unibase/platform/forms/getformsautocomplete/term/' + term + '/authtoken/' + authtoken;
  514. return yield this.dataHelper().getAsync(url).then(function (response) {
  515. if (response.result !== null)
  516. response.result = JSON.parse(response.result);
  517. return response;
  518. });
  519. });
  520. }
  521. dynamicDelete(Id, AppConfigId) {
  522. return __awaiter(this, void 0, void 0, function* () {
  523. const url = 'apis/v4/unibase/platform/forms/DynamicDelete/id/' + Id + '/appconfigid/' + AppConfigId;
  524. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  525. if (response.result !== null)
  526. response.result = JSON.parse(response.result);
  527. return response;
  528. });
  529. });
  530. }
  531. getFormByAppConfiguration(AppConfigurationId) {
  532. return __awaiter(this, void 0, void 0, function* () {
  533. const url = 'apis/v4/unibase/platform/forms/getformbyappconfiguration/AppConfigurationId/' + AppConfigurationId;
  534. return yield this.dataHelper().getAsync(url).then(function (response) {
  535. if (response.result !== null)
  536. response.result = JSON.parse(response.result);
  537. return response;
  538. });
  539. });
  540. }
  541. getScanPropertyData(Formpropertyid, Text, Column, Value) {
  542. return __awaiter(this, void 0, void 0, function* () {
  543. const url = 'apis/v4/unibase/platform/forms/scanproperty/formpropertyid/' + Formpropertyid + '/text/' + Text + '/columnname/' + Column + '/value/' + Value;
  544. return yield this.dataHelper().getAsync(url).then(function (response) {
  545. if (response.result != null && response.result != "") {
  546. response.result = JSON.parse(response.result);
  547. }
  548. return response;
  549. });
  550. });
  551. }
  552. getAutocompleteSelectedData(DocPropertyId, IdColumnValue, FormPropertyId, FormId) {
  553. return __awaiter(this, void 0, void 0, function* () {
  554. var url = _appsettings.server_url() + '/apis/v4/unibase/platform/forms/createnewsaveddata/docpropertyid/' + DocPropertyId + '/idcolumnvalue/' + IdColumnValue + '/formpropertyid/' + FormPropertyId + '/formid/' + FormId;
  555. return yield this.dataHelper().getAsync(url).then(function (response) {
  556. if (response.result !== null)
  557. response.result = JSON.parse(response.result);
  558. return response;
  559. });
  560. });
  561. }
  562. updateImagePickerData() {
  563. return __awaiter(this, void 0, void 0, function* () {
  564. const url = 'apis/v4/unibase/platform/forms/updateimagepickerdata/np';
  565. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  566. return response.message;
  567. });
  568. });
  569. }
  570. updateLock(InstalledAppId, FromDate, ToDate, IsLock) {
  571. return __awaiter(this, void 0, void 0, function* () {
  572. const url = 'apis/v4/unibase/platform/forms/updatelocktable/installedappid/' + Number(InstalledAppId) + '/fromdate/' + FromDate + '/todate/' + ToDate + '/islock/' + IsLock;
  573. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  574. return response;
  575. });
  576. });
  577. }
  578. static Instance() {
  579. if (this._instance === undefined)
  580. this._instance = new FormManager();
  581. return this._instance;
  582. }
  583. }
  584. Managers.FormManager = FormManager;
  585. })(Managers = Forms.Managers || (Forms.Managers = {}));
  586. })(Forms = Platform.Forms || (Platform.Forms = {}));
  587. })(Platform = Unibase.Platform || (Unibase.Platform = {}));
  588. })(Unibase || (Unibase = {}));