|
|
@@ -41,258 +41,123 @@ SimpleNavigation.register_renderer bootstrap_breadcrumbs: SimpleNavigationn::Ren
|
|
|
SimpleNavigation::Configuration.run do |navigation|
|
|
|
navigation.renderer = SimpleNavigationRenderers::Bootstrap3
|
|
|
navigation.items do |primary|
|
|
|
- if current_user.usertype == 'A' || current_user.usertype == "SS"
|
|
|
- # clientes
|
|
|
+ # clientes
|
|
|
+ if can? :read, Customer
|
|
|
primary.item :customers, { icon: "fa fa-fw fa-smile-o", text: "Clientes" }, customers_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_customer, 'Nuevo Cliente', new_customer_path
|
|
|
sub_nav.item :list_customers, 'Lista de clientes', customers_path
|
|
|
sub_nav.item :divider_after_list_customers, '#', divider: true
|
|
|
- sub_nav.item :special_prices, 'Descuentos especiales por cliente', new_special_price_path
|
|
|
+ sub_nav.item :debtor_customers, 'Clientes deudores', debtors_path if (can? :debtors, Customer)
|
|
|
+ sub_nav.item :special_prices, 'Descuentos especiales por cliente', new_special_price_path if (can? :create, SpecialPrice)
|
|
|
end
|
|
|
- # proveedores
|
|
|
- primary.item :suppliers, { icon: "fa fa-fw fa-suitcase", text: "Proveedores" }, suppliers_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_supplier, 'Nuevo Proveedor', new_supplier_path
|
|
|
- sub_nav.item :list_suppliers, 'Lista de proveedores', suppliers_path
|
|
|
- end
|
|
|
- # productos
|
|
|
- primary.item :products, { icon: "fa fa-fw fa-cubes", text: "Productos" }, products_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
+ end
|
|
|
+ # productos
|
|
|
+ primary.item :products, { icon: "fa fa-fw fa-cubes", text: "Productos" }, products_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
+ sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
+ if can? :read, Unit
|
|
|
sub_nav.item :units, 'Unidades de medida', units_path
|
|
|
sub_nav.item :divider_before_categories, '#', divider: true
|
|
|
- sub_nav.item :new_category, 'Nueva línea de producto', new_category_path
|
|
|
+ end
|
|
|
+ if can? :read, Category
|
|
|
sub_nav.item :list_categories, 'Lista de líneas de producto', categories_path
|
|
|
sub_nav.item :divider_before_products, '#', divider: true
|
|
|
- sub_nav.item :new_product, 'Nuevo Producto', new_product_path
|
|
|
- sub_nav.item :list_products, 'Lista de productos', products_path
|
|
|
- sub_nav.item :stock_by_pointsale, 'Existencias', stock_by_pointsale_path
|
|
|
- sub_nav.item :list_waste_of_products, 'Lista de mermas de productos', product_wastes_path
|
|
|
+ end
|
|
|
+ sub_nav.item :list_products, 'Lista de productos', products_path if (can? :index, Product)
|
|
|
+ sub_nav.item :stock_by_pointsale, 'Existencias', stock_by_pointsale_path if (can? :read, AvailableProduct)
|
|
|
+ sub_nav.item :list_waste_of_products, 'Lista de mermas de productos', product_wastes_path if (can? :read, ProductWaste)
|
|
|
+ if can? :read, Purchase
|
|
|
sub_nav.item :divider_before_purchases, '#', divider: true
|
|
|
- sub_nav.item :new_product, 'Nueva Compra', new_purchase_path
|
|
|
sub_nav.item :list_products, 'Lista de compras', purchases_path
|
|
|
+ end
|
|
|
+ if can? :read, Supplier
|
|
|
+ sub_nav.item :divider_before_purchases, '#', divider: true
|
|
|
+ sub_nav.item :list_suppliers, 'Lista de proveedores', suppliers_path
|
|
|
+ end
|
|
|
+ if (can? :product_track, Product)
|
|
|
sub_nav.item :divider_before_purchases, '#', divider: true
|
|
|
sub_nav.item :product_track, 'Seguimiento de productos', product_track_path
|
|
|
end
|
|
|
- # puntos de venta y caja registradora
|
|
|
- primary.item :pointsales, { icon: "fa fa-fw fa-cart-plus", text: "Puntos de venta" }, pointsales_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_pointsale, 'Nuevo Punto de venta', new_pointsale_path
|
|
|
+ end
|
|
|
+ # puntos de venta y caja registradora
|
|
|
+ primary.item :pointsales, { icon: "fa fa-fw fa-cart-plus", text: "Puntos de venta" }, pointsales_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
+ sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
+ if can? :read, Pointsale
|
|
|
sub_nav.item :list_pointsales, 'Lista de puntos de venta', pointsales_path
|
|
|
sub_nav.item :divider_before_pointsales, '#', divider: true
|
|
|
- sub_nav.item :list_cash_registers, 'Lista de cajas', cash_registers_path
|
|
|
- sub_nav.item :list_cash_outs, 'Lista de cortes de caja', cash_outs_path
|
|
|
+ end
|
|
|
+ sub_nav.item :list_cash_registers, 'Lista de cajas', cash_registers_path if (can? :index, CashRegister)
|
|
|
+ sub_nav.item :list_cash_outs, 'Lista de cortes de caja', cash_outs_path if (can? :read, CashOut)
|
|
|
+ sub_nav.item :divider_before_pointsales, '#', divider: true
|
|
|
+ sub_nav.item :list_promotions, 'Promociones', promotions_path if (can? :read, Promotion)
|
|
|
+ if (can? :read, Seller)
|
|
|
sub_nav.item :divider_before_sellers, '#', divider: true
|
|
|
sub_nav.item :list_sellers, 'Lista de vendedores', sellers_path
|
|
|
+ end
|
|
|
+ if can? :read, Transfer
|
|
|
sub_nav.item :divider_after_sellers, '#', divider: true
|
|
|
- sub_nav.item :new_transfer, 'Nuevo traspaso', new_transfer_path
|
|
|
sub_nav.item :list_transfers, 'Lista de traspasos', transfers_path
|
|
|
+ end
|
|
|
+ if can? :read, Warehouse
|
|
|
sub_nav.item :divider_after_list_users, '#', divider: true
|
|
|
sub_nav.item :list_warehouse, 'Almacenes', warehouses_path
|
|
|
end
|
|
|
- # ventas
|
|
|
+ end
|
|
|
+ # ventas
|
|
|
+ if can? :read, Sale
|
|
|
primary.item :sales, { icon: "fa fa-fw fa-money", text: "Ventas" }, sales_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
sub_nav.item :list_sales, 'Lista de ventas', sales_path
|
|
|
- sub_nav.item :divider_after_list_sales, '#', divider: true
|
|
|
- sub_nav.item :list_sales_reserved, 'Lista de apartados', sales_reserved_path
|
|
|
- sub_nav.item :commission, "Lista de comisiones", commissions_path
|
|
|
+ if can? :sales_reserved, Sale
|
|
|
+ sub_nav.item :list_sales_reserved, 'Lista de apartados', sales_reserved_path
|
|
|
+ end
|
|
|
+ if can? :read, ProductsReturn
|
|
|
+ sub_nav.item :list_products_return, 'Lista de devoluciones', products_returns_path
|
|
|
+ end
|
|
|
+ if can? :manage, Commission
|
|
|
+ sub_nav.item :divider_after_list_returns, '#', divider: true
|
|
|
+ sub_nav.item :commission, 'Lista de comisiones', commissions_path
|
|
|
+ end
|
|
|
end
|
|
|
- # egresos
|
|
|
+ end
|
|
|
+ # egresos
|
|
|
+ if can? :read, Expense
|
|
|
primary.item :expensesconcepts, { icon: "fa fa-fw fa-dollar", text: "Egresos" }, expensesconcepts_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_expensesconcept, 'Nuevo Concepto de egreso', new_expensesconcept_path
|
|
|
- sub_nav.item :list_expensesconcepts, 'Lista de conceptos de egreso', expensesconcepts_path
|
|
|
- sub_nav.item :divider_after_list_expensesconcepts, '#', divider: true
|
|
|
- sub_nav.item :new_expense, 'Nuevo egreso', new_expense_path
|
|
|
+ if can? :read, Expensesconcept
|
|
|
+ sub_nav.item :list_expensesconcepts, 'Lista de conceptos de egreso', expensesconcepts_path
|
|
|
+ sub_nav.item :divider_after_list_expensesconcepts, '#', divider: true
|
|
|
+ end
|
|
|
sub_nav.item :list_expenses, 'Lista de egresos', expenses_path
|
|
|
end
|
|
|
- # reportes
|
|
|
+ end
|
|
|
+ # reportes
|
|
|
+ if current_user.usertype == "A" || current_user.usertype == "SS"
|
|
|
primary.item :reports, { icon: "fa fa-bar-chart", text: "Reportes" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
sub_nav.item :sales_per_month, 'Ventas por mes', sales_per_month_report_path
|
|
|
sub_nav.item :minmax_report, 'Mínimos y Máximos', min_max_path
|
|
|
end
|
|
|
- # configuracion
|
|
|
- primary.item :config, { icon: "fa fa-fw fa-cog", text: "Configuración" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :pos_configs, 'Configurar parámetros generales', pos_configs_path
|
|
|
- sub_nav.item :divider_after_list_transfers, '#', divider: true
|
|
|
- sub_nav.item :list_products_initial_stock, 'Stock inicial de productos', products_initial_stock_path
|
|
|
- sub_nav.item :list_products_stock, 'Stock mínimo y máximo de productos', products_stock_path
|
|
|
- sub_nav.item :divider_after_list_transfers, '#', divider: true
|
|
|
- sub_nav.item :list_users, 'Usuarios del sistema', users_path
|
|
|
- end
|
|
|
- # soporte
|
|
|
- primary.item :support, { icon: "fa fa-fw fa-group", text: "Soporte" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: "dropdown-menu pull-left" }
|
|
|
- sub_nav.item :send_info, "Soporte técnico", contact_support_path
|
|
|
- sub_nav.item :updates, "Actualizaciones", system_updates_path
|
|
|
- end
|
|
|
end
|
|
|
-
|
|
|
- if current_user.usertype == 'G'
|
|
|
- primary.item :home, { icon: "fa fa-fw fa-home", text: "Inicio" }, root_path, class: 'menu-dropdown classic-menu-dropdown'
|
|
|
- # clientes
|
|
|
- primary.item :customers, { icon: "fa fa-fw fa-smile-o", text: "Clientes" }, customers_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_customer, 'Nuevo Cliente', new_customer_path
|
|
|
- sub_nav.item :list_customers, 'Lista de clientes', customers_path
|
|
|
- sub_nav.item :debtor_customers, 'Clientes deudores', debtors_path
|
|
|
- end
|
|
|
- # proveedores
|
|
|
- primary.item :suppliers, { icon: "fa fa-fw fa-suitcase", text: "Proveedores" }, suppliers_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_supplier, 'Nuevo Proveedor', new_supplier_path
|
|
|
- sub_nav.item :list_suppliers, 'Lista de proveedores', suppliers_path
|
|
|
- end
|
|
|
- # productos
|
|
|
- primary.item :products, { icon: "fa fa-fw fa-cubes", text: "Productos" }, products_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :units, 'Unidades de medida', units_path
|
|
|
- sub_nav.item :divider_before_categories, '#', divider: true
|
|
|
- sub_nav.item :new_category, 'Nueva línea de producto', new_category_path
|
|
|
- sub_nav.item :list_categories, 'Lista de líneas de producto', categories_path
|
|
|
- sub_nav.item :divider_before_products, '#', divider: true
|
|
|
- sub_nav.item :new_product, 'Nuevo Producto', new_product_path
|
|
|
- sub_nav.item :list_products, 'Lista de productos', products_path
|
|
|
- sub_nav.item :divider_after_list_products, '#', divider: true
|
|
|
- sub_nav.item :stock_by_pointsale, 'Existencias', stock_by_pointsale_path
|
|
|
- sub_nav.item :divider_after_stock_by_pointsale, '#', divider: true
|
|
|
- sub_nav.item :list_waste, 'Nueva merma de productos', new_product_waste_path
|
|
|
- sub_nav.item :list_waste_of_products, 'Lista de mermas de productos', product_wastes_path
|
|
|
- sub_nav.item :divider_before_purchases, '#', divider: true
|
|
|
- sub_nav.item :new_purchase, 'Nueva Compra', new_purchase_path
|
|
|
- sub_nav.item :purchases_list, 'Lista de compras', purchases_path
|
|
|
- end
|
|
|
- # ventas
|
|
|
- primary.item :sales, { icon: "fa fa-fw fa-money", text: "Ventas" }, sales_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_sale, 'Nueva venta', new_sale_path
|
|
|
- sub_nav.item :list_sales, 'Lista de ventas', sales_path
|
|
|
- sub_nav.item :divider_after_list_sales, '#', divider: true
|
|
|
- sub_nav.item :list_sales_reserved, 'Lista de apartados', sales_reserved_path
|
|
|
- sub_nav.item :divider_after_list_sales_reserved, '#', divider: true
|
|
|
- sub_nav.item :commission, "Lista de comisiones", commissions_path
|
|
|
- sub_nav.item :divider_after_list_comissions, '#', divider: true
|
|
|
- sub_nav.item :list_products_return, 'Lista de devoluciones', products_returns_path
|
|
|
- end
|
|
|
- # punto de venta, caja registradora y vendedores
|
|
|
- primary.item :pointsales, { icon: "fa fa-fw fa-cart-plus", text: "Puntos de venta" }, pointsales_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :list_products, 'Lista de cajas ', cash_registers_path
|
|
|
- sub_nav.item :divider_after_list_products, '#', divider: true
|
|
|
- sub_nav.item :list_cash_outs, 'Lista de cortes de caja', cash_outs_path
|
|
|
- sub_nav.item :divider_after_list_cash_outs, '#', divider: true
|
|
|
- sub_nav.item :list_sellers, 'Lista de vendedores', sellers_path
|
|
|
- sub_nav.item :divider_after_list_sellers, '#', divider: true
|
|
|
- sub_nav.item :new_transfer, 'Nuevo traspaso', new_transfer_path
|
|
|
- sub_nav.item :list_transfers, 'Lista de traspasos', transfers_path
|
|
|
- sub_nav.item :divider_after_list_transfers, '#', divider: true
|
|
|
- sub_nav.item :list_warehouse, 'Almacenes', warehouses_path
|
|
|
- end
|
|
|
- # coneptos de egresos
|
|
|
- primary.item :expensesconcepts, { icon: "fa fa-fw fa-dollar", text: "Egresos" }, expensesconcepts_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_expensesconcept, 'Nuevo egreso', new_expense_path
|
|
|
- sub_nav.item :list_expensesconcepts, 'Lista de egresos', expenses_path
|
|
|
- sub_nav.item :divider_after_expenses, '#', divider: true
|
|
|
- sub_nav.item :list_expensesconcepts, 'Lista de conceptos de egreso', expensesconcepts_path
|
|
|
- end
|
|
|
- # configuracion
|
|
|
- primary.item :config, { icon: "fa fa-fw fa-cog", text: "Configuración" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :list_products_initial_stock, 'Stock inicial de productos', products_initial_stock_path(pointsale_id: current_user.pointsale_id)
|
|
|
- sub_nav.item :list_products_stock, 'Stock mínimo y máximo de productos', products_stock_path(pointsale_id: current_user.pointsale_id)
|
|
|
- sub_nav.item :divider_after_list_transfers, '#', divider: true
|
|
|
- sub_nav.item :list_users, 'Usuarios del sistema', users_path
|
|
|
- end
|
|
|
- # soporte
|
|
|
- primary.item :support, { icon: "fa fa-fw fa-group", text: "Soporte" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: "dropdown-menu pull-left" }
|
|
|
- sub_nav.item :send_info, "Soporte técnico", contact_support_path
|
|
|
- sub_nav.item :updates, "Actualizaciones", system_updates_path
|
|
|
- end
|
|
|
+ # soporte
|
|
|
+ primary.item :support, { icon: "fa fa-fw fa-group", text: "Soporte" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
+ sub_nav.dom_attributes = { class: "dropdown-menu pull-left" }
|
|
|
+ sub_nav.item :send_info, "Soporte técnico", contact_support_path
|
|
|
+ sub_nav.item :updates, "Actualizaciones", system_updates_path
|
|
|
end
|
|
|
-
|
|
|
- if current_user.usertype == 'C'
|
|
|
- primary.item :home, { icon: "fa fa-fw fa-home", text: "Inicio" }, root_path, class: 'menu-dropdown classic-menu-dropdown'
|
|
|
- # clientes
|
|
|
- primary.item :customers, { icon: "fa fa-fw fa-smile-o", text: "Clientes" }, customers_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
+ # configuracion general
|
|
|
+ if can? :read, PosConfig
|
|
|
+ primary.item :pos_config, { icon: "fa fa-fw fa-cog", text: "Configuración" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_customer, 'Nuevo Cliente', new_customer_path
|
|
|
- sub_nav.item :list_customers, 'Lista de clientes', customers_path
|
|
|
- sub_nav.item :divider_after_list_customers, '#', divider: true
|
|
|
- sub_nav.item :debtor_customers, 'Clientes deudores', debtors_path
|
|
|
- end
|
|
|
-
|
|
|
- # productos
|
|
|
- primary.item :products, { icon: "fa fa-fw fa-cubes", text: "Productos" }, products_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.item :stock_by_pointsale, 'Existencias', stock_by_pointsale_path
|
|
|
- sub_nav.item :divider_after_stock_by_pointsale, '#', divider: true
|
|
|
- sub_nav.item :list_waste, 'Nueva merma de productos', new_product_waste_path
|
|
|
- sub_nav.item :list_waste_of_products, 'Lista de mermas de productos', product_wastes_path
|
|
|
- end
|
|
|
- # ventas
|
|
|
- primary.item :sales, { icon: "fa fa-fw fa-money", text: "Ventas" }, sales_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_sale, 'Nueva venta', new_sale_path
|
|
|
- sub_nav.item :list_sales, 'Lista de ventas', sales_path
|
|
|
- sub_nav.item :divider_after_list_sales, '#', divider: true
|
|
|
- sub_nav.item :list_sales_reserved, 'Lista de apartados', sales_reserved_path
|
|
|
- sub_nav.item :divider_after_list_comissions, '#', divider: true
|
|
|
- sub_nav.item :list_products_return, 'Lista de devoluciones', products_returns_path
|
|
|
- end
|
|
|
- # caja y cortes de caja
|
|
|
- primary.item :cash_register, { icon: "fa fa-shopping-cart", text: "Caja" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :cash_out, 'Corte de caja', new_cash_out_path
|
|
|
- # sub_nav.item :list_cash_outs, 'Lista de cortes de caja', cash_outs_path
|
|
|
- end
|
|
|
- # conceptos de egresos
|
|
|
- primary.item :expenses, { icon: "fa fa-fw fa-dollar", text: "Egresos" }, expenses_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_expense, 'Nuevo egreso', new_expense_path
|
|
|
- sub_nav.item :list_expenses, 'Lista de egresos', expenses_path
|
|
|
- end
|
|
|
- # conceptos de egresos
|
|
|
- primary.item :transfers, { icon: "fa fa-fw fa-dollar", text: "Traspasos" }, transfers_path, class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: 'dropdown-menu pull-left' }
|
|
|
- sub_nav.item :new_transfer, 'Nuevo traspaso', new_transfer_path
|
|
|
- sub_nav.item :list_expenses, 'Lista de traspasos', transfers_path
|
|
|
- end
|
|
|
- # soporte
|
|
|
- primary.item :support, { icon: "fa fa-fw fa-group", text: "Soporte" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: "dropdown-menu pull-left" }
|
|
|
- sub_nav.item :send_info, "Soporte técnico", contact_support_path
|
|
|
- sub_nav.item :updates, "Actualizaciones", system_updates_path
|
|
|
- end
|
|
|
- end
|
|
|
-
|
|
|
- if current_user.usertype == 'S'
|
|
|
- primary.item :home, { icon: "fa fa-fw fa-home", text: "Inicio" }, root_path, class: 'menu-dropdown classic-menu-dropdown'
|
|
|
- # existencias
|
|
|
- primary.item :products, { icon: "fa fa-fw fa-cubes", text: "Existencias" }, stock_by_pointsale_path, class: 'menu-dropdown classic-menu-dropdown'
|
|
|
- # traspasos
|
|
|
- primary.item :transfers, { icon: "fa fa-fw fa-exchange", text: "Traspasos" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.item :new_transfer, 'Nuevo traspaso', new_transfer_path
|
|
|
- sub_nav.item :list_transfers, 'Lista de traspasos', transfers_path
|
|
|
- end
|
|
|
- # mermas
|
|
|
- primary.item :product_wastes, { icon: "fa fa-fw fa-arrow-down", text: "Mermas" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.item :list_waste, 'Nueva merma de productos', new_product_waste_path
|
|
|
- sub_nav.item :list_waste_of_products, 'Lista de mermas de productos', product_wastes_path
|
|
|
- end
|
|
|
- # inventario
|
|
|
- primary.item :stock, { icon: "fa fa-fw fa-database", text: "Inventario" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.item :initial_stock, 'Inventario inicial', products_initial_stock_path(current_user.warehouse_id)
|
|
|
- sub_nav.item :stock_adjustment, 'Ajuste de inventario', products_stock_path(current_user.warehouse_id)
|
|
|
- end
|
|
|
- # soporte
|
|
|
- primary.item :support, { icon: "fa fa-fw fa-group", text: "Soporte" }, '#', class: 'menu-dropdown classic-menu-dropdown' do |sub_nav|
|
|
|
- sub_nav.dom_attributes = { class: "dropdown-menu pull-left" }
|
|
|
- sub_nav.item :send_info, "Soporte técnico", contact_support_path
|
|
|
- sub_nav.item :updates, "Actualizaciones", system_updates_path
|
|
|
+ if can? :manage, PosConfig
|
|
|
+ sub_nav.item :pos_configs, 'Configurar parámetros generales', pos_configs_path
|
|
|
+ sub_nav.item :divider_after_pos_config, '#', divider: true
|
|
|
+ end
|
|
|
+ sub_nav.item :list_products_initial_stock, 'Stock inicial de productos', products_initial_stock_path
|
|
|
+ sub_nav.item :list_products_stock, 'Stock mínimo y máximo de productos', products_stock_path
|
|
|
+ if can? :read, User
|
|
|
+ sub_nav.item :divider_after_products_stock, '#', divider: true
|
|
|
+ sub_nav.item :list_users, 'Usuarios del sistema', users_path
|
|
|
+ end
|
|
|
end
|
|
|
end
|
|
|
|