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.

resumeparsing.js 35KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  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 Bizgaze;
  11. (function (Bizgaze) {
  12. let Apps;
  13. (function (Apps) {
  14. let Communications;
  15. (function (Communications) {
  16. let AI;
  17. (function (AI) {
  18. let Components;
  19. (function (Components) {
  20. class ResumeParsing extends Unibase.Platform.Core.BaseComponent {
  21. constructor() {
  22. super();
  23. this.inputParameters = [];
  24. this.reportIdGallery = null;
  25. this.fileValue = null;
  26. this.reqType = 1;
  27. this.resumeType = ['PDF', 'doc', 'docx'];
  28. this.businessCardsType = ['png', 'jpg', 'jpeg', 'JPEG', 'pdf'];
  29. this.salesInvoiceType = ['pdf'];
  30. this.currFile = '';
  31. this.navigationhelper = Unibase.Platform.Helpers.NavigationHelper.Instance();
  32. }
  33. cssFiles() {
  34. return [];
  35. }
  36. jsFiles() {
  37. return ["apps/communications/events/managers/gallerymanager.js", "apps/communications/ai/components/resumeparsingmanager.js"];
  38. }
  39. load(id, containerid, callback) {
  40. let instance = this;
  41. $('.resumeParsingInput, #formImgInput').change(function (e) {
  42. return __awaiter(this, void 0, void 0, function* () {
  43. if (e.currentTarget.files.length === 0) {
  44. return;
  45. }
  46. Unibase.Platform.Helpers.NavigationHelper.Instance().showLoading();
  47. let file = yield Unibase.Platform.Helpers.FileHelper.Instance().getBase64(e);
  48. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  49. let whichType = [];
  50. if (instance.reqType == 1) {
  51. whichType = instance.resumeType;
  52. }
  53. else if (instance.reqType == 2) {
  54. whichType = instance.businessCardsType;
  55. }
  56. else if (instance.reqType == 3) {
  57. whichType = instance.salesInvoiceType;
  58. }
  59. $('.fileMessageDisplay').removeClass('d-none');
  60. $('.fileMessageDisplay').html(`<span><span class="font-weight-700">File Name: </span><span>${file.FileName} </span></span>`);
  61. const lowercaseWords = whichType.map(word => word.toLowerCase());
  62. if (instance.checkIsValidFile(lowercaseWords, file.FileType.toLowerCase()) === false) {
  63. $('.resumeParsingButton').prop('disabled', true);
  64. let idGen = Math.random() * 999;
  65. idGen = `${idGen}_selectedFile`;
  66. $('.fileMessageDisplay').html(`<span class="${idGen} text-danger">Wrong File Selected</span>`);
  67. $('#formAIInputId').val('');
  68. $('#formImgInput').val('');
  69. setTimeout(function () {
  70. $('.fileMessageDisplay').addClass('d-none');
  71. $('.fileMessageDisplay').html('');
  72. }, 3000);
  73. return;
  74. }
  75. $('.resumeParsingButton').prop('disabled', false);
  76. $('.resumeParsingButtonDelete').removeClass('d-none');
  77. $(`.resumeDivImg`).removeClass('d-none');
  78. if (instance.reqType === 2) {
  79. if (file.FileType == 'pdf') {
  80. $(`.resumeDivImg img`).attr('src', `/tenants/themes/compact/imgs/fileuploaded.png`);
  81. }
  82. else {
  83. let baseString = yield instance.compressImgInputHandler(e);
  84. $(`.resumeDivImg img`).attr('src', `data:image/png;base64, ${file.FileData}`);
  85. file.FileData = `${baseString}`;
  86. }
  87. }
  88. else {
  89. $(`.resumeDivImg img`).attr('src', `/tenants/themes/compact/imgs/fileuploaded.png`);
  90. }
  91. $('.labelInputWhite').removeClass('d-flex').addClass('d-none');
  92. instance.fileValue = file;
  93. });
  94. });
  95. $('.resumeParsingButtonDelete').click(function (e) {
  96. $('.resumeParsingButtonDelete').addClass('d-none');
  97. $('.labelInputWhite').addClass('d-flex').removeClass('d-none');
  98. $(`.resumeDivImg`).addClass('d-none');
  99. $('.fileMessageDisplay').html('');
  100. $('.fileMessageDisplay').addClass('d-none');
  101. $('#formAIInputId').val('');
  102. $('#formImgInput').val('');
  103. });
  104. $('.resumeParsingButton').click(function (e) {
  105. return __awaiter(this, void 0, void 0, function* () {
  106. e.preventDefault();
  107. Unibase.Platform.Helpers.NavigationHelper.Instance().showLoading();
  108. if (instance.fileValue === null) {
  109. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  110. return;
  111. }
  112. ;
  113. let file = instance.fileValue;
  114. let payload = {
  115. "FileData": file.FileData,
  116. "FileName": file.FileName,
  117. "FilePath": "test",
  118. "FileType": instance.fileValue.FileType
  119. };
  120. let message = '';
  121. $('.fileMessageDisplay').removeClass('d-none');
  122. $('.fileMessageDisplay').html(file.FileName);
  123. try {
  124. if (instance.reqType == 1) {
  125. message = yield instance.postResume(payload);
  126. }
  127. else if (instance.reqType == 2) {
  128. message = yield instance.postBusinessCard(payload);
  129. }
  130. }
  131. catch (err) {
  132. console.log(err);
  133. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  134. MessageHelper.Instance().showError(err === null || err === void 0 ? void 0 : err.message, "div_message");
  135. return;
  136. }
  137. let res = JSON.parse(message.result);
  138. if (message.result === 'Invalid image') {
  139. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  140. MessageHelper.Instance().showError("Invalid image", "div_message");
  141. return;
  142. }
  143. if (res.status == 0) {
  144. $('.fileMessageDisplay').removeClass('d-none');
  145. $('.fileMessageDisplay').html(`<span class="text-success">Upload Successs</span>`);
  146. }
  147. else {
  148. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  149. MessageHelper.Instance().showError(res.message, "div_message");
  150. return;
  151. }
  152. if (message.message == 'Email Already Exists, Mobile Number Already Exists' || message.message == 'Phone Number Already Exists, Email Already Exists') {
  153. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  154. MessageHelper.Instance().showError(message.message, "div_message");
  155. return;
  156. }
  157. if (message.code != '0') {
  158. $('.fileMessageDisplay').removeClass('d-none');
  159. if ((message === null || message === void 0 ? void 0 : message.message) == '') {
  160. $('.fileMessageDisplay').html(`<span class="text-danger">${message === null || message === void 0 ? void 0 : message.code}</span>`);
  161. }
  162. else {
  163. $('.fileMessageDisplay').html(`<span class="text-danger">${message === null || message === void 0 ? void 0 : message.message}</span>`);
  164. }
  165. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  166. setTimeout(function () {
  167. $('.fileMessageDisplay').addClass('d-none');
  168. $('.fileMessageDisplay').html('');
  169. }, 3000);
  170. return;
  171. }
  172. if (res === null) {
  173. $('.fileMessageDisplay').removeClass('d-none');
  174. if ((message === null || message === void 0 ? void 0 : message.message) == '') {
  175. $('.fileMessageDisplay').html(`<span class="text-danger">${message === null || message === void 0 ? void 0 : message.code}</span>`);
  176. }
  177. else {
  178. $('.fileMessageDisplay').html(`<span class="text-danger">${message === null || message === void 0 ? void 0 : message.message}</span>`);
  179. }
  180. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  181. setTimeout(function () {
  182. $('.fileMessageDisplay').addClass('d-none');
  183. $('.fileMessageDisplay').html('');
  184. }, 3000);
  185. return;
  186. }
  187. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  188. $('.fileMessageDisplay').removeClass('d-none');
  189. $('.fileMessageDisplay').html('');
  190. $('#' + containerid).modal('hide');
  191. $('#' + containerid).remove();
  192. Unibase.Platform.Helpers.NavigationHelper.Instance().loadDetail(Number(res.result), Unibase.Platform.Helpers.NavigationHelper.installedAppId, null);
  193. Unibase.Platform.Helpers.NavigationHelper.IsListRefresh = true;
  194. });
  195. });
  196. if (instance.reqType == 1) {
  197. let htmlstr = instance.appendTextValuesValid(instance.resumeType);
  198. let isMoblie = !(Unibase.Themes.Compact.Components.Index.Instance().desktopMode == true);
  199. let addHTMLMOBILE = `<label for="formAIInputId"><button class="btn btn-primary btn-sm clickEventDisabled">${htmlstr}</button></label>`;
  200. let str = addHTMLMOBILE;
  201. $('.onlyValuesDisplayAI').html(str);
  202. }
  203. else if (instance.reqType == 2) {
  204. let isMoblie = !(Unibase.Themes.Compact.Components.Index.Instance().desktopMode == true);
  205. let addHTMLMOBILE = `<label for="formImgInput"><button class="btn btn-primary btn-sm clickEventDisabled">Browse Images</button></label>`;
  206. if (!isMoblie) {
  207. addHTMLMOBILE = '';
  208. }
  209. let str = `<div class="">
  210. <div class="font-14 text-light-60">Drag & Drop files here</div>
  211. <div class="text-light-60 text-center my-2">or</div>
  212. <div class="text-center"><div><label for="formAIInputId"><button class="btn btn-primary btn-sm clickEventDisabled">Browse Files</button></label></div><div class="mobilemodeInput">
  213. ${addHTMLMOBILE}
  214. </div></div>
  215. </div>`;
  216. $('.onlyValuesDisplayAI').html(str);
  217. }
  218. $('.labelInputWhite').on('dragenter', function (e) {
  219. e.stopPropagation();
  220. e.preventDefault();
  221. $('.labelInputWhite').addClass('dragEnterResume');
  222. });
  223. $('.labelInputWhite').on('dragleave', function (e) {
  224. e.stopPropagation();
  225. e.preventDefault();
  226. $('.labelInputWhite').removeClass('dragEnterResume');
  227. });
  228. $('.labelInputWhite').on('dragstop', function (e) {
  229. $('.labelInputWhite').removeClass('dragEnterResume');
  230. });
  231. $('.labelInputWhite').on('dragover', function (e) {
  232. e.stopPropagation();
  233. e.preventDefault();
  234. });
  235. $('.labelInputWhite').on('drop', function (e) {
  236. return __awaiter(this, void 0, void 0, function* () {
  237. e.stopPropagation();
  238. e.preventDefault();
  239. $('.labelInputWhite').removeClass('dragEnterResume');
  240. Unibase.Platform.Helpers.NavigationHelper.Instance().showLoading();
  241. let event = {
  242. target: {
  243. files: e.originalEvent.dataTransfer.files
  244. }
  245. };
  246. let file = yield Unibase.Platform.Helpers.FileHelper.Instance().getBase64(event);
  247. let whichType = [];
  248. if (instance.reqType == 1) {
  249. whichType = instance.resumeType;
  250. }
  251. else if (instance.reqType == 2) {
  252. whichType = instance.businessCardsType;
  253. }
  254. else if (instance.reqType == 3) {
  255. whichType = instance.salesInvoiceType;
  256. }
  257. if (instance.checkIsValidFile(whichType, file.FileType) === false) {
  258. $('.resumeParsingButton').prop('disabled', true);
  259. let idGen = Math.random() * 999;
  260. idGen = `${idGen}_selectedFile`;
  261. $('.fileMessageDisplay').removeClass('d-none');
  262. $('.fileMessageDisplay').html(`<span class="${idGen} text-danger">Wrong File Selected</span>`);
  263. $('#formAIInputId').val('');
  264. $('#formImgInput').val('');
  265. setTimeout(function () {
  266. $('.fileMessageDisplay').addClass('d-none');
  267. $('.fileMessageDisplay').html('');
  268. }, 5000);
  269. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  270. return;
  271. }
  272. if (instance.reqType === 2) {
  273. $(`.resumeDivImg img`).attr('src', `data:image/png;base64, ${file.FileData}`);
  274. let baseString = yield instance.compressImgInputHandler(e);
  275. file.FileData = `${baseString}`;
  276. }
  277. else {
  278. $(`.resumeDivImg img`).attr('src', `/tenants/themes/compact/imgs/fileuploaded.png`);
  279. }
  280. $('.labelInputWhite').addClass('d-none').removeClass('d-flex');
  281. $(`.resumeDivImg`).removeClass('d-none');
  282. $('.resumeParsingButton').prop('disabled', false);
  283. $('.resumeParsingButtonDelete').removeClass('d-none');
  284. $('.fileMessageDisplay').removeClass('d-none');
  285. $('.fileMessageDisplay').html(`<span><span class="font-w700">File Name: </span><span class="">${file.FileName} </span></span>`);
  286. instance.fileValue = file;
  287. Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
  288. });
  289. });
  290. }
  291. createLead() {
  292. let detailContainer = "#" + Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
  293. if (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_stagename").Value != "Lead") {
  294. $(detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_ConvertToLead').click(function () {
  295. if (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_stagename").Value != "Lead") {
  296. var postData = {
  297. CONTACTPERSONNAME: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_contactpersonname").Value,
  298. Designation: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_designation").Value,
  299. PhoneNumber: Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_phonenumber").Value),
  300. Email: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_email").Value,
  301. ADDRESS: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_address").Value,
  302. PinCode1: Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_pincode1").Value),
  303. country_code: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_countrycode").Value,
  304. LandMark1: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_landmark1").Value,
  305. state_name: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_statename").Value,
  306. state_code: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_statecode").Value,
  307. CityName1: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_cityname1").Value,
  308. Urls: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_urls").Value,
  309. OrganizationName: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_organizationname").Value,
  310. OrganizationNumber: Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_organizationnumber").Value),
  311. OrganizationEmail: Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_organizationemail").Value
  312. };
  313. var installedappid = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_installedappid").Value;
  314. Unibase.Apps.Collaboration.ResumeParsingManager.Instance().createLead(postData).then(function (res) {
  315. if (res.message == "Lead Saved Successfully") {
  316. Unibase.Platform.Apps.Managers.StageManager.Instance().getStageByStageName(installedappid, "Lead").then(function (response) {
  317. Unibase.Themes.Compact.Components.Details.Instance().change(response.result.StageId, installedappid);
  318. $('.li_DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_ConvertToLead').hide();
  319. });
  320. MessageHelper.Instance().showSuccess(res.message, "Unibase_ValidationSummary");
  321. }
  322. else
  323. $('.li_DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_ConvertToLead').show();
  324. MessageHelper.Instance().showSuccess(res.message, "Unibase_ValidationSummary");
  325. });
  326. }
  327. else
  328. $("#div_App_DefaultWidgetSettings").hide();
  329. });
  330. }
  331. else
  332. $("#div_App_DefaultWidgetSettings").hide();
  333. }
  334. postResume(payload) {
  335. return __awaiter(this, void 0, void 0, function* () {
  336. let instance = this;
  337. let res = yield Unibase.Apps.Collaboration.ResumeParsingManager.Instance().postResume(payload);
  338. return res;
  339. });
  340. }
  341. postBusinessCard(payload) {
  342. return __awaiter(this, void 0, void 0, function* () {
  343. let res = yield Unibase.Apps.Collaboration.ResumeParsingManager.Instance().postbusinessCard(payload);
  344. return res;
  345. });
  346. }
  347. compressImgInputHandler(ev) {
  348. let instance = this;
  349. let imageFormat = 'jpeg';
  350. return new Promise((reslove, reject) => {
  351. const MAX_WIDTH = 1000;
  352. const MAX_HEIGHT = 1000;
  353. const MIME_TYPE = 'image/' + imageFormat;
  354. const QUALITY = 1;
  355. const file = ev.target.files[0];
  356. const blobURL = URL.createObjectURL(file);
  357. const img = new Image();
  358. img.src = blobURL;
  359. img.onerror = function () {
  360. reject("Cannot load image");
  361. URL.revokeObjectURL(this.src);
  362. console.log("Cannot load image");
  363. };
  364. img.onload = function () {
  365. const [newWidth, newHeight] = instance.calculateSize(img, MAX_WIDTH, MAX_HEIGHT);
  366. const canvas = document.createElement("canvas");
  367. canvas.width = newWidth;
  368. canvas.height = newHeight;
  369. const ctx = canvas.getContext("2d");
  370. ctx.drawImage(img, 0, 0, newWidth, newHeight);
  371. canvas.toBlob((blob) => {
  372. const formData = new FormData();
  373. formData.append('file', blob);
  374. for (let [name, value] of formData) {
  375. if (name === 'file') {
  376. let reader = new FileReader();
  377. reader.onloadend = function () {
  378. let base64String = `${reader.result}`.replace(/^data:.+;base64,/, "");
  379. reslove(base64String);
  380. };
  381. reader.readAsDataURL(blob);
  382. }
  383. }
  384. }, MIME_TYPE, QUALITY);
  385. };
  386. });
  387. }
  388. calculateSize(img, maxWidth, maxHeight) {
  389. let width = img.width;
  390. let height = img.height;
  391. if (width > height) {
  392. if (width > maxWidth) {
  393. height = Math.round((height * maxWidth) / width);
  394. width = maxWidth;
  395. }
  396. }
  397. else {
  398. if (height > maxHeight) {
  399. width = Math.round((width * maxHeight) / height);
  400. height = maxHeight;
  401. }
  402. }
  403. return [width, height];
  404. }
  405. appendTextValuesValid(arr) {
  406. let values = '';
  407. for (let i = 0; i < arr.length; i++) {
  408. if (i != arr.length - 1) {
  409. values = values + `${arr[i]},`;
  410. }
  411. else {
  412. values = values + arr[i];
  413. }
  414. }
  415. let str = `Click To Browse <span class="font-weight-700">${values}</span> to Upload`;
  416. return str;
  417. }
  418. getLabelHTML() {
  419. return `<label for="formAIInputId" class="p-5 d-flex flex-column bg-white rounded-10">
  420. <div class="font-50 text-center">
  421. <img src="/tenants/themes/compact/imgs/scanai.png" />
  422. </div>
  423. <div class="onlyValuesDisplayAI">
  424. Click To Browse PDF to Upload
  425. </div>
  426. <input id="formAIInputId" class="resumeParsingInput d-none" type="file">
  427. </label>`;
  428. }
  429. checkIsValidFile(values, type) {
  430. const twoLower = type.toLowerCase();
  431. for (let i = 0; i < values.length; i++) {
  432. if (twoLower == values[i]) {
  433. return true;
  434. }
  435. }
  436. return false;
  437. }
  438. init(containerid) {
  439. }
  440. html(id, containerid) {
  441. let html = `
  442. <div id="img-modal" class="modal-content h-100">
  443. <div id="div_message" class="clear"></div>
  444. <div class="modal-body bg-white simple-scroll-bar edit-filters-body py-0 bg-cyan-light-5">
  445. <div class="align-items-center d-flex flex-column d-flex h-100 justify-content-center w-100">
  446. <div class="parsingForm m-0 p-0 w-400p h-450p w-md-500p justify-content-center align-items-center py-5 border-dashed d-flex flex-column" style="border: 4px #beccd6;">
  447. <div class="resumeParsingButtonDelete d-none"> <i class="fa fa-trash-o text-danger font-18"></i> </div>
  448. <div class="resumeDivImg d-none my-2 rounded overflow-hide" >
  449. <img class="w-100 h-100" src="" />
  450. </div>
  451. <div for="formAIInputId" class=" d-flex flex-column align-items-center m-0 labelInputWhite h-100 w-100 rounded-10">
  452. <div class="d-flex flex-column justify-content-center align-items-center h-100 w-100">
  453. <div class="font-50 w-100p text-center clickEventDisabled">
  454. <img class="w-100" src="/tenants/themes/compact/imgs/cloudresume.png" />
  455. </div>
  456. <div class="onlyValuesDisplayAI ">
  457. Click To Browse PDF to Upload
  458. </div>
  459. <input id="formAIInputId" class="resumeParsingInput m-0 d-none" type="file">
  460. <input id="formImgInput" class="m-0 d-none" accept="image/*" type="file">
  461. </div>
  462. </div>
  463. </div>
  464. <div class="mt-20">
  465. </div>
  466. <div class="text-center py-30 d-none fileMessageDisplay"></div>
  467. </div>
  468. <div class="spinner-border" role="status">
  469. <span class="sr-only">Loading...</span>
  470. </div>
  471. </div>
  472. <div class="modal-footer pa-10"> <button type="button"
  473. onclick="Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp()" id="btn_CloseForm_${id}"
  474. class="btn btn-light btn-sm mr-auto">Close</button>
  475. <button disabled class="btn btn-primary resumeParsingButton btn-sm" type="button">Submit</button>
  476. </div>
  477. </div>`;
  478. return html;
  479. }
  480. callResumeParsing(type = 1) {
  481. let instances = this;
  482. instances.reqType = type;
  483. instances.navigationHelper.popup(0, '', this, null, Unibase.Platform.Helpers.Size.Medium);
  484. }
  485. static Instance() {
  486. if (this.instance === undefined) {
  487. this.instance = new ResumeParsing();
  488. }
  489. return this.instance;
  490. }
  491. }
  492. Components.ResumeParsing = ResumeParsing;
  493. })(Components = AI.Components || (AI.Components = {}));
  494. })(AI = Communications.AI || (Communications.AI = {}));
  495. })(Communications = Apps.Communications || (Apps.Communications = {}));
  496. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  497. })(Bizgaze || (Bizgaze = {}));