diff --git a/static/js/main-new.js b/static/js/main-new.js index 5544ca7..e978ac4 100644 --- a/static/js/main-new.js +++ b/static/js/main-new.js @@ -161,12 +161,14 @@ var settings = { $.ajax(settings).done(function (response) { var form = new FormData(); form.append("grant_type", "client_credentials"); - form.append("client_id", "220df659-3f88-9184-7aae-64d0ca060409"); + //form.append("client_id", "220df659-3f88-9184-7aae-64d0ca060409"); + form.append("client_id", "2876ba3c-cae4-e1a5-7d8e-6673cf6a799f"); + //form.append("client_secret", "ioDlA7#09yyM"); form.append("client_secret", "ioDlA7#09yyM"); var settings = { "async": true, "crossDomain": true, - "url": "https://devl-crm.unblock.health/legacy/Api/access_token", + "url": "https://uat.crm.unblock.health/legacy/Api/access_token", "method": "POST", "headers": { "Accept": "application/vnd.api+json" @@ -182,7 +184,7 @@ $.ajax(settings).done(function (response) { var obj = $.parseJSON(response); var access_token = obj.access_token; var settings = { - "url": "https://devl-crm.unblock.health/legacy/Api/V8/module", + "url": "https://uat.crm.unblock.health/legacy/Api/V8/module", "method": "POST", "headers": { "Accept": "application/vnd.api+json", @@ -190,7 +192,7 @@ $.ajax(settings).done(function (response) { "Content-Type": "application/json" }, "processData": false, - "data": "{\r\n \"data\": {\r\n \"type\": \"Contacts\",\r\n \"id\": \"" + uid + "\",\r\n \"attributes\": {\r\n \"first_name\":\"" + first_name + "\",\r\n \"email1\":\"" + email + "\"\r\n,\r\n \"lead_source\":\"Web Site\"\r\n,\r\n \"title\":\"" + patientdetails + "\"\r\n,\r\n \"account_id\":\"c548fc60-389f-8f5b-5ecb-64cce0924678\"\r\n }\r\n }\r\n}\r\n" + "data": "{\r\n \"data\": {\r\n \"type\": \"Contacts\",\r\n \"id\": \"" + uid + "\",\r\n \"attributes\": {\r\n \"first_name\":\"" + first_name + "\",\r\n \"email1\":\"" + email + "\"\r\n,\r\n \"lead_source\":\"Web Site\"\r\n,\r\n \"title\":\"" + patientdetails + "\"\r\n,\r\n \"account_id\":\"aba27ce2-d758-bdeb-adef-5da4294bf9e8\"\r\n }\r\n }\r\n}\r\n" } $.ajax(settings).done(function (response) { @@ -212,7 +214,7 @@ $.ajax(settings).done(function (response) { var settings = { "async": true, "crossDomain": true, - "url": "https://devl-crm.unblock.health/legacy/Api/V8/module/Accounts/c548fc60-389f-8f5b-5ecb-64cce0924678/relationships", + "url": "https://uat.crm.unblock.health/legacy/Api/V8/module/Accounts/aba27ce2-d758-bdeb-adef-5da4294bf9e8/relationships", "method": "POST", "headers": { "Accept": "application/vnd.api+json", @@ -298,12 +300,12 @@ $('#contact-submit-live').prop('disabled', 'disabled'); description += 'Message: '+message; var form = new FormData(); form.append("grant_type", "client_credentials"); - form.append("client_id", "220df659-3f88-9184-7aae-64d0ca060409"); + form.append("client_id", "2876ba3c-cae4-e1a5-7d8e-6673cf6a799f"); form.append("client_secret", "ioDlA7#09yyM"); var settings = { "async": true, "crossDomain": true, - "url": "https://devl-crm.unblock.health/legacy/Api/access_token", + "url": "https://uat.crm.unblock.health/legacy/Api/access_token", "method": "POST", "headers": { "Accept": "application/vnd.api+json" @@ -319,7 +321,7 @@ $('#contact-submit-live').prop('disabled', 'disabled'); var obj = $.parseJSON(response); var access_token = obj.access_token; var settings = { - "url": "https://devl-crm.unblock.health/legacy/Api/V8/module", + "url": "https://uat.crm.unblock.health/legacy/Api/V8/module", "method": "POST", "headers": { "Accept": "application/vnd.api+json", @@ -327,7 +329,7 @@ $('#contact-submit-live').prop('disabled', 'disabled'); "Content-Type": "application/json" }, "processData": false, - "data": "{\r\n \"data\": {\r\n \"type\": \"Contacts\",\r\n \"id\": \"" + uid + "\",\r\n \"attributes\": {\r\n \"first_name\":\"" + first_name + "\",\r\n \"email1\":\"" + email + "\"\r\n,\r\n \"lead_source\":\"Web Site\"\r\n,\r\n \"title\":\"GEN\"\r\n,\r\n \"description\":\"" + description + "\"\r\n,\r\n \"account_id\":\"c548fc60-389f-8f5b-5ecb-64cce0924678\"\r\n }\r\n }\r\n}\r\n" + "data": "{\r\n \"data\": {\r\n \"type\": \"Contacts\",\r\n \"id\": \"" + uid + "\",\r\n \"attributes\": {\r\n \"first_name\":\"" + first_name + "\",\r\n \"email1\":\"" + email + "\"\r\n,\r\n \"lead_source\":\"Web Site\"\r\n,\r\n \"title\":\"GEN\"\r\n,\r\n \"description\":\"" + description + "\"\r\n,\r\n \"account_id\":\"aba27ce2-d758-bdeb-adef-5da4294bf9e8\"\r\n }\r\n }\r\n}\r\n" } $.ajax(settings).done(function (response) { //console.log(response.data.id); @@ -344,7 +346,7 @@ $('#contact-submit-live').prop('disabled', 'disabled'); var settings = { "async": true, "crossDomain": true, - "url": "https://devl-crm.unblock.health/legacy/Api/V8/module/Accounts/c548fc60-389f-8f5b-5ecb-64cce0924678/relationships", + "url": "https://uat.crm.unblock.health/legacy/Api/V8/module/Accounts/aba27ce2-d758-bdeb-adef-5da4294bf9e8/relationships", "method": "POST", "headers": { "Accept": "application/vnd.api+json",