HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall_new/buyercall/build/public/contact_note_js.03509e6624df885befc7.js
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "https://buyercalltmp.spericorn.com/static/assets/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 26);
/******/ })
/************************************************************************/
/******/ ({

/***/ "./buyercall/assets/scripts/mobile/contact_note.js":
/*!*********************************************************!*\
  !*** ./buyercall/assets/scripts/mobile/contact_note.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("$(function () {\n  getContactNoteList();\n  end_url = location.href.split('/')[5];\n  $(\"#nav-details\").attr(\"href\", \"/mobile/contact_detail/\" + end_url + location.search);\n  $(\"#nav-timeline\").attr(\"href\", \"/mobile/timeline/\" + end_url + location.search);\n});\nfunction getContactNoteList() {\n  params = new URLSearchParams(location.search);\n  username = params.get('username');\n  password = params.get('password');\n  contact_id = window.location.pathname.split('/')[3];\n  $.ajax({\n    type: \"GET\",\n    url: \"/mobile/contact_notes_list/\" + contact_id,\n    data: {\n      \"username\": username,\n      \"password\": password\n    },\n    success: function success(result) {\n      $(\"#notesList\").html(result.html_content);\n      $('.notes-edit-btn').click(function () {\n        $(this).closest(\".message-wrapper\").find('.message p').attr(\"contenteditable\", true);\n        $(this).closest(\".notes-card\").find('.save-note-btn').attr(\"hidden\", false);\n      });\n      $('.save-note-btn').click(function () {\n        para = $(this).closest(\".notes-card\").find('.message p');\n        para.attr(\"contenteditable\", false);\n        updateNote(para.text(), para.attr(\"data-id\"));\n        $(this).attr(\"hidden\", true);\n      });\n      $(\".rm-note-btn\").click(function () {\n        note_id = $(this).attr(\"data-id\");\n        $(\"#dlt-note-id\").val(note_id);\n        $(\"#removeToModal\").modal(\"show\");\n      });\n    }\n  });\n}\nfunction createNote(note) {\n  params = new URLSearchParams(location.search);\n  username = params.get('username');\n  password = params.get('password');\n  contact_id = window.location.pathname.split('/')[3];\n  $.ajax({\n    type: \"POST\",\n    url: \"/mobile/add_note/\" + contact_id,\n    data: {\n      \"username\": username,\n      \"password\": password,\n      \"note\": note\n    },\n    success: function success(result) {\n      if (result.status) {\n        window.location.reload();\n      } else {\n        $(\"#addNoteModal\").modal(\"hide\");\n        $(\"#error-msg\").text(result.error);\n        $(\"#validationError\").modal('show');\n      }\n    }\n  });\n}\nfunction updateNote(note, note_id) {\n  params = new URLSearchParams(location.search);\n  username = params.get('username');\n  password = params.get('password');\n  contact_id = window.location.pathname.split('/')[3];\n  $.ajax({\n    type: \"POST\",\n    url: \"/mobile/edit_note/\" + contact_id,\n    data: {\n      \"username\": username,\n      \"password\": password,\n      \"note\": note,\n      \"note_id\": note_id\n    },\n    success: function success(result) {\n      if (result.status) {\n        // window.location.reload();\n      }\n    }\n  });\n}\nfunction deleteNote(note_id) {\n  params = new URLSearchParams(location.search);\n  username = params.get('username');\n  password = params.get('password');\n  $.ajax({\n    type: \"POST\",\n    url: \"/mobile/delete_note/\" + note_id,\n    data: {\n      \"username\": username,\n      \"password\": password\n    },\n    success: function success(result) {\n      if (result.status) {\n        window.location.reload();\n      }\n    }\n  });\n}\n$(\"#add-note-button\").on(\"click\", function () {\n  note = $(\"#new-note\").val();\n  createNote(note);\n});\n$(\".btn-dlt\").on(\"click\", function () {\n  note = $(\"#dlt-note-id\").val();\n  deleteNote(note);\n});\n$(\"#back-to-contact\").on(\"click\", function () {\n  if ($(\".save-note-btn:visible\").length) {\n    $(\"#modal-ok-link\").attr(\"href\", \"/mobile/contact_leads/detail\" + location.search);\n    $(\"#backToModal\").modal('show');\n  } else {\n    location.href = \"/mobile/contact_leads/detail\" + location.search;\n  }\n});\n\n//# sourceURL=webpack:///./buyercall/assets/scripts/mobile/contact_note.js?");

/***/ }),

/***/ 26:
/*!***************************************************************!*\
  !*** multi ./buyercall/assets/scripts/mobile/contact_note.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! /home/arjun/projects/buyercall_new/buyercall/buyercall/assets/scripts/mobile/contact_note.js */\"./buyercall/assets/scripts/mobile/contact_note.js\");\n\n\n//# sourceURL=webpack:///multi_./buyercall/assets/scripts/mobile/contact_note.js?");

/***/ })

/******/ });