Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
767e918aa5 | ||
|
|
f2ff18f19b | ||
|
|
c148800e72 | ||
|
|
75927c4395 | ||
|
|
6b93cb747b | ||
|
|
1a79924821 | ||
|
|
defb5e3d7b | ||
|
|
d9f28e3b6c |
@@ -124,13 +124,16 @@ public class SqliteDb extends BaseDb implements AccountDb {
|
|||||||
db.setAutoCommit(false);
|
db.setAutoCommit(false);
|
||||||
Query.delete().from(TABLE_TAGS_TRANSACTIONS).where(TRANSACTION_ID,equal(transaction.id())).execute(db);
|
Query.delete().from(TABLE_TAGS_TRANSACTIONS).where(TRANSACTION_ID,equal(transaction.id())).execute(db);
|
||||||
Query.delete().from(TABLE_TRANSACTIONS).where(ID,equal(transaction.id())).execute(db);
|
Query.delete().from(TABLE_TRANSACTIONS).where(ID,equal(transaction.id())).execute(db);
|
||||||
db.setAutoCommit(true);
|
|
||||||
return transaction;
|
return transaction;
|
||||||
} catch (SQLException e){
|
} catch (SQLException e){
|
||||||
try {
|
try {
|
||||||
db.rollback();
|
db.rollback();
|
||||||
} catch (SQLException ignored){};
|
} catch (SQLException ignored){};
|
||||||
throw failedToDropObject(transaction);
|
throw failedToDropObject(transaction);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ subprojects {
|
|||||||
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||||
implementation("de.srsoftware:configuration.api:1.0.2")
|
implementation("de.srsoftware:configuration.api:1.0.2")
|
||||||
implementation("de.srsoftware:tools.jdbc:2.0.7")
|
implementation("de.srsoftware:tools.jdbc:2.0.8")
|
||||||
implementation("de.srsoftware:tools.http:6.0.5")
|
implementation("de.srsoftware:tools.http:6.0.5")
|
||||||
implementation("de.srsoftware:tools.mime:1.1.4")
|
implementation("de.srsoftware:tools.mime:1.1.4")
|
||||||
implementation("de.srsoftware:tools.logging:1.3.2")
|
implementation("de.srsoftware:tools.logging:1.3.2")
|
||||||
|
|||||||
@@ -67,9 +67,16 @@ public class SqliteDb extends BaseDb implements ContactDb{
|
|||||||
db.setAutoCommit(false);
|
db.setAutoCommit(false);
|
||||||
Query.delete().from(TABLE_CONTACTS).where(ID,equal(contact.id())).execute(db);
|
Query.delete().from(TABLE_CONTACTS).where(ID,equal(contact.id())).execute(db);
|
||||||
Query.delete().from(TABLE_CONTACTS_USERS).where(CONTACT_ID,equal(contact.id())).execute(db);
|
Query.delete().from(TABLE_CONTACTS_USERS).where(CONTACT_ID,equal(contact.id())).execute(db);
|
||||||
db.setAutoCommit(true);
|
|
||||||
} catch (SQLException e){
|
} catch (SQLException e){
|
||||||
|
try {
|
||||||
|
db.rollback();
|
||||||
|
} catch (SQLException ignored){};
|
||||||
throw failedToDropObject(t(CONTACT_WITH_ID, ID,contact.id())).causedBy(e);
|
throw failedToDropObject(t(CONTACT_WITH_ID, ID,contact.id())).causedBy(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,9 +69,15 @@ CREATE TABLE IF NOT EXISTS {0} ( {1} VARCHAR(255) PRIMARY KEY, {2} VARCHAR(255)
|
|||||||
update(table).set(STATUS).where(STATUS,equal(20)).prepare(db).apply(40).execute();
|
update(table).set(STATUS).where(STATUS,equal(20)).prepare(db).apply(40).execute();
|
||||||
update(table).set(STATUS).where(STATUS,equal(10)).prepare(db).apply(20).execute();
|
update(table).set(STATUS).where(STATUS,equal(10)).prepare(db).apply(20).execute();
|
||||||
update(table).set(STATUS).where(STATUS,equal(0)).prepare(db).apply(10).execute();
|
update(table).set(STATUS).where(STATUS,equal(0)).prepare(db).apply(10).execute();
|
||||||
db.setAutoCommit(true);
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
try {
|
||||||
|
db.rollback();
|
||||||
|
} catch (SQLException ignored) {}
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,11 +198,17 @@ CREATE TABLE IF NOT EXISTS {0} (
|
|||||||
rs.close();
|
rs.close();
|
||||||
delete().from(TABLE_POSITIONS).where(DOCUMENT_ID,equal(docId)).execute(db);
|
delete().from(TABLE_POSITIONS).where(DOCUMENT_ID,equal(docId)).execute(db);
|
||||||
delete().from(TABLE_DOCUMENTS).where(ID,equal(docId)).execute(db);
|
delete().from(TABLE_DOCUMENTS).where(ID,equal(docId)).execute(db);
|
||||||
db.setAutoCommit(true);
|
|
||||||
if (number != null) return number;
|
if (number != null) return number;
|
||||||
throw failedToDropObject(t(DOCUMENT_WITH_ID, ID,docId));
|
throw failedToDropObject(t(DOCUMENT_WITH_ID, ID,docId));
|
||||||
} catch (SQLException e){
|
} catch (SQLException e){
|
||||||
|
try {
|
||||||
|
db.rollback();
|
||||||
|
} catch (SQLException ignored){};
|
||||||
throw failedToDropObject(t(DOCUMENT_WITH_ID, ID,docId)).causedBy(e);
|
throw failedToDropObject(t(DOCUMENT_WITH_ID, ID,docId)).causedBy(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,10 +223,16 @@ CREATE TABLE IF NOT EXISTS {0} (
|
|||||||
stmt.setLong(2,pos);
|
stmt.setLong(2,pos);
|
||||||
stmt.execute();
|
stmt.execute();
|
||||||
stmt.close();
|
stmt.close();
|
||||||
db.setAutoCommit(true);
|
|
||||||
return pos;
|
return pos;
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
try {
|
||||||
|
db.rollback();
|
||||||
|
} catch (SQLException ignored){};
|
||||||
throw failedToDropObjectFromObject(POSITION,pos,t(Text.DOCUMENT),docId).causedBy(e);
|
throw failedToDropObjectFromObject(POSITION,pos,t(Text.DOCUMENT),docId).causedBy(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -582,9 +594,15 @@ CREATE TABLE IF NOT EXISTS {0} (
|
|||||||
update(TABLE_POSITIONS).set(POS).where(DOCUMENT_ID,equal(docId)).where(POS,equal(pair.left())).prepare(db).apply(-pair.right()).close();
|
update(TABLE_POSITIONS).set(POS).where(DOCUMENT_ID,equal(docId)).where(POS,equal(pair.left())).prepare(db).apply(-pair.right()).close();
|
||||||
update(TABLE_POSITIONS).set(POS).where(DOCUMENT_ID,equal(docId)).where(POS,equal(pair.right())).prepare(db).apply(pair.left()).close();
|
update(TABLE_POSITIONS).set(POS).where(DOCUMENT_ID,equal(docId)).where(POS,equal(pair.right())).prepare(db).apply(pair.left()).close();
|
||||||
update(TABLE_POSITIONS).set(POS).where(DOCUMENT_ID,equal(docId)).where(POS,equal(-pair.right())).prepare(db).apply(pair.right()).close();
|
update(TABLE_POSITIONS).set(POS).where(DOCUMENT_ID,equal(docId)).where(POS,equal(-pair.right())).prepare(db).apply(pair.right()).close();
|
||||||
db.setAutoCommit(true);
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
try {
|
||||||
|
db.rollback();
|
||||||
|
} catch (SQLException ignored){};
|
||||||
throw databaseException(FAILED_TO_SWITCH_POSITIONS,"a",pair.left(),"b",pair.right(),docId).causedBy(e);
|
throw databaseException(FAILED_TO_SWITCH_POSITIONS,"a",pair.left(),"b",pair.right(),docId).causedBy(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
return pair;
|
return pair;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,7 @@
|
|||||||
<Route path="/stock/location/:location_id" component={Stock} />
|
<Route path="/stock/location/:location_id" component={Stock} />
|
||||||
<Route path="/stock/:item_id/view" component={Stock} />
|
<Route path="/stock/:item_id/view" component={Stock} />
|
||||||
<Route path="/stock/:owner/:owner_id/item/:owner_number" component={Stock} />
|
<Route path="/stock/:owner/:owner_id/item/:owner_number" component={Stock} />
|
||||||
|
<Route path="/stock/:owner/:owner_id/item/:owner_number/view" component={Stock} />
|
||||||
<Route path="/tags" component={TagList} />
|
<Route path="/tags" component={TagList} />
|
||||||
<Route path="/tags/use/:tag" component={TagUses} />
|
<Route path="/tags/use/:tag" component={TagUses} />
|
||||||
<Route path="/task" component={TaskList} />
|
<Route path="/task" component={TaskList} />
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { useTinyRouter } from 'svelte-tiny-router';
|
import { useTinyRouter } from 'svelte-tiny-router';
|
||||||
|
import { t } from '../../translations.svelte';
|
||||||
|
|
||||||
import LineEditor from '../../Components/LineEditor.svelte';
|
import LineEditor from '../../Components/LineEditor.svelte';
|
||||||
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
||||||
@@ -23,13 +24,17 @@
|
|||||||
function movedown(){
|
function movedown(){
|
||||||
movePos(pos.number,1);
|
movePos(pos.number,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function toggleOptional(ev){
|
||||||
|
const ok = await submit(`${prefix}.optional`,!pos.optional);
|
||||||
|
if (ok) pos.optional = !pos.optional;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.move{
|
.move{
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr > *:nth-child(1){
|
tr > *:nth-child(1){
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
@@ -66,6 +71,7 @@
|
|||||||
<span onclick={moveup}>⏫</span>
|
<span onclick={moveup}>⏫</span>
|
||||||
{/if}
|
{/if}
|
||||||
<span onclick={() => drop(pos.number)}>❌</span>
|
<span onclick={() => drop(pos.number)}>❌</span>
|
||||||
|
<span class="symbol" onclick={toggleOptional} title={t(pos.optional?'optional position':'fixed position')}>{pos.optional?'':''}</span>
|
||||||
<span onclick={movedown}>⏬</span>
|
<span onclick={movedown}>⏬</span>
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -265,8 +265,10 @@
|
|||||||
<legend>
|
<legend>
|
||||||
{t('stock')}
|
{t('stock')}
|
||||||
</legend>
|
</legend>
|
||||||
|
{#if Object.keys(stock.items).length }
|
||||||
|
{t('items')}
|
||||||
<ul>
|
<ul>
|
||||||
{#each Object.values(stock) as item}
|
{#each Object.values(stock.items) as item}
|
||||||
<li>
|
<li>
|
||||||
<a href="/stock/{item.owner.type}/{item.owner.id}/item/{item.owner_number}" {onclick} >
|
<a href="/stock/{item.owner.type}/{item.owner.id}/item/{item.owner_number}" {onclick} >
|
||||||
{item.name} [{t('code')}: <span class="code">{item.code}</span>]
|
{item.name} [{t('code')}: <span class="code">{item.code}</span>]
|
||||||
@@ -275,6 +277,18 @@
|
|||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
|
{/if}
|
||||||
|
{#if Object.keys(stock.locations).length}
|
||||||
|
{t('locations')}
|
||||||
|
<ul>
|
||||||
|
{#each Object.values(stock.locations) as loc (loc.id)}
|
||||||
|
<li>
|
||||||
|
<a href="/stock/location/{loc.id}">{loc.name}</a>
|
||||||
|
<br/> {@html loc.description.rendered}
|
||||||
|
</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
{/if}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{/if}
|
{/if}
|
||||||
{#if times}
|
{#if times}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{#each locations as location}
|
{#each locations as location}
|
||||||
<li onclick={e => toggleChildren(e, location)}
|
<li onclick={e => toggleChildren(e, location)}
|
||||||
class="{location.locations?'expanded':'collapsed'} {location.highlight?'highlight':null}"
|
class="{location.locations?'expanded':'collapsed'} {location.highlight?'highlight':null} {selected && selected.id == location.id?'selected':null}"
|
||||||
draggable={true}
|
draggable={true}
|
||||||
ondragover={e => drag_over(e,location)}
|
ondragover={e => drag_over(e,location)}
|
||||||
ondrop={e => onDrop(e,location)}
|
ondrop={e => onDrop(e,location)}
|
||||||
|
|||||||
@@ -63,10 +63,16 @@ public class SqliteDb extends BaseDb implements StockDb {
|
|||||||
rs.close();
|
rs.close();
|
||||||
if (propertyId == null || propertyId == 0) throw failedToStoreObject(t(PROPERTY));
|
if (propertyId == null || propertyId == 0) throw failedToStoreObject(t(PROPERTY));
|
||||||
insertInto(TABLE_ITEM_PROPERTIES,ITEM_ID,PROPERTY_ID,VALUE).values(itemId,propertyId,value).execute(db).close();
|
insertInto(TABLE_ITEM_PROPERTIES,ITEM_ID,PROPERTY_ID,VALUE).values(itemId,propertyId,value).execute(db).close();
|
||||||
db.setAutoCommit(true);
|
|
||||||
return new Property(propertyId,name,value,unit);
|
return new Property(propertyId,name,value,unit);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
try {
|
||||||
|
db.rollback();
|
||||||
|
} catch (SQLException ignored){};
|
||||||
throw failedToStoreObject(t(PROPERTY)).causedBy(e);
|
throw failedToStoreObject(t(PROPERTY)).causedBy(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,9 +207,8 @@ public class SqliteDb extends BaseDb implements StockDb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Long, Item> find(Collection<Owner> owners, Collection<String> keys, boolean fulltext) {
|
public Map<Long, Item> findItems(Collection<Owner> owners, Collection<String> keys, boolean fulltext) {
|
||||||
try {
|
try {
|
||||||
var items = new HashMap<Long,Item>();
|
|
||||||
var ownerCodes = owners.stream().map(Owner::dbCode).toArray();
|
var ownerCodes = owners.stream().map(Owner::dbCode).toArray();
|
||||||
var query = select(ALL).from(TABLE_ITEMS).where(OWNER, in(ownerCodes));
|
var query = select(ALL).from(TABLE_ITEMS).where(OWNER, in(ownerCodes));
|
||||||
if (fulltext) {
|
if (fulltext) {
|
||||||
@@ -213,6 +218,7 @@ public class SqliteDb extends BaseDb implements StockDb {
|
|||||||
for (var key : keys) query.where(NAME,like("%"+key+"%"));
|
for (var key : keys) query.where(NAME,like("%"+key+"%"));
|
||||||
}
|
}
|
||||||
var rs = query.exec(db);
|
var rs = query.exec(db);
|
||||||
|
var items = new HashMap<Long,Item>();
|
||||||
while (rs.next()){
|
while (rs.next()){
|
||||||
var item = Item.of(rs);
|
var item = Item.of(rs);
|
||||||
items.put(item.id(),item);
|
items.put(item.id(),item);
|
||||||
@@ -224,6 +230,29 @@ public class SqliteDb extends BaseDb implements StockDb {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<Long, Location> findLocations(Collection<Owner> owners, Collection<String> keys, boolean fulltext) {
|
||||||
|
try {
|
||||||
|
var ownerCodes = owners.stream().map(Owner::dbCode).toArray();
|
||||||
|
var query = select(ALL).from(TABLE_LOCATIONS).where(OWNER, in(ownerCodes));
|
||||||
|
if (fulltext) {
|
||||||
|
for (var key : keys) query.where(format("CONCAT({0},\" \",{1})", NAME, DESCRIPTION), like("%" + key + "%"));
|
||||||
|
} else {
|
||||||
|
for (var key : keys) query.where(NAME, like("%" + key + "%"));
|
||||||
|
}
|
||||||
|
var rs = query.exec(db);
|
||||||
|
var locations = new HashMap<Long, Location>();
|
||||||
|
while (rs.next()) {
|
||||||
|
var location = DbLocation.of(rs);
|
||||||
|
locations.put(location.id(), location);
|
||||||
|
}
|
||||||
|
rs.close();
|
||||||
|
return locations;
|
||||||
|
} catch (SQLException e){
|
||||||
|
throw databaseException(FAILED_TO_LIST_ENTITIES, TYPE,t(LOCATIONS)).causedBy(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<DbLocation> listChildLocations(long parentId) {
|
public Collection<DbLocation> listChildLocations(long parentId) {
|
||||||
try {
|
try {
|
||||||
@@ -601,13 +630,16 @@ public class SqliteDb extends BaseDb implements StockDb {
|
|||||||
replaceLocationsTable();
|
replaceLocationsTable();
|
||||||
replaceItemsTable();
|
replaceItemsTable();
|
||||||
replaceItemPropsTable();
|
replaceItemPropsTable();
|
||||||
db.setAutoCommit(true);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
try {
|
try {
|
||||||
db.rollback();
|
db.rollback();
|
||||||
} catch (SQLException ignored) {
|
} catch (SQLException ignored) {
|
||||||
}
|
}
|
||||||
throw databaseException(FAILED_TO_UPDATE_OBJECT, OBJECT, t(TABLE_WITH_NAME,NAME,TABLE_LOCATIONS)).causedBy(e);
|
throw databaseException(FAILED_TO_UPDATE_OBJECT, OBJECT, t(TABLE_WITH_NAME,NAME,TABLE_LOCATIONS)).causedBy(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ import java.util.Map;
|
|||||||
public interface StockDb {
|
public interface StockDb {
|
||||||
Property addNewProperty(long itemId, String name, Object value, String unit);
|
Property addNewProperty(long itemId, String name, Object value, String unit);
|
||||||
Location delete(DbLocation location);
|
Location delete(DbLocation location);
|
||||||
Map<Long, Item> find(Collection<Owner> owners, Collection<String> keys, boolean fulltext);
|
Map<Long, Item> findItems(Collection<Owner> owners, Collection<String> keys, boolean fulltext);
|
||||||
|
Map<Long, Location> findLocations(Collection<Owner> owners, Collection<String> keys, boolean fulltext);
|
||||||
Collection<DbLocation> listChildLocations(long parentId);
|
Collection<DbLocation> listChildLocations(long parentId);
|
||||||
Collection<DbLocation> listCompanyLocations(Company company);
|
Collection<DbLocation> listCompanyLocations(Company company);
|
||||||
Collection<Item> listItemsAt(Location location);
|
Collection<Item> listItemsAt(Location location);
|
||||||
|
|||||||
@@ -463,8 +463,9 @@ public class StockModule extends BaseHandler implements StockService {
|
|||||||
var fulltext = json.has(FULLTEXT) && json.get(FULLTEXT) instanceof Boolean val && val;
|
var fulltext = json.has(FULLTEXT) && json.get(FULLTEXT) instanceof Boolean val && val;
|
||||||
Set<Owner> owners = new HashSet<>(companyService().listCompaniesOf(user).values());
|
Set<Owner> owners = new HashSet<>(companyService().listCompaniesOf(user).values());
|
||||||
owners.add(user);
|
owners.add(user);
|
||||||
var items = stockDb.find(owners,keys,fulltext);
|
var items = stockDb.findItems(owners,keys,fulltext);
|
||||||
return sendContent(ex,mapValues(items));
|
var locations = stockDb.findLocations(owners,keys,fulltext);
|
||||||
|
return sendContent(ex,Map.of("items",mapValues(items),"locations",mapValues(locations)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -340,7 +340,6 @@ CREATE TABLE IF NOT EXISTS {0} (
|
|||||||
var addQuery = replaceInto(TABLE_TASK_DEPENDENCIES, TASK_ID, REQUIRED_TASK_ID);
|
var addQuery = replaceInto(TABLE_TASK_DEPENDENCIES, TASK_ID, REQUIRED_TASK_ID);
|
||||||
for (var reqId : task.requiredTasksIds()) addQuery.values(task.id(), reqId);
|
for (var reqId : task.requiredTasksIds()) addQuery.values(task.id(), reqId);
|
||||||
addQuery.execute(db).close();
|
addQuery.execute(db).close();
|
||||||
db.setAutoCommit(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task.clean(REQUIRED_TASKS_IDS);
|
task.clean(REQUIRED_TASKS_IDS);
|
||||||
@@ -354,7 +353,14 @@ CREATE TABLE IF NOT EXISTS {0} (
|
|||||||
}
|
}
|
||||||
return task;
|
return task;
|
||||||
} catch (SQLException e){
|
} catch (SQLException e){
|
||||||
|
try {
|
||||||
|
db.rollback();
|
||||||
|
} catch (SQLException ignored){};
|
||||||
throw failedToStoreObject(task.name()).causedBy(e);
|
throw failedToStoreObject(task.name()).causedBy(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,10 +84,16 @@ CREATE TABLE IF NOT EXISTS {0} (
|
|||||||
db.setAutoCommit(false);
|
db.setAutoCommit(false);
|
||||||
Query.delete().from(TABLE_TASK_TIMES).where(TIME_ID,equal(timeId)).execute(db);
|
Query.delete().from(TABLE_TASK_TIMES).where(TIME_ID,equal(timeId)).execute(db);
|
||||||
Query.delete().from(TABLE_TIMES).where(ID,equal(timeId)).execute(db);
|
Query.delete().from(TABLE_TIMES).where(ID,equal(timeId)).execute(db);
|
||||||
db.setAutoCommit(false);
|
|
||||||
return timeId;
|
return timeId;
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
try {
|
||||||
|
db.rollback();
|
||||||
|
} catch (SQLException ignored) {}
|
||||||
throw failedToDropObject(t(TIME_WITH_ID, ID,timeId)).causedBy(e);
|
throw failedToDropObject(t(TIME_WITH_ID, ID,timeId)).causedBy(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
db.setAutoCommit(true);
|
||||||
|
} catch (SQLException ignored){};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
"filter": "Filter",
|
"filter": "Filter",
|
||||||
"filter by tags": "Nach Tags filtern",
|
"filter by tags": "Nach Tags filtern",
|
||||||
"first_transaction": "erste Transaktion",
|
"first_transaction": "erste Transaktion",
|
||||||
|
"fixed position": "fester Posten",
|
||||||
"footer": "Fuß-Text",
|
"footer": "Fuß-Text",
|
||||||
"foreign_id": "externe Kennung",
|
"foreign_id": "externe Kennung",
|
||||||
"forgot_pass" : "Password vergessen?",
|
"forgot_pass" : "Password vergessen?",
|
||||||
@@ -278,7 +279,9 @@
|
|||||||
|
|
||||||
"oidc_Login" : "Anmeldung mit OIDC",
|
"oidc_Login" : "Anmeldung mit OIDC",
|
||||||
"old_password": "altes Passwort",
|
"old_password": "altes Passwort",
|
||||||
|
"offer": "Angebot",
|
||||||
"option": "Option",
|
"option": "Option",
|
||||||
|
"optional position": "optionaler Posten",
|
||||||
"options": "Optionen",
|
"options": "Optionen",
|
||||||
"organization": "Organisation",
|
"organization": "Organisation",
|
||||||
"other party": "Gegenseite",
|
"other party": "Gegenseite",
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
"filter": "filter",
|
"filter": "filter",
|
||||||
"filter by tags": "filter by tags",
|
"filter by tags": "filter by tags",
|
||||||
"first_transaction": "first transaction",
|
"first_transaction": "first transaction",
|
||||||
|
"fixed position": "fixed position",
|
||||||
"footer": "footer",
|
"footer": "footer",
|
||||||
"foreign_id": "external ID",
|
"foreign_id": "external ID",
|
||||||
"forgot_pass" : "forgot password?",
|
"forgot_pass" : "forgot password?",
|
||||||
@@ -278,7 +279,9 @@
|
|||||||
|
|
||||||
"oidc_Login" : "Login via OIDC",
|
"oidc_Login" : "Login via OIDC",
|
||||||
"old_password": "old password",
|
"old_password": "old password",
|
||||||
|
"offer": "offer",
|
||||||
"option": "option",
|
"option": "option",
|
||||||
|
"optional position": "optional position",
|
||||||
"options": "options",
|
"options": "options",
|
||||||
"organization": "organization",
|
"organization": "organization",
|
||||||
"other party": "other party",
|
"other party": "other party",
|
||||||
|
|||||||
@@ -341,6 +341,18 @@ tr:hover .taglist .tag button {
|
|||||||
color: yellow;
|
color: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.locations .selected span{
|
||||||
|
background: brown;
|
||||||
|
color: yellow;
|
||||||
|
}
|
||||||
@media screen and (max-width: 900px) {
|
@media screen and (max-width: 900px) {
|
||||||
#app nav a{
|
#app nav a{
|
||||||
background: black;
|
background: black;
|
||||||
|
|||||||
@@ -390,6 +390,7 @@ span.timetracking {
|
|||||||
|
|
||||||
table{
|
table{
|
||||||
min-width: 30vw;
|
min-width: 30vw;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.start_end{
|
.start_end{
|
||||||
@@ -485,6 +486,14 @@ select.autocomplete{
|
|||||||
width: calc(100% - 50px);
|
width: calc(100% - 50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top: 3px solid;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 900px) {
|
@media screen and (min-width: 900px) {
|
||||||
#app nav > button.symbol{
|
#app nav > button.symbol{
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -337,6 +337,18 @@ code,
|
|||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom-color: gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top-color: gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.locations .selected span{
|
||||||
|
background: gold;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
@media screen and (max-width: 900px) {
|
@media screen and (max-width: 900px) {
|
||||||
#app nav a{
|
#app nav a{
|
||||||
background: black;
|
background: black;
|
||||||
|
|||||||
@@ -484,6 +484,7 @@ span.timetracking {
|
|||||||
|
|
||||||
table{
|
table{
|
||||||
min-width: 30vw;
|
min-width: 30vw;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.start_end{
|
.start_end{
|
||||||
@@ -589,6 +590,14 @@ select.autocomplete{
|
|||||||
width: calc(100% - 50px);
|
width: calc(100% - 50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top: 3px solid;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 900px) {
|
@media screen and (min-width: 900px) {
|
||||||
#app nav > button.symbol{
|
#app nav > button.symbol{
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -288,6 +288,18 @@ tr:hover .taglist .tag button {
|
|||||||
background: cyan;
|
background: cyan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.locations .selected span{
|
||||||
|
background: #afffff;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
@media screen and (max-width: 900px) {
|
@media screen and (max-width: 900px) {
|
||||||
#app nav a{
|
#app nav a{
|
||||||
background: white;
|
background: white;
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ span.timetracking {
|
|||||||
|
|
||||||
table{
|
table{
|
||||||
min-width: 30vw;
|
min-width: 30vw;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.start_end{
|
.start_end{
|
||||||
@@ -578,6 +579,14 @@ select.autocomplete{
|
|||||||
width: calc(100% - 50px);
|
width: calc(100% - 50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top: 3px solid;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 900px) {
|
@media screen and (min-width: 900px) {
|
||||||
#app nav > button.symbol{
|
#app nav > button.symbol{
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user