mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 04:24:01 +00:00
done frontend integration: verify phone, verify code, first profile pages, company profile page is on going
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>AzureUI - Term</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,900" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/global.style.css" />
|
||||
<style>
|
||||
.header {
|
||||
width:relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#backbtn {
|
||||
padding: 20px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#heading {
|
||||
float:right;
|
||||
padding: 20px;
|
||||
clear: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header area start-->
|
||||
<div class="header">
|
||||
<div id="backbtn">
|
||||
<a class="go-back-linkC"><i class="fa fa-arrow-left"></i></a>
|
||||
</div>
|
||||
|
||||
<div id="heading">
|
||||
<h1 class="page-title" style="color: #000">Company Profile</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Header area end -->
|
||||
<!-- Main Content Start Here -->
|
||||
<div class="container">
|
||||
<main class="fix-top-menu">
|
||||
<section class="container">
|
||||
<form>
|
||||
<div class="form-row txt-center">
|
||||
<div class="profile-image">
|
||||
<div class="profile-image-com">
|
||||
<img id="CompanyProfile" class="avatar-img" src="images/CIEF.png" width="80" height="80" />
|
||||
<label class="update-btn fix">
|
||||
<input id="CompanyUpload" type="file" style="display:none" />
|
||||
<i class="fa fa-camera"></i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row txt-center">
|
||||
<label class="update-btn fix">
|
||||
<input id="reg_cert" type="file" style="display:none" /> Please upload the registration certificate
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-label-divider">
|
||||
<span class="label-span">Company Information</span>
|
||||
</div>
|
||||
|
||||
<div class="form-divider"></div>
|
||||
|
||||
<div class="form-divider"></div>
|
||||
|
||||
<div class="form-row-group">
|
||||
<div class="form-row no-padding">
|
||||
<input id="company-name" type="text" class="form-element" placeholder="Company Name" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="registration-no" type="text" class="form-element" placeholder="Registration No" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="tax-no" type="text" class="form-element" placeholder="Tax No" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="tel-no" type="text" class="form-element" placeholder="Tel No" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="fax" type="text" class="form-element" placeholder="Fax" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="address" type="text" class="form-element" placeholder="Address" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="city" type="text" class="form-element" placeholder="City" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="postcode" type="text" class="form-element" placeholder="Postcode" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="state" type="text" class="form-element" placeholder="State" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="country" type="text" class="form-element" placeholder="Country" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="contact-person" type="text" class="form-element" placeholder="Contact Person" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<input id="contact-person-no" type="text" class="form-element" placeholder="Contact Person No" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-divider"></div>
|
||||
|
||||
<div class="form-row txt-center">
|
||||
<a href="#" style="width:50%; margin-left:25%;" class="button block green">Edit</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
<!-- Main Content End Here -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -47,48 +47,38 @@
|
||||
<div class="form-element-title">
|
||||
<label style="color: #000">Role</label>
|
||||
</div>
|
||||
<select class="form-element">
|
||||
<select id="role" class="form-element">
|
||||
<option value="">Please select your role</option>
|
||||
<option value="1">Freight Forwarder</option>
|
||||
<option value="2">Importer</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-row no-padding">
|
||||
<div class="form-element-title">
|
||||
<label style="color: #000">First Name</label>
|
||||
<label style="color: #000">Full Name</label>
|
||||
</div>
|
||||
<input type="text" class="form-element" placeholder="Fedrick Darel" required />
|
||||
<input id="name"type="text" class="form-element" placeholder="Enter your full name" required />
|
||||
</div>
|
||||
|
||||
<div class="form-row no-padding">
|
||||
<div class="form-element-title">
|
||||
<label style="color: #000">Last Name</label>
|
||||
<label style="color: #000">Password</label>
|
||||
</div>
|
||||
<input type="text" class="form-element" placeholder="Auditore" required />
|
||||
<input id="password" type="password" class="form-element" placeholder="Enter your Password" required />
|
||||
</div>
|
||||
|
||||
<div class="form-row no-padding">
|
||||
<div class="form-element-title">
|
||||
<label style="color: #000">E-Mail</label>
|
||||
<label style="color: #000">Confirm Password</label>
|
||||
</div>
|
||||
<input type="text" class="form-element" placeholder="fedrickdarel@gmail.com" required />
|
||||
<input id="password_confirmation" type="password" class="form-element" placeholder="Enter the password again" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<div class="form-element-title">
|
||||
<label style="color: #000">Website</label>
|
||||
</div>
|
||||
<input type="text" class="form-element" placeholder="http://www.Azure.com" required />
|
||||
</div>
|
||||
<div class="form-row no-padding">
|
||||
<div class="form-element-title">
|
||||
<label style="color: #000">Position</label>
|
||||
</div>
|
||||
<input type="text" class="form-element" placeholder="CEO" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-divider"></div>
|
||||
|
||||
<div class="form-row txt-center">
|
||||
<a href="index.html" class="button block green">FINISH</a>
|
||||
<a href="#" id="pers-info" class="button block green">FINISH</a>
|
||||
</div>
|
||||
|
||||
<div class="form-divider"></div>
|
||||
@@ -104,6 +94,28 @@
|
||||
<script src="js/jquery-3.2.1.min.js"></script>
|
||||
<script src="js/global.script.js"></script>
|
||||
<!-- Require For All Pages -->
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#pers-info').click(function() {
|
||||
$.ajax({
|
||||
type: "PATCH",
|
||||
url: "api/user",
|
||||
headers: {"Authorization": 'Bearer' + localStorage.getItem('token')},
|
||||
data: {
|
||||
role:$('#role').val(),
|
||||
name: $('#name').val(),
|
||||
password: $('#password').val(),
|
||||
password_confirmation:$('#password_confirmation').val()
|
||||
},
|
||||
success: function(data) {
|
||||
document.location.href="index.html";
|
||||
},
|
||||
error: function() {
|
||||
alert("Failed");}
|
||||
})
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -15,11 +15,11 @@
|
||||
<div class="form-divider"></div>
|
||||
|
||||
<div class="form-row txt-center aztitle">
|
||||
Verify +60 19-795-1905
|
||||
Verify Phone
|
||||
</div>
|
||||
|
||||
<div class="form-row txt-center">
|
||||
Waiting to automatically detect an SMS sent to <b>+60 19-795 1905</b>.<a> Wrong number?</a>
|
||||
A verification code has been send to <b><span id="phone"></span></b>.<a><br> Wrong number?</a>
|
||||
</div>
|
||||
|
||||
<div class="form-divider"></div>
|
||||
@@ -32,15 +32,15 @@
|
||||
<div class="form-element-code">
|
||||
<label style="color: #000">Enter Verification Code</label>
|
||||
</div>
|
||||
<input type="text" class="form-element-code-input" placeholder="" required />
|
||||
<input type="text" id="verify-code" class="form-element-code-input" placeholder="" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- AzFooter Start Here-->
|
||||
<div class="azfooter-code">
|
||||
<div class="azfmain-button">
|
||||
<div class="azfooter-code" id="btn-verify" style="margin-top:50px">
|
||||
<div class="azfmain-button" >
|
||||
<div class="form-row txt-center">
|
||||
<a href="profile-first-setup.html" class="button block green">NEXT</a>
|
||||
<a href="#" class="button block green">NEXT</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,6 +51,47 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function readCookie(name) {
|
||||
var nameEQ = encodeURIComponent(name) + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) === ' ')
|
||||
c = c.substring(1, c.length);
|
||||
if (c.indexOf(nameEQ) === 0)
|
||||
return decodeURIComponent(c.substring(nameEQ.length, c.length));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var phone = readCookie('phone');
|
||||
document.getElementById("phone").innerHTML = phone;
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#btn-verify').click(function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "api/verify-phone",
|
||||
data: {
|
||||
phone: phone,
|
||||
token: $('#verify-code').val()},
|
||||
success: function(data) {
|
||||
if( data.success){
|
||||
document.location.href="profile-first-setup.html";
|
||||
localStorage.token = data.data.token;
|
||||
}
|
||||
else{
|
||||
console.log('wrong code');
|
||||
}
|
||||
//
|
||||
},
|
||||
error: function() {
|
||||
alert("Failed");}
|
||||
});
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -46,7 +46,7 @@
|
||||
<div style="position:absolute; top:10px">
|
||||
<a class="fa fa-phone"></a>
|
||||
</div>
|
||||
<input id="mobile" type="text" class="form-element" placeholder="Enter your phone number" />
|
||||
<input id="mobile" type="text" class="form-element" placeholder="Enter your phone number" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -72,8 +72,22 @@
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function createCookie(name, value, days) {
|
||||
var expires;
|
||||
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
expires = "; expires=" + date.toGMTString();
|
||||
} else {
|
||||
expires = "";
|
||||
}
|
||||
document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/";
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#send-verification').click(function() {
|
||||
var mobile = $('#mobile').val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "api/send-verification",
|
||||
@@ -82,6 +96,7 @@
|
||||
success: function(data) {
|
||||
document.location.href="verify-code-number.html";
|
||||
},
|
||||
Cookies:createCookie('phone', mobile, 60),
|
||||
error: function() {
|
||||
alert("Failed");}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user