You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

748 lines
17 KiB

  1. @use '../atoms/variables' as *;
  2. @use '../atoms/mixins' as *;
  3. // ─── Page ─────────────────────────────────────────────────────────────────────
  4. .report-page {
  5. @include page-shell;
  6. }
  7. // ─── Header ──────────────────────────────────────────────────────────────────
  8. .report-header {
  9. @include section-header;
  10. padding: $space-4 $space-6;
  11. @include tablet {
  12. flex-direction: column;
  13. align-items: stretch;
  14. gap: $space-3;
  15. }
  16. }
  17. .report-header__title {
  18. font-size: $font-size-xl;
  19. font-weight: $font-weight-bold;
  20. color: var(--header-text);
  21. }
  22. .report-header__right {
  23. display: flex;
  24. align-items: center;
  25. gap: $space-4;
  26. @include tablet {
  27. flex-wrap: wrap;
  28. }
  29. }
  30. // ─── Account-Name Anzeige ────────────────────────────────────────────────────
  31. .report-account-name {
  32. display: inline-flex;
  33. align-items: center;
  34. gap: $space-2;
  35. padding: $space-2 $space-4;
  36. font-size: $font-size-sm;
  37. font-weight: $font-weight-medium;
  38. color: var(--header-text);
  39. background: var(--header-overlay);
  40. border: 1px solid var(--header-overlay);
  41. border-radius: $radius-pill;
  42. backdrop-filter: blur(6px);
  43. -webkit-backdrop-filter: blur(6px);
  44. white-space: nowrap;
  45. &__icon {
  46. width: 16px;
  47. height: 16px;
  48. flex-shrink: 0;
  49. }
  50. }
  51. // ─── Disabled Tab ────────────────────────────────────────────────────────────
  52. .account-tab--disabled {
  53. opacity: 0.45;
  54. pointer-events: none;
  55. cursor: default;
  56. }
  57. // ─── Content ─────────────────────────────────────────────────────────────────
  58. .report-content {
  59. flex: 1;
  60. max-width: 1200px;
  61. width: 100%;
  62. margin: $space-6 auto;
  63. padding: 0 $space-6;
  64. @include tablet {
  65. padding: 0 $space-4;
  66. }
  67. }
  68. // ─── Karte ───────────────────────────────────────────────────────────────────
  69. .report-card {
  70. @include card;
  71. overflow: hidden;
  72. @include tablet { overflow-x: auto; }
  73. }
  74. // ─── Toolbar ─────────────────────────────────────────────────────────────────
  75. .report-toolbar {
  76. display: flex;
  77. align-items: center;
  78. justify-content: space-between;
  79. padding: $space-3 $space-5;
  80. border-bottom: 1px solid $color-border;
  81. @include tablet {
  82. flex-wrap: wrap;
  83. gap: $space-3;
  84. }
  85. }
  86. .report-toolbar__left {
  87. display: flex;
  88. align-items: center;
  89. gap: $space-6;
  90. }
  91. .report-toolbar__right {
  92. display: flex;
  93. align-items: center;
  94. gap: $space-2;
  95. }
  96. .report-toolbar__export {
  97. @include icon-btn(30px, $radius-sm);
  98. color: $color-text-light;
  99. svg { width: 18px; height: 18px; }
  100. &:hover {
  101. color: var(--color-primary);
  102. background: rgba(var(--color-primary-rgb), 0.08);
  103. }
  104. }
  105. .report-toolbar__separator {
  106. width: 1px;
  107. height: 18px;
  108. background: $color-border;
  109. margin: 0 $space-1;
  110. }
  111. .report-toolbar__action {
  112. display: inline-flex;
  113. align-items: center;
  114. gap: $space-2;
  115. font-size: $font-size-sm;
  116. font-weight: $font-weight-medium;
  117. color: var(--color-primary);
  118. cursor: pointer;
  119. text-decoration: none;
  120. svg {
  121. width: $icon-svg-size;
  122. height: $icon-svg-size;
  123. flex-shrink: 0;
  124. }
  125. &--disabled {
  126. color: $color-text-muted;
  127. pointer-events: none;
  128. cursor: default;
  129. }
  130. }
  131. // ─── Tabelle ─────────────────────────────────────────────────────────────────
  132. .report-table {
  133. width: 100%;
  134. @include tablet { min-width: 900px; }
  135. }
  136. .report-table__head,
  137. .report-table__row {
  138. display: grid;
  139. grid-template-columns:
  140. 110px // Datum
  141. 140px // Kunde
  142. 130px // Projekt
  143. 120px // Leistung
  144. 140px // Benutzer
  145. 120px // Label
  146. 1fr // Bemerkung
  147. 80px // Stunden
  148. 100px // Umsatz
  149. 88px; // Aktionen
  150. align-items: center;
  151. border-bottom: 1px solid $color-border;
  152. padding: 0 $space-5;
  153. }
  154. .report-table__head {
  155. padding-top: $space-2;
  156. padding-bottom: $space-2;
  157. .report-table__cell {
  158. font-size: $font-size-xs;
  159. font-weight: $font-weight-bold;
  160. color: $color-text-base;
  161. text-transform: uppercase;
  162. letter-spacing: 0.03em;
  163. line-height: 1.3;
  164. }
  165. }
  166. .report-table__row {
  167. padding-top: $space-3;
  168. padding-bottom: $space-3;
  169. transition: background $transition-fast;
  170. &:hover {
  171. background: rgba(var(--color-primary-rgb), 0.05);
  172. .report-action-btn { opacity: 1; }
  173. }
  174. &--invoiced .report-table__cell {
  175. &--date, &--client, &--project, &--service, &--label,
  176. &--user, &--note, &--duration, &--revenue {
  177. color: $color-text-light;
  178. }
  179. }
  180. &--editing {
  181. background: rgba(var(--color-primary-rgb), 0.05);
  182. .report-table__cell--actions { visibility: hidden; }
  183. }
  184. &:last-child { border-bottom: none; }
  185. }
  186. .report-table__cell {
  187. font-size: $font-size-base;
  188. color: $color-text-base;
  189. padding-right: $space-3;
  190. line-height: 1.4;
  191. min-width: 0;
  192. &--duration,
  193. &--revenue {
  194. text-align: right;
  195. padding-right: $space-4;
  196. white-space: nowrap;
  197. font-variant-numeric: tabular-nums;
  198. }
  199. &--actions {
  200. display: flex;
  201. align-items: center;
  202. justify-content: flex-end;
  203. gap: $space-1;
  204. padding-right: 0;
  205. }
  206. &--note {
  207. color: $color-text-muted;
  208. font-size: $font-size-sm;
  209. @include text-truncate;
  210. }
  211. }
  212. .report-table__cell--sortable {
  213. cursor: pointer;
  214. user-select: none;
  215. &:hover .report-table__cell-label { color: var(--color-primary); }
  216. }
  217. .report-table__cell--sorted .report-table__cell-label {
  218. color: var(--color-primary);
  219. }
  220. .report-table__cell-label {
  221. transition: color $transition-fast;
  222. }
  223. .report-table__sort-icon {
  224. margin-left: 2px;
  225. font-size: $font-size-xs;
  226. }
  227. .report-table__summary {
  228. display: block;
  229. font-size: $font-size-xs;
  230. font-weight: $font-weight-regular;
  231. color: $color-text-muted;
  232. margin-top: 1px;
  233. }
  234. .report-table__label {
  235. display: inline-block;
  236. font-size: $font-size-xs;
  237. color: var(--color-primary);
  238. background: rgba(var(--color-primary-rgb), 0.08);
  239. padding: 1px $space-2;
  240. border-radius: $radius-sm;
  241. margin-right: $space-1;
  242. }
  243. .report-table__empty {
  244. padding: $space-10 $space-5;
  245. text-align: center;
  246. color: $color-text-muted;
  247. font-size: $font-size-sm;
  248. }
  249. // ─── Aktions-Buttons (Edit / Delete) ─────────────────────────────────────────
  250. .report-action-btn {
  251. @include icon-btn(26px, $radius-sm);
  252. opacity: 0;
  253. color: $color-text-light;
  254. svg { width: $icon-svg-size; height: $icon-svg-size; }
  255. @include tablet { opacity: 1; }
  256. &:hover {
  257. color: $color-text-muted;
  258. background: rgba($color-text-dark, 0.06);
  259. }
  260. &--delete:hover {
  261. color: $color-error;
  262. background: rgba($color-error, 0.08);
  263. }
  264. }
  265. // ─── Schloss-Button ──────────────────────────────────────────────────────────
  266. .report-lock {
  267. @include icon-btn(24px, $radius-sm);
  268. color: $color-text-light;
  269. svg { width: $icon-svg-size; height: $icon-svg-size; }
  270. &:hover {
  271. color: $color-text-muted;
  272. background: rgba($color-text-dark, 0.06);
  273. }
  274. &--invoiced {
  275. color: $color-text-dark;
  276. &:hover {
  277. color: $color-text-dark;
  278. background: rgba($color-text-dark, 0.06);
  279. }
  280. }
  281. }
  282. // ─── Inline-Edit-Formular ────────────────────────────────────────────────────
  283. .report-row__edit {
  284. grid-column: 1 / -1;
  285. padding: $space-4 0;
  286. background: rgba(var(--color-primary-rgb), 0.04);
  287. border-top: 1px solid $color-border;
  288. }
  289. .report-row__edit-grid {
  290. display: grid;
  291. grid-template-columns: 140px 1fr;
  292. gap: $space-3 $space-5;
  293. align-items: center;
  294. max-width: 680px;
  295. @include tablet {
  296. grid-template-columns: 1fr;
  297. gap: $space-3;
  298. }
  299. }
  300. .report-row__edit-label {
  301. @include form-label;
  302. @include tablet {
  303. text-align: left;
  304. padding-right: 0;
  305. }
  306. }
  307. .report-row__edit-field {
  308. display: flex;
  309. align-items: center;
  310. gap: $space-2;
  311. &--selects {
  312. gap: $space-3;
  313. .select {
  314. flex: 1;
  315. min-width: 160px;
  316. }
  317. @include tablet {
  318. flex-direction: column;
  319. .select {
  320. min-width: 0;
  321. width: 100%;
  322. }
  323. }
  324. }
  325. .textarea {
  326. width: 100%;
  327. }
  328. }
  329. .report-row__edit-actions {
  330. grid-column: 2;
  331. display: flex;
  332. gap: $space-3;
  333. padding-top: $space-2;
  334. @include tablet {
  335. grid-column: 1;
  336. .btn { flex: 1; }
  337. }
  338. }
  339. // ─── Pagination-Footer ────────────────────────────────────────────────────────
  340. .report-pagination {
  341. display: grid;
  342. grid-template-columns: 1fr 80px 100px 88px;
  343. align-items: center;
  344. padding: $space-3 $space-5;
  345. border-top: 1px solid $color-border;
  346. font-size: $font-size-sm;
  347. color: $color-text-muted;
  348. }
  349. .report-pagination__limits {
  350. display: flex;
  351. align-items: center;
  352. gap: $space-2;
  353. a {
  354. color: var(--color-primary);
  355. text-decoration: underline;
  356. cursor: pointer;
  357. &:hover { color: var(--color-primary-dark); }
  358. }
  359. strong {
  360. color: $color-text-dark;
  361. font-weight: $font-weight-bold;
  362. }
  363. }
  364. .report-pagination__duration,
  365. .report-pagination__revenue {
  366. text-align: right;
  367. padding-right: $space-4;
  368. font-weight: $font-weight-medium;
  369. color: $color-text-muted;
  370. font-variant-numeric: tabular-nums;
  371. white-space: nowrap;
  372. }
  373. .report-pagination__lock-spacer {
  374. // Platzhalter – hält Spalten-Ausrichtung mit der Tabelle
  375. }
  376. // ─── Toolbar-Button (klickbar) ────────────────────────────────────────────────
  377. button.report-toolbar__action {
  378. background: none;
  379. border: none;
  380. cursor: pointer;
  381. font-family: $font-family-base;
  382. padding: $space-1 $space-3;
  383. margin: (-$space-1) (-$space-3);
  384. border-radius: $radius-pill;
  385. transition: background $transition-fast, color $transition-fast;
  386. &--active {
  387. background: $color-text-dark;
  388. color: $color-white;
  389. svg path,
  390. svg circle {
  391. stroke: $color-white;
  392. }
  393. }
  394. }
  395. // ─── Filter-Panel ─────────────────────────────────────────────────────────────
  396. .report-filter {
  397. background: $color-card;
  398. border-bottom: 1px solid $color-border;
  399. padding: $space-5 $space-5 0;
  400. }
  401. .report-filter__body {
  402. display: flex;
  403. gap: $space-10;
  404. @include tablet {
  405. flex-direction: column;
  406. gap: $space-6;
  407. }
  408. }
  409. .report-filter__col {
  410. flex: 1;
  411. min-width: 0;
  412. max-width: 66%;
  413. @include tablet { max-width: 100%; }
  414. }
  415. .report-filter__heading {
  416. font-size: $font-size-xs;
  417. font-weight: $font-weight-bold;
  418. color: $color-text-muted;
  419. text-transform: uppercase;
  420. letter-spacing: 0.06em;
  421. margin-bottom: $space-3;
  422. }
  423. // ─── Filter-Row ───────────────────────────────────────────────────────────────
  424. .filter-row {
  425. display: grid;
  426. grid-template-columns: 160px 1fr;
  427. align-items: flex-start;
  428. gap: $space-3;
  429. padding: $space-2 0;
  430. border-bottom: 1px solid rgba($color-border, 0.6);
  431. &:last-child { border-bottom: none; }
  432. @include mobile {
  433. grid-template-columns: 1fr;
  434. }
  435. &--inactive {
  436. .filter-select,
  437. .filter-note-input,
  438. .filter-period-select,
  439. .filter-radio {
  440. opacity: 0.5;
  441. }
  442. .filter-select,
  443. .filter-note-input,
  444. .filter-period-select {
  445. color: $color-text-muted;
  446. }
  447. .filter-row__add,
  448. .filter-neg {
  449. opacity: 0.4;
  450. }
  451. .filter-neg {
  452. pointer-events: none;
  453. }
  454. }
  455. }
  456. .filter-row__label {
  457. display: flex;
  458. align-items: center;
  459. gap: $space-2;
  460. cursor: pointer;
  461. font-size: $font-size-sm;
  462. color: $color-text-base;
  463. padding-top: 7px;
  464. user-select: none;
  465. }
  466. .filter-row__checkbox {
  467. width: 14px;
  468. height: 14px;
  469. cursor: pointer;
  470. flex-shrink: 0;
  471. accent-color: var(--color-primary);
  472. }
  473. // ─── Body: Controls + Meta nebeneinander ────────────────────────────────────
  474. .filter-row__body {
  475. display: flex;
  476. align-items: flex-start;
  477. gap: $space-3;
  478. }
  479. .filter-row__controls {
  480. display: flex;
  481. flex-direction: column;
  482. gap: $space-2;
  483. min-width: 0;
  484. flex: 1;
  485. }
  486. .filter-row__control-group {
  487. display: flex;
  488. align-items: center;
  489. gap: $space-2;
  490. .filter-select,
  491. .filter-note-input,
  492. .label-input-wrap {
  493. width: 300px;
  494. max-width: 100%;
  495. @include tablet { width: 100%; }
  496. }
  497. &--period {
  498. flex-direction: column;
  499. align-items: flex-start;
  500. gap: $space-2;
  501. }
  502. &--radio {
  503. padding-top: 7px;
  504. gap: $space-4;
  505. }
  506. }
  507. // ─── Meta: Plus-Button + Negativfilter ──────────────────────────────────────
  508. .filter-row__meta {
  509. display: flex;
  510. align-items: center;
  511. gap: $space-3;
  512. padding-top: 7px;
  513. flex-shrink: 0;
  514. white-space: nowrap;
  515. &--no-add {
  516. padding-left: calc(22px + #{$space-3});
  517. }
  518. }
  519. // ─── Plus- und Minus-Button ───────────────────────────────────────────────────
  520. .filter-row__add {
  521. @include icon-btn(22px, $radius-sm);
  522. border: 1px solid $color-input-border;
  523. background: $color-white;
  524. font-size: $font-size-md;
  525. line-height: 1;
  526. color: $color-text-muted;
  527. &:hover {
  528. border-color: var(--color-primary);
  529. color: var(--color-primary);
  530. }
  531. }
  532. .filter-row__remove {
  533. @include icon-btn(20px, $radius-sm);
  534. font-size: $font-size-md;
  535. line-height: 1;
  536. color: $color-text-light;
  537. &:hover {
  538. color: $color-error;
  539. background: rgba($color-error, 0.08);
  540. }
  541. }
  542. // ─── Zeitraum: Custom-Datumsfelder ───────────────────────────────────────────
  543. .filter-custom-dates {
  544. display: flex;
  545. flex-direction: column;
  546. gap: $space-2;
  547. margin-top: $space-2;
  548. }
  549. .filter-date-group {
  550. display: flex;
  551. align-items: center;
  552. gap: $space-2;
  553. }
  554. .filter-date-label {
  555. font-size: $font-size-sm;
  556. color: $color-text-muted;
  557. width: 26px;
  558. flex-shrink: 0;
  559. }
  560. .filter-date-select {
  561. width: auto;
  562. display: inline-block;
  563. &--sm {
  564. padding-right: $space-6;
  565. min-width: 60px;
  566. }
  567. &--month {
  568. padding-right: $space-6;
  569. min-width: 100px;
  570. }
  571. }
  572. // ─── Radio-Filter (Abgeschlossen?) ────────────────────────────────────────────
  573. .filter-radio {
  574. display: inline-flex;
  575. align-items: center;
  576. gap: $space-1;
  577. font-size: $font-size-sm;
  578. color: $color-text-base;
  579. cursor: pointer;
  580. user-select: none;
  581. accent-color: var(--color-primary);
  582. }
  583. // ─── Filter-Footer ────────────────────────────────────────────────────────────
  584. .report-filter__footer {
  585. display: flex;
  586. align-items: center;
  587. gap: $space-4;
  588. padding: $space-4 0;
  589. }
  590. .filter-footer__link {
  591. background: none;
  592. border: none;
  593. padding: 0;
  594. cursor: pointer;
  595. font-family: $font-family-base;
  596. font-size: $font-size-sm;
  597. color: $color-text-muted;
  598. text-decoration: underline;
  599. text-underline-offset: 2px;
  600. transition: color $transition-fast;
  601. &:hover { color: $color-text-base; }
  602. }
  603. // ─── Negativfilter-Checkbox ───────────────────────────────────────────────────
  604. .filter-neg {
  605. display: inline-flex;
  606. align-items: center;
  607. gap: $space-1;
  608. font-size: $font-size-sm;
  609. color: $color-text-muted;
  610. cursor: pointer;
  611. user-select: none;
  612. white-space: nowrap;
  613. input[type="checkbox"] {
  614. width: 13px;
  615. height: 13px;
  616. cursor: pointer;
  617. accent-color: $color-warning;
  618. flex-shrink: 0;
  619. }
  620. &:has(input:checked) {
  621. color: $color-warning;
  622. font-weight: $font-weight-medium;
  623. }
  624. }