Files
redmine_qbo_lineitems/assets/stylesheets/line_items.css
T
Claude 39f6b64049 Polish: permissions, billed-line locking, sync and billing fixes
Permissions
- Item catalog and accounts pages, and their syncs, are admin-only (they
  push to / pull from QuickBooks); shown in the Administration layout
- Item autocomplete is allowed with Add or Edit line items
- Permissions now map to real actions (they pointed at a non-existent
  line_items controller); line_items_attributes is only accepted from
  users with a line item permission
- Line item changes are checked on the server: adding, editing and
  deleting each need their permission, and billed lines (already on a
  QBO estimate) can't be changed or removed

Bugs
- Billing on close now runs from an Issue after_commit, so closing via
  bulk edit or the context menu bills too (replaces the save hook);
  the job takes an issue id
- Full sync runs Accounts before Items, and item sync no longer fails
  when an item has no income account or its account hasn't synced
- New QBO items default to Non-inventory in the default income account
  (the account ref was being assigned to the item type)
- Choosing a blank account on an item no longer raises; set_default
  handles no selection
- Item autocomplete escapes item names, SKUs and descriptions (they were
  inserted into the page as HTML)
- Items list showed "translation missing" for Yes/No

Polish
- Fractional quantities allowed (0.5 hrs, 2.5 qts)
- Billed lines show a Billed badge and are read-only; remove button only
  where allowed; add button only with Add line items
- Removed dead code (Item belongs_to :issue, Item#ref, no-op in new,
  swallowed errors); validation failures return 422

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 22:37:41 -04:00

92 lines
1.4 KiB
CSS

.line-items-table {
width: 100%;
}
.line-items-table input {
width: 100%;
box-sizing: border-box;
}
.qty-field {
max-width: 90px;
}
.price-field {
max-width: 120px;
}
.autocomplete-item {
line-height: 1.2;
}
.item-name {
font-weight: 600;
}
.item-sku {
font-size: 0.75em;
color: #666;
}
.item-description {
font-size: 0.70em;
color: #999;
}
/* MOBILE MODE */
@media screen and (max-width: 700px) {
.line-items-table thead {
display: none;
}
.line-items-table,
.line-items-table tbody,
.line-items-table tr,
.line-items-table td {
display: block;
width: 100%;
}
.line-items-table tr {
border: 1px solid #ddd;
border-radius: 6px;
padding: 10px;
margin-bottom: 10px;
background: #fff;
}
.line-items-table td {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
}
.line-items-table td::before {
content: attr(data-label);
font-weight: bold;
margin-right: 10px;
}
.line-items-table td.actions {
justify-content: flex-end;
}
}
/* Billed line items are locked: they're already on a QuickBooks estimate */
.line-item.billed input {
background-color: #f6f6f6;
}
.line-item-billed-badge {
display: inline-block;
margin-left: 6px;
padding: 1px 6px;
border-radius: 3px;
font-size: 0.8em;
font-weight: bold;
color: #3e7b3e;
background-color: #e5f2e5;
border: 1px solid #c6e0c6;
}