dashboard-job.init.js 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. /******/ (function() { // webpackBootstrap
  2. var __webpack_exports__ = {};
  3. /*!**************************************************!*\
  4. !*** ./resources/js/pages/dashboard-job.init.js ***!
  5. \**************************************************/
  6. /*
  7. Template Name: Skote - Admin & Dashboard Template
  8. Author: Themesbrand
  9. Website: https://themesbrand.com/
  10. Contact: themesbrand@gmail.com
  11. File: Dashboard job Init Js File
  12. */
  13. // get colors array from the string
  14. function getChartColorsArray(chartId) {
  15. if (document.getElementById(chartId) !== null) {
  16. var colors = document.getElementById(chartId).getAttribute("data-colors");
  17. if (colors) {
  18. colors = JSON.parse(colors);
  19. return colors.map(function (value) {
  20. var newValue = value.replace(" ", "");
  21. if (newValue.indexOf(",") === -1) {
  22. var color = getComputedStyle(document.documentElement).getPropertyValue(newValue);
  23. if (color){
  24. color = color.replace(" ", "");
  25. return color;
  26. }
  27. else return newValue;;
  28. } else {
  29. var val = value.split(',');
  30. if (val.length == 2) {
  31. var rgbaColor = getComputedStyle(document.documentElement).getPropertyValue(val[0]);
  32. rgbaColor = "rgba(" + rgbaColor + "," + val[1] + ")";
  33. return rgbaColor;
  34. } else {
  35. return newValue;
  36. }
  37. }
  38. });
  39. }
  40. }
  41. } // Job View
  42. var areacharteathereumColors = getChartColorsArray("eathereum_sparkline_charts");
  43. if (areacharteathereumColors) {
  44. var options = {
  45. series: [{
  46. name: "Job View",
  47. data: [36, 21, 65, 22, 35, 50, 87, 98]
  48. }],
  49. chart: {
  50. width: 130,
  51. height: 46,
  52. type: "area",
  53. sparkline: {
  54. enabled: true
  55. },
  56. toolbar: {
  57. show: false
  58. }
  59. },
  60. dataLabels: {
  61. enabled: false
  62. },
  63. stroke: {
  64. curve: "smooth",
  65. width: 1.5
  66. },
  67. fill: {
  68. type: "gradient",
  69. gradient: {
  70. shadeIntensity: 1,
  71. inverseColors: false,
  72. opacityFrom: 0.45,
  73. opacityTo: 0.05,
  74. stops: [50, 100, 100, 100]
  75. }
  76. },
  77. tooltip: {
  78. fixed: {
  79. enabled: false
  80. },
  81. x: {
  82. show: false
  83. },
  84. y: {
  85. title: {
  86. formatter: function formatter(seriesName) {
  87. return '';
  88. }
  89. }
  90. },
  91. marker: {
  92. show: false
  93. }
  94. },
  95. colors: areacharteathereumColors
  96. };
  97. var chart = new ApexCharts(document.querySelector("#eathereum_sparkline_charts"), options);
  98. chart.render();
  99. } // new_application_charts
  100. var newApplicationColors = getChartColorsArray("new_application_charts");
  101. if (newApplicationColors) {
  102. var options = {
  103. series: [{
  104. name: "New Application",
  105. data: [36, 48, 10, 74, 35, 50, 70, 73]
  106. }],
  107. chart: {
  108. width: 130,
  109. height: 46,
  110. type: "area",
  111. sparkline: {
  112. enabled: true
  113. },
  114. toolbar: {
  115. show: false
  116. }
  117. },
  118. dataLabels: {
  119. enabled: false
  120. },
  121. stroke: {
  122. curve: "smooth",
  123. width: 1.5
  124. },
  125. fill: {
  126. type: "gradient",
  127. gradient: {
  128. shadeIntensity: 1,
  129. inverseColors: false,
  130. opacityFrom: 0.45,
  131. opacityTo: 0.05,
  132. stops: [50, 100, 100, 100]
  133. }
  134. },
  135. tooltip: {
  136. fixed: {
  137. enabled: false
  138. },
  139. x: {
  140. show: false
  141. },
  142. y: {
  143. title: {
  144. formatter: function formatter(seriesName) {
  145. return '';
  146. }
  147. }
  148. },
  149. marker: {
  150. show: false
  151. }
  152. },
  153. colors: newApplicationColors
  154. };
  155. var chart = new ApexCharts(document.querySelector("#new_application_charts"), options);
  156. chart.render();
  157. } // total_approved_charts
  158. var totalApprovedColors = getChartColorsArray("total_approved_charts");
  159. if (totalApprovedColors) {
  160. var options = {
  161. series: [{
  162. name: "Total Approved",
  163. data: [60, 14, 5, 60, 30, 43, 65, 84]
  164. }],
  165. chart: {
  166. width: 130,
  167. height: 46,
  168. type: "area",
  169. sparkline: {
  170. enabled: true
  171. },
  172. toolbar: {
  173. show: false
  174. }
  175. },
  176. dataLabels: {
  177. enabled: false
  178. },
  179. stroke: {
  180. curve: "smooth",
  181. width: 1.5
  182. },
  183. fill: {
  184. type: "gradient",
  185. gradient: {
  186. shadeIntensity: 1,
  187. inverseColors: false,
  188. opacityFrom: 0.45,
  189. opacityTo: 0.05,
  190. stops: [50, 100, 100, 100]
  191. }
  192. },
  193. tooltip: {
  194. fixed: {
  195. enabled: false
  196. },
  197. x: {
  198. show: false
  199. },
  200. y: {
  201. title: {
  202. formatter: function formatter(seriesName) {
  203. return '';
  204. }
  205. }
  206. },
  207. marker: {
  208. show: false
  209. }
  210. },
  211. colors: totalApprovedColors
  212. };
  213. var chart = new ApexCharts(document.querySelector("#total_approved_charts"), options);
  214. chart.render();
  215. } // total_rejected_charts
  216. var totalApprovedColors = getChartColorsArray("total_rejected_charts");
  217. if (totalApprovedColors) {
  218. var options = {
  219. series: [{
  220. name: "Total Rejected",
  221. data: [32, 22, 7, 55, 20, 45, 36, 20]
  222. }],
  223. chart: {
  224. width: 130,
  225. height: 46,
  226. type: "area",
  227. sparkline: {
  228. enabled: true
  229. },
  230. toolbar: {
  231. show: false
  232. }
  233. },
  234. dataLabels: {
  235. enabled: false
  236. },
  237. stroke: {
  238. curve: "smooth",
  239. width: 1.5
  240. },
  241. fill: {
  242. type: "gradient",
  243. gradient: {
  244. shadeIntensity: 1,
  245. inverseColors: false,
  246. opacityFrom: 0.45,
  247. opacityTo: 0.05,
  248. stops: [50, 100, 100, 100]
  249. }
  250. },
  251. tooltip: {
  252. fixed: {
  253. enabled: false
  254. },
  255. x: {
  256. show: false
  257. },
  258. y: {
  259. title: {
  260. formatter: function formatter(seriesName) {
  261. return '';
  262. }
  263. }
  264. },
  265. marker: {
  266. show: false
  267. }
  268. },
  269. colors: totalApprovedColors
  270. };
  271. var chart = new ApexCharts(document.querySelector("#total_rejected_charts"), options);
  272. chart.render();
  273. }
  274. var statisticsApplicationColors = getChartColorsArray("chart");
  275. if (statisticsApplicationColors) {
  276. var options = {
  277. series: [{
  278. name: 'Companay',
  279. type: 'column',
  280. data: [30, 48, 28, 74, 39, 87, 54, 36, 50, 87, 84]
  281. }, {
  282. name: 'New Jobs',
  283. type: 'column',
  284. data: [20, 50, 42, 10, 24, 28, 60, 35, 47, 64, 78]
  285. }, {
  286. name: 'Total Jobs',
  287. type: 'area',
  288. data: [44, 55, 41, 67, 22, 43, 21, 41, 56, 27, 43]
  289. }, {
  290. name: 'Job View',
  291. type: 'line',
  292. data: [30, 25, 36, 30, 45, 35, 64, 52, 59, 36, 39]
  293. }],
  294. chart: {
  295. height: 350,
  296. type: 'line',
  297. stacked: false,
  298. toolbar: {
  299. show: false
  300. }
  301. },
  302. legend: {
  303. show: true,
  304. offsetY: 10
  305. },
  306. stroke: {
  307. width: [0, 0, 2, 2],
  308. curve: 'smooth'
  309. },
  310. plotOptions: {
  311. bar: {
  312. columnWidth: '30%'
  313. }
  314. },
  315. fill: {
  316. opacity: [1, 1, 0.1, 1],
  317. gradient: {
  318. inverseColors: false,
  319. shade: 'light',
  320. type: "vertical",
  321. opacityFrom: 0.85,
  322. opacityTo: 0.55,
  323. stops: [0, 100, 100, 100]
  324. }
  325. },
  326. labels: ['01/01/2022', '02/01/2022', '03/01/2022', '04/01/2022', '05/01/2022', '06/01/2022', '07/01/2022', '08/01/2022', '09/01/2022', '10/01/2022', '11/01/2022'],
  327. colors: statisticsApplicationColors,
  328. markers: {
  329. size: 0
  330. },
  331. xaxis: {
  332. type: 'datetime'
  333. },
  334. tooltip: {
  335. shared: true,
  336. intersect: false,
  337. y: {
  338. formatter: function formatter(y) {
  339. if (typeof y !== "undefined") {
  340. return y.toFixed(0) + " points";
  341. }
  342. return y;
  343. }
  344. }
  345. }
  346. };
  347. var chart = new ApexCharts(document.querySelector("#chart"), options);
  348. chart.render();
  349. }
  350. var ApplicationReveicedTimeColors = getChartColorsArray("application-received-time");
  351. if (ApplicationReveicedTimeColors) {
  352. var options = {
  353. series: [{
  354. name: 'Received Application',
  355. data: [34, 44, 54, 21, 12, 43, 33, 80, 66]
  356. }],
  357. chart: {
  358. type: 'line',
  359. height: 378,
  360. toolbar: {
  361. show: false
  362. }
  363. },
  364. // stroke: {
  365. // curve: 'stepline',
  366. // },
  367. stroke: {
  368. width: 3,
  369. curve: 'smooth'
  370. },
  371. labels: ['8 PM', '9 PM', '10 PM', '11 PM', '12 PM', '1 AM', '2 AM', '3 AM', '4 AM'],
  372. dataLabels: {
  373. enabled: false
  374. },
  375. colors: ApplicationReveicedTimeColors,
  376. markers: {
  377. hover: {
  378. sizeOffset: 4
  379. }
  380. }
  381. };
  382. var chart = new ApexCharts(document.querySelector("#application-received-time"), options);
  383. chart.render();
  384. }
  385. /******/ })()
  386. ;