Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ROJECT_WPI into main
  • Loading branch information
Devaraj Kesani committed Apr 17, 2024
2 parents 0273c3f + e782b44 commit 9844319
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion evara-backend/feedback.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h2 class="content-title card-title">Feedback</h2>
function getAllFeedback() {
$.ajax({
type: 'GET',
url: 'http://localhost:3004/api/account/user/feedback',
url: domain + '/api/account/user/feedback',
contentType: 'application/json',
success: function (response) {
if (response.status !== 200) {
Expand Down
8 changes: 4 additions & 4 deletions evara-backend/page-brands.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2 class="content-title card-title">Brands </h2>
function deleteBrand(idBrand) {
$.ajax({
type: 'DELETE',
url: `http://localhost:3004/api/brand/${idBrand}`,
url: domain+`/api/brand/${idBrand}`,
contentType: 'application/json',
success: function (response) {

Expand All @@ -135,7 +135,7 @@ <h2 class="content-title card-title">Brands </h2>
const brandName = $(`#brandName${idBrand}`).val()
$.ajax({
type: 'PUT',
url: `http://localhost:3004/api/brand/${idBrand}`,
url: domain+`/api/brand/${idBrand}`,
contentType: 'application/json',
data: JSON.stringify({
idBrand,
Expand Down Expand Up @@ -186,7 +186,7 @@ <h2 class="content-title card-title">Brands </h2>
function getBrandDetails() {
$.ajax({
type: 'GET',
url: 'http://localhost:3004/api/brand/',
url: domain+'/api/brand/',
contentType: 'application/json',
success: function (response) {
if (response.status !== 200) {
Expand All @@ -209,7 +209,7 @@ <h2 class="content-title card-title">Brands </h2>

$.ajax({
type: 'POST',
url: 'http://localhost:3004/api/brand/',
url: domain+'/api/brand/',
contentType: 'application/json',
data: JSON.stringify(formData),
success: function (response) {
Expand Down
8 changes: 4 additions & 4 deletions evara-backend/page-category.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h2 class="content-title card-title">Categories </h2>
function deleteCategory(idCategory) {
$.ajax({
type: 'DELETE',
url: `http://localhost:3004/api/category/${idCategory}`,
url: domain+`/api/category/${idCategory}`,
contentType: 'application/json',
success: function (response) {

Expand All @@ -128,7 +128,7 @@ <h2 class="content-title card-title">Categories </h2>
const categoryName = $(`#categoryName${idCategory}`).val()
$.ajax({
type: 'PUT',
url: `http://localhost:3004/api/category/${idCategory}`,
url: domain + `/api/category/${idCategory}`,
contentType: 'application/json',
data: JSON.stringify({
idCategory,
Expand Down Expand Up @@ -179,7 +179,7 @@ <h2 class="content-title card-title">Categories </h2>
function getCategoryDetails() {
$.ajax({
type: 'GET',
url: 'http://localhost:3004/api/category/',
url: domain+'/api/category/',
contentType: 'application/json',
success: function (response) {
if (response.status !== 200) {
Expand All @@ -202,7 +202,7 @@ <h2 class="content-title card-title">Categories </h2>

$.ajax({
type: 'POST',
url: 'http://localhost:3004/api/category/',
url: domain +'/api/category/',
contentType: 'application/json',
data: JSON.stringify(formData),
success: function (response) {
Expand Down
10 changes: 5 additions & 5 deletions evara-backend/page-form-product-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ <h2 class="content-title">Add New Product</h2>
function getBrandDetails() {
$.ajax({
type: 'GET',
url: 'http://localhost:3004/api/brand/',
url: domain+'/api/brand/',
contentType: 'application/json',
success: function (response) {
if (response.status !== 200) {
Expand All @@ -194,7 +194,7 @@ <h2 class="content-title">Add New Product</h2>
function getProductDetails() {
$.ajax({
type: 'GET',
url: 'http://localhost:3004/api/product/',
url: domain+'/api/product/',
contentType: 'application/json',
success: function (response) {
if (response.status !== 200) {
Expand Down Expand Up @@ -262,7 +262,7 @@ <h2 class="content-title">Add New Product</h2>
function getCategoryDetails() {
$.ajax({
type: 'GET',
url: 'http://localhost:3004/api/category/',
url: domain+'/api/category/',
contentType: 'application/json',
success: function (response) {
if (response.status !== 200) {
Expand Down Expand Up @@ -297,7 +297,7 @@ <h2 class="content-title">Add New Product</h2>

$.ajax({
type: 'POST',
url: 'http://localhost:3004/api/product/',
url: domain+'/api/product/',
contentType: 'application/json',
data: JSON.stringify({
idBrand,
Expand Down Expand Up @@ -327,7 +327,7 @@ <h2 class="content-title">Add New Product</h2>
function deleteProduct(idProduct) {
$.ajax({
type: 'DELETE',
url: `http://localhost:3004/api/product/${idProduct}`,
url: domain+`/api/product/${idProduct}`,
contentType: 'application/json',
success: function (response) {
if (response.status !== 200) {
Expand Down
3 changes: 1 addition & 2 deletions evara-backend/page-orders-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ <h2 class="content-title card-title">Order List </h2>
<script type="text/javascript" src="./app.js"></script>

<script>
// localhost:3004/api/order/allOrders

const getPaymentMethodDiv = (a) => {
if(a==2) {
Expand All @@ -109,7 +108,7 @@ <h2 class="content-title card-title">Order List </h2>
function getAllOrders() {
$.ajax({
type: 'GET',
url: 'http://localhost:3004/api/order/allOrders',
url: domain+'/api/order/allOrders',
contentType: 'application/json',
success: function (response) {
if (response.status !== 200) {
Expand Down
6 changes: 3 additions & 3 deletions evara-backend/page-promocode.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h2 class="content-title card-title">Promocode </h2>
function deletePromocode(idPromocode) {
$.ajax({
type: 'DELETE',
url: `http://localhost:3004/api/promocode/${idPromocode}`,
url: domain+`/api/promocode/${idPromocode}`,
contentType: 'application/json',
success: function (response) {

Expand Down Expand Up @@ -136,7 +136,7 @@ <h2 class="content-title card-title">Promocode </h2>
})
$.ajax({
type: 'PUT',
url: `http://localhost:3004/api/promocode/${idPromocode}`,
url: domain+`/api/promocode/${idPromocode}`,
contentType: 'application/json',
data: JSON.stringify({
idPromocode,
Expand Down Expand Up @@ -294,7 +294,7 @@ <h2 class="content-title card-title">Promocode </h2>

$.ajax({
type: 'POST',
url: 'http://localhost:3004/api/promocode/',
url: domain+'/api/promocode/',
contentType: 'application/json',
data: JSON.stringify(formData),
success: function (response) {
Expand Down
2 changes: 1 addition & 1 deletion evara-frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ <h5 class="mb-10">Now Loading</h5>
CategoryResponse.payload.forEach(element => {
console.log("element : ",element);
$('#CategoryList').append(`
<div class="col-lg-3 col-md-4 col-8 col-sm-4 style="margin-top:10px">
<div class="col-lg-3 col-md-4 col-8 col-sm-4" style="margin-top:10px">
<div class="card-1" onClick="redirectCategory(${element.idCategory})">
<h5><a>${element.categoryName}</a></h5>
</div></div>`)
Expand Down
8 changes: 4 additions & 4 deletions evara-frontend/js/account_overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ $(document).ready(function () {

$.ajax({
type: 'GET',
url: accountDomain + '/account_overview/',
url: accountAPI + '/account_overview/',
headers: {
'Authorization': 'Bearer ' + accessToken
},
Expand Down Expand Up @@ -179,7 +179,7 @@ $(document).ready(function () {

$.ajax({
type: 'PUT',
url: accountDomain + '/update_details',
url: accountAPI + '/update_details',
headers: {
'Authorization': 'Bearer ' + accessToken
},
Expand Down Expand Up @@ -225,7 +225,7 @@ $(document).ready(function () {
console.log(formData);
$.ajax({
type: 'PUT',
url: accountDomain + '/update_details',
url: accountAPI + '/update_details',
headers: {
'Authorization': 'Bearer ' + accessToken
},
Expand Down Expand Up @@ -308,7 +308,7 @@ $(document).ready(function () {

$.ajax({
type: 'POST',
url: 'http://localhost:3004/api/account/feedback',
url: accountAPI+'/feedback',
headers: {
'Authorization': 'Bearer ' + accessToken
},
Expand Down
2 changes: 1 addition & 1 deletion evara-frontend/js/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const domain = "http://localhost:3004/api"
const accountDomain = domain + "/account"
const accountAPI = domain + "/account"
const orderAPI = domain + "/order"
const productAPI = domain + "/product"
const brandAPI = domain + "/brand"
Expand Down
2 changes: 1 addition & 1 deletion evara-frontend/js/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $(document).ready(function () {

$.ajax({
type: 'POST',
url: accountDomain + '/login/',
url: accountAPI + '/login/',
contentType: 'application/json',
data: JSON.stringify(formData),
success: function (response) {
Expand Down
2 changes: 1 addition & 1 deletion evara-frontend/js/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ $(document).ready(function () {

$.ajax({
type: 'POST',
url: accountDomain + '/signup/',
url: accountAPI + '/signup/',
contentType: 'application/json',
data: JSON.stringify(formData),
success: function (response) {
Expand Down

0 comments on commit 9844319

Please sign in to comment.