Skip to content

Commit

Permalink
updated routes & navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
GURUAKASH-MUTHURAJAN committed Mar 25, 2024
1 parent 59fd1c9 commit 8ad2bf0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
13 changes: 7 additions & 6 deletions frontend/home/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ <h3 class="newsletter-title">Subscribe Newsletter.</h3>
<ul class="desktop-menu-category-list">

<li class="menu-category">
<a href="#" class="menu-title">Home</a>
<a onclick="HomePage()" class="menu-title">Home</a>
</li>

<li class="menu-category">
Expand Down Expand Up @@ -1326,19 +1326,20 @@ <h3 class="newsletter-title">Subscribe Newsletter.</h3>

</nav>

<div class="mobile-bottom-navigation">

<button class="action-btn" data-mobile-menu-open-btn>
<ion-icon name="menu-outline"></ion-icon>
<div class="mobile-bottom-navigation" onclick="DisplayOrders()">

<button class="action-btn" data-mobile-menu-open-btn >
<ion-icon name="person-outline"></ion-icon>
</button>

<button class="action-btn">
<button class="action-btn" onclick="DisplayCart()">
<ion-icon name="bag-handle-outline"></ion-icon>

<span class="count">0</span>
</button>

<button class="action-btn">
<button class="action-btn" onclick="HomePage()">
<ion-icon name="home-outline"></ion-icon>
</button>

Expand Down
2 changes: 1 addition & 1 deletion frontend/seller/signin/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sellerForm.addEventListener('click', (e) => {
const jsonString = JSON.stringify(sellerData);
localStorage.setItem('sellerdata', `${jsonString}`);
setTimeout(()=>{
window.location.href = "/seller/drashboard"
window.location.href = "/seller/dashboard"
},2000)
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/signin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="container">
<br>
<h9 class="message"></h9>
<button class="js-continue" onclick="window.location.href='/anon/home'">Continue</button>
<button class="js-continue" onclick="window.location.href='/home'">Continue</button>
<button class="new-signin"
onclick="document.querySelector('.sign-in').style.display = 'block';document.querySelector('.allready-signin').style.display = 'none';localStorage.removeItem('userdata')">SignIn</button>
<br>
Expand All @@ -47,7 +47,7 @@
<figure>
<img src="./images/login-image.gif" alt="sing up image" style="max-width: 140%;height: 340px;margin-left: -50px;" class="js-image">
</figure>
<a href="/anon/signup" class="signup-image-link">Create an account</a>
<a href="/signup" class="signup-image-link">Create an account</a>
</div>

<div class="signin-form">
Expand Down
1 change: 1 addition & 0 deletions router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func Router() *gin.Engine {
router.Static("/signin", "./frontend/signin")
router.Static("/seller/signin","./frontend/seller/signin")
router.Static("/seller/signup", "./frontend/seller/signup")
router.Static("/seller/dashboard", "./frontend/seller/dashboard")

// Define your routes
router.GET("/getallcustomerdata", controller.GetallCustomerdata)
Expand Down
6 changes: 3 additions & 3 deletions service/Feedback.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ func Deletefeedback(delete models.FeedbackDB) int32 {
}

// Get all Feedbacks
func GetFeedBacks() []models.Feedback {
func GetFeedBacks() []models.FeedbackDB {
filter := bson.M{}
cursor, err := config.Feedback_Collection.Find(context.Background(), filter)
var Feedback []models.Feedback
var Feedback []models.FeedbackDB
if err != nil {
log.Println(err)
}

for cursor.Next(context.Background()) {
var feedback models.Feedback
var feedback models.FeedbackDB
err := cursor.Decode(&feedback)
if err != nil {
log.Println(err)
Expand Down
2 changes: 1 addition & 1 deletion service/Seller.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ func GetCustromerOrderforSeller(details models.GetOrder) (*models.AddOrder, stri
if err != nil {
return &orderDetails, "No Result found", err
}
if orderDetails.SellerId != id {
if orderDetails.SellerId != id && orderDetails.CustomerId != id {
return nil, "Order not Found", nil
}
return &orderDetails, "Success", nil
Expand Down

0 comments on commit 8ad2bf0

Please sign in to comment.