mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 04:24:01 +00:00
added the company profile frontend integration
This commit is contained in:
@@ -134,17 +134,22 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#regCert').click(function() {
|
||||
var fd = new FormData();
|
||||
var files = $('#reg_cert')[0].files[0];
|
||||
fd.append('reg_cert',files);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "api/company/reg_cert/5",
|
||||
data: {
|
||||
file:new FormData(this),
|
||||
},
|
||||
url: "api/company/reg_cert/",
|
||||
headers: {"Authorization": 'Bearer' + localStorage.getItem('token')},
|
||||
data:fd,
|
||||
// {
|
||||
// file:new FormData(this),
|
||||
// },
|
||||
contentType: false,
|
||||
cache: false,
|
||||
processData: false,
|
||||
success: function(data) {
|
||||
alert("success");
|
||||
alert("Upload successful");
|
||||
},
|
||||
error: function() {
|
||||
alert("Login Failed");}
|
||||
@@ -153,8 +158,9 @@
|
||||
|
||||
$('#companyDetails').click(function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
type: "PATCH",
|
||||
url: "api/company",
|
||||
headers: {"Authorization": 'Bearer' + localStorage.getItem('token')},
|
||||
data: {
|
||||
company_name: $('#company-name').val(),
|
||||
registration_no: $('#registration-no').val(),
|
||||
@@ -170,6 +176,7 @@
|
||||
},
|
||||
success: function(data) {
|
||||
alert("success");
|
||||
document.location.href="home.html";
|
||||
},
|
||||
error: function() {
|
||||
alert("Login Failed");}
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
password_confirmation:$('#password_confirmation').val()
|
||||
},
|
||||
success: function(data) {
|
||||
document.location.href="index.html";
|
||||
document.location.href="company-profile.html";
|
||||
},
|
||||
error: function() {
|
||||
alert("Failed");}
|
||||
|
||||
Reference in New Issue
Block a user