#Remove/hide stuff from the Admin Dashboard

15 messages · Page 1 of 1 (latest)

celest grove
#

I read through the entire docs, but I didn't find anything about removing functionalities.
For example, removing the Promotions page, with all it's functionalities. I don't mean removing the backend. I don't mind having the function in the backend, just remove everything that connects to it from the Admin Dashboard.

muted wraith
celest grove
#

Thanks! I will read though this and tell if it fitted my needs.

celest grove
#

Perfect! This is exactly what I needed! I don't clearly understand it yet. How does it work in production?

muted wraith
#

u have a post install in the package json section it basically runs after u do npm install

#

if u go to github proj root it should be a simple guide

celest grove
#

Perfect. You are very helpful!

#

Thank you!

celest grove
#

I've spent 2 hours trying to remove the Orders page, and make the Products page the default.

#

If you have any advice, I'd really appriciate it!

#

I managed to do it. No problem anymore.

muted wraith
#

do you mind sharing the code snippet for this?

celest grove
#

Which one would you like?

#
// 4) change default login redirect from /orders to /products
LOGIN_PATHS.forEach((path: string) => {
  lines = readFileAsLines(path);
  for (let i = 0; i < lines.length; i++) {
    if (lines[i].includes('location.state?.from?.pathname || "/orders"')) {
      lines[i] = lines[i].replace("/orders", "/products");
    }
  }
  writeFile(lines, path);
});