Built files from Bizgaze WebServer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

termination.js 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Crm;
  6. (function (Crm) {
  7. let Employees;
  8. (function (Employees) {
  9. let Components;
  10. (function (Components) {
  11. class Termination extends Unibase.Platform.Core.BaseComponent {
  12. cssFiles() {
  13. return [];
  14. }
  15. jsFiles() {
  16. return [''];
  17. }
  18. html(id, containerid) {
  19. return "";
  20. }
  21. init(containerid) {
  22. }
  23. load(id, containerid, callback) {
  24. }
  25. Termination() {
  26. let detailContainer = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
  27. let refstatusId = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) {
  28. return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_refstatusid";
  29. })[0].Value);
  30. let stageName = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) {
  31. return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_stagename";
  32. })[0].Value);
  33. var instance = this;
  34. $("#" + detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Termination').click(function () {
  35. let uniqueid = 'bizgazecrm_contacts_terminate';
  36. Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(['platform/forms/managers/formmanager.js', 'platform/forms/components/formviewer/formviewer.js', 'platform/forms/requests/forms.js'], function () {
  37. Unibase.Platform.Forms.Managers.FormManager.Instance().getFormbyUniqueId(uniqueid).then(function (res) {
  38. var formid = res.result.FormId;
  39. var successobj = {
  40. CallBack: function () {
  41. var employeeid = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.filter(function (o) {
  42. return o.Key === "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_employeeid";
  43. })[0].Value);
  44. debugger;
  45. instance.TerminationStage(employeeid);
  46. },
  47. Parameters: null,
  48. };
  49. var formviewerObj = {
  50. FormId: formid,
  51. AppConfigurationId: 0,
  52. Pk_Value: 0,
  53. PortletWidgetId: 0,
  54. OnSuccess: successobj,
  55. OnFail: null,
  56. OnLoad: null,
  57. };
  58. Unibase.Platform.Forms.Components.FormViewer.Instance().init(formviewerObj);
  59. });
  60. });
  61. });
  62. }
  63. TerminationStage(employeeid) {
  64. var instance = this;
  65. var jsfiles = ['apps/crm/employees/components/termination.js', 'apps/crm/employees/managers/employeemanager.js'];
  66. instance.fileCacheHelper.loadJsFiles(jsfiles, function (response) {
  67. Bizgaze.Apps.Crm.Employees.Managers.EmployeeManager.Instance().TerminationStage(employeeid).then(function (response) {
  68. MessageHelper.Instance().showSuccess(response.message, '');
  69. var detailobj = Unibase.Themes.Compact.Components.Details.Instance();
  70. detailobj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
  71. detailobj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  72. detailobj._containerId = instance.navigationHelper.getLastContainerId();
  73. var IdetailObj = detailobj;
  74. detailobj.loadPortlets(IdetailObj);
  75. instance.Termination();
  76. });
  77. });
  78. }
  79. calendar() {
  80. const dateFormat = moment().format("DD/MM/YYYY");
  81. $(".date_finalsettlementdate").daterangepicker({
  82. startDate: dateFormat,
  83. autoUpdateInput: false,
  84. singleDatePicker: true,
  85. showDropdowns: true,
  86. minYear: 1901,
  87. minDate: dateFormat,
  88. locale: {
  89. format: 'DD/MM/YYYY',
  90. firstDay: 1,
  91. },
  92. });
  93. }
  94. static Instance() {
  95. if (this._instance === undefined)
  96. this._instance = new Termination();
  97. return this._instance;
  98. }
  99. }
  100. Components.Termination = Termination;
  101. })(Components = Employees.Components || (Employees.Components = {}));
  102. })(Employees = Crm.Employees || (Crm.Employees = {}));
  103. })(Crm = Apps.Crm || (Apps.Crm = {}));
  104. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  105. })(Bizgaze || (Bizgaze = {}));