Added Import for Large CSV
This commit is contained in:
@@ -22,48 +22,88 @@
|
||||
<xsl:value-of select="$PAGE-TITLE"/>
|
||||
|
|
||||
<xsl:value-of select="//users/record/user_name"/>
|
||||
|
|
||||
<xsl:value-of select="//users/record/user_id"/>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<form action="" name="{$PAGE-NAME}" method="post" id="{$PAGE-NAME}">
|
||||
|
||||
<input type="hidden" name="action" value="Subscriptions.addSubscriptionToUser"/>
|
||||
<input type="hidden" name="step" value="add"/>
|
||||
<input type="hidden" name="action" value="Subscriptions.addSubscriptionToUser"/>
|
||||
<input type="hidden" name="step" value="add"/>
|
||||
<input type="hidden" name="user_serial" value="{//users/record/user_serial}"/>
|
||||
|
||||
<input type="hidden" name="user_serial" value="{//users/record/user_serial}"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="alert alert-info py-2 small">
|
||||
<i class="bi bi-info-circle me-2"/>
|
||||
The subscriptions listed below will be added to the user.
|
||||
</div>
|
||||
|
||||
<div class="row g-4">
|
||||
|
||||
<!-- Left Side: Subscriptions Being Copied -->
|
||||
<div class="col-lg-8">
|
||||
|
||||
<div class="card h-100">
|
||||
|
||||
<div class="card-body p-0">
|
||||
|
||||
<div class="">
|
||||
<table class="table table-sm table-striped table-hover mb-0 align-middle subscriptions_error">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th style="width: 20px;">
|
||||
<input type="checkbox" class="form-check-input" id="selectAllSubscriptions"/>
|
||||
</th>
|
||||
<th>Subscription</th>
|
||||
<th>End Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(//subscriptions/record[not(subscription_serial = //usersubscriptions/record/usersubscription_subscription_serial)]) = 0">
|
||||
<tr>
|
||||
<td colspan="4" class="text-center text-muted py-3">
|
||||
This user already has all available subscriptions.
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="//subscriptions/record[not(subscription_serial = //usersubscriptions/record/usersubscription_subscription_serial)]"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="subscriptions_errors" class="d-none px-3 pt-3">
|
||||
<div class="alert alert-danger py-2 small">
|
||||
<i class="bi bi-info-circle me-2"/>
|
||||
Select at least one subscription to copy.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 mb-3">
|
||||
<label class="form-label" for="subscription_serial">Subscription</label>
|
||||
<select class="form-control form-control-sm search-dropdown" name="subscription_serial" id="subscription_serial" size="1">
|
||||
<xsl:apply-templates select="//subscriptions"/>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 mb-3">
|
||||
|
||||
<label class="form-label" for="subscription_stop_date">Stop Date</label>
|
||||
<div class="input-group input-group-sm subscription_stop_date">
|
||||
<input type="text" class="form-control form-control-sm date-mask" name="subscription_stop_date" id="subscription_stop_date" value="{$TODAY_MMDDYYYY}"/>
|
||||
<button class="btn btn-sm btn-outline-primary btnSubscriptionStopDateCalendar" type="button" data-bs-toggle="tooltip" data-bs-title="Calendar" data-bs-custom-class="custom-tooltip" tabindex="-1">
|
||||
<i class="bi bi-calendar3"/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div class="buttons mt-2 mb-2">
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnSave">
|
||||
<i class="bi bi-save me-2"/>Save</button>
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnCancel">
|
||||
<i class="bi bi-x-lg me-2"/>Cancel</button>
|
||||
<div class="buttons mt-1 mb-2">
|
||||
|
||||
<div class="buttons mt-3 mb-1">
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnCancel">
|
||||
<i class="bi bi-box-arrow-left me-2"/>Cancel
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnSave">
|
||||
<i class="bi bi-floppy me-2"/>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -74,22 +114,24 @@
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- Template for Subscription dropdown -->
|
||||
|
||||
<xsl:template match="subscriptions">
|
||||
|
||||
<option value="">Choose..</option>
|
||||
|
||||
<xsl:for-each select="record">
|
||||
|
||||
<option value="{subscription_serial}" data-tokens="{subscription_serial}">
|
||||
<xsl:value-of select="subscription_title"/>
|
||||
-
|
||||
<xsl:value-of select="subscription_description"/>
|
||||
</option>
|
||||
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- Subscriptions Rows -->
|
||||
<xsl:template match="subscriptions/record">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="form-check-input subscription-checkbox" name="subscriptions[]" value="{subscription_serial}"/>
|
||||
</td>
|
||||
<td class="fw-semibold">
|
||||
<xsl:value-of select="concat(subscription_description, ' - ', subscription_projecttype, ' - ', subscription_area)"/>
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group input-group-sm subscription_end_date">
|
||||
<input type="text" class="form-control form-control-sm date-mask subscription-end-date" name="subscription_end_date[]"/>
|
||||
<button class="btn btn-sm btn-outline-primary btnSubscriptionEndDateCalendar" type="button" data-bs-toggle="tooltip" data-bs-title="Calendar" data-bs-custom-class="custom-tooltip" tabindex="-1">
|
||||
<i class="bi bi-calendar3"/>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="html" encoding="utf-8" indent="yes"/>
|
||||
|
||||
<!-- Parameters -->
|
||||
|
||||
<xsl:param name="VERSION">1.0</xsl:param>
|
||||
<xsl:param name="PAGE-TITLE">Add Subscription to User</xsl:param>
|
||||
<xsl:param name="PAGE-NAME">addSubscriptionToUser</xsl:param>
|
||||
|
||||
<xsl:template match="/">
|
||||
|
||||
<script src="js/{$PAGE-NAME}.js?version={$VERSION}"/>
|
||||
|
||||
<div class="{$PAGE-NAME}">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header bg-primary text-white p-1 ps-3">
|
||||
<i class="bi bi-list-check me-2"/>
|
||||
<xsl:value-of select="$PAGE-TITLE"/>
|
||||
|
|
||||
<xsl:value-of select="//users/record/user_name"/>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<form action="" name="{$PAGE-NAME}" method="post" id="{$PAGE-NAME}">
|
||||
|
||||
<input type="hidden" name="action" value="Subscriptions.addSubscriptionToUser"/>
|
||||
<input type="hidden" name="step" value="add"/>
|
||||
|
||||
<input type="hidden" name="user_serial" value="{//users/record/user_serial}"/>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-8 mb-3">
|
||||
<label class="form-label" for="subscription_serial">Subscription</label>
|
||||
<select class="form-control form-control-sm search-dropdown" name="subscription_serial" id="subscription_serial" size="1">
|
||||
<xsl:apply-templates select="//subscriptions"/>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 mb-3">
|
||||
|
||||
<label class="form-label" for="subscription_stop_date">Stop Date</label>
|
||||
<div class="input-group input-group-sm subscription_stop_date">
|
||||
<input type="text" class="form-control form-control-sm date-mask" name="subscription_stop_date" id="subscription_stop_date" value="{$TODAY_MMDDYYYY}"/>
|
||||
<button class="btn btn-sm btn-outline-primary btnSubscriptionStopDateCalendar" type="button" data-bs-toggle="tooltip" data-bs-title="Calendar" data-bs-custom-class="custom-tooltip" tabindex="-1">
|
||||
<i class="bi bi-calendar3"/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div class="buttons mt-2 mb-2">
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnSave">
|
||||
<i class="bi bi-save me-2"/>Save</button>
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnCancel">
|
||||
<i class="bi bi-x-lg me-2"/>Cancel</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- Template for Subscription dropdown -->
|
||||
|
||||
<xsl:template match="subscriptions">
|
||||
|
||||
<option value="">Choose..</option>
|
||||
|
||||
<xsl:for-each select="record">
|
||||
|
||||
<option value="{subscription_serial}" data-tokens="{subscription_serial}">
|
||||
<xsl:value-of select="subscription_title"/>
|
||||
-
|
||||
<xsl:value-of select="subscription_description"/>
|
||||
</option>
|
||||
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -29,10 +29,10 @@
|
||||
<p>Processed Records Count: <xsl:value-of select="$PROCESSED-RECORD-COUNT"/></p>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$RDI-RECORD-COUNT != $PROCESSED-RECORD-COUNT">
|
||||
<xsl:when test="$CONSOLIDATION-ERROR != '' or $RDI-RECORD-COUNT != $PROCESSED-RECORD-COUNT">
|
||||
<h3 class="text-danger">Consolidation Unsuccessful</h3>
|
||||
<p>
|
||||
<xsl:value-of select="CONSOLIDATION-ERROR"/>
|
||||
<xsl:value-of select="$CONSOLIDATION-ERROR"/>
|
||||
</p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="html" encoding="utf-8" indent="yes"/>
|
||||
|
||||
<!-- Parameters -->
|
||||
|
||||
<xsl:param name="PAGE-NAME">Queued Import Message</xsl:param>
|
||||
|
||||
<xsl:template match="/">
|
||||
|
||||
<script src="js/{$PAGE-NAME}.js?version={$VERSION}"/>
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header bg-primary text-white p-1 ps-3 border-bottom-0">
|
||||
<i class="bi bi-exclamation-triangle me-2" aria-hidden="true"/>
|
||||
<xsl:copy-of select="$PAGE-NAME"/>
|
||||
</div>
|
||||
|
||||
<div class="card-body text-center">
|
||||
|
||||
<p>
|
||||
The CSV File has been successfully uploaded and queued for processing. An email will be sent when the import process is complete.
|
||||
</p>
|
||||
|
||||
<div class="buttons mt-2 mb-2">
|
||||
<a role="button" class="btn btn-sm btn-primary me-2 btnDone">
|
||||
<i class="bi bi-box-arrow-right me-2"/>Done</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
+51
-3
@@ -8,6 +8,7 @@
|
||||
<xsl:param name="VERSION">1.0</xsl:param>
|
||||
<xsl:param name="PAGE-TITLE">Upload CSV File</xsl:param>
|
||||
<xsl:param name="PAGE-NAME">uploadCSVFile</xsl:param>
|
||||
<xsl:param name="IMPORT-TYPE">incremental</xsl:param>
|
||||
|
||||
<xsl:template match="/">
|
||||
|
||||
@@ -33,11 +34,58 @@
|
||||
<input type="hidden" name="step" value="upload"/>
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-6 mt-3 mb-4">
|
||||
<input type="file" class="form-control file-input" name="csvfile" id="csvfile" accept=".csv"/>
|
||||
<input type="file" class="form-control form-control-sm file-input" name="csvfile" id="csvfile" accept=".csv"/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-3 mt-3 mb-4">
|
||||
<select class="form-control form-control-sm" name="upload_type" id="upload_type">
|
||||
|
||||
<xsl:choose>
|
||||
|
||||
<xsl:when test="$IMPORT-TYPE = 'incremental'">
|
||||
|
||||
<option value="incremental" selected="selected">
|
||||
Incremental Upload
|
||||
</option>
|
||||
|
||||
<option value="full">
|
||||
Full Upload
|
||||
</option>
|
||||
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$IMPORT-TYPE = 'full'">
|
||||
|
||||
<option value="incremental">
|
||||
Incremental Upload
|
||||
</option>
|
||||
|
||||
<option value="full" selected="selected">
|
||||
Full Upload
|
||||
</option>
|
||||
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
|
||||
<option value="incremental">
|
||||
Incremental Upload
|
||||
</option>
|
||||
|
||||
<option value="full">
|
||||
Full Upload
|
||||
</option>
|
||||
|
||||
</xsl:otherwise>
|
||||
|
||||
</xsl:choose>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
+2
-2
@@ -261,7 +261,7 @@
|
||||
<div class="buttons mt-2 mb-1">
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary mt-2 me-1 mb-1 btnAddSubscription">
|
||||
<i class="bi bi-plus me-2"/>Add Subscription</button>
|
||||
<i class="bi bi-plus-lg me-2"/>Add Subscription</button>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
|
||||
<div class="buttons mt-2 mb-1">
|
||||
<button type="button" class="btn btn-sm btn-primary mt-2 me-1 mb-1 btnAddNote">
|
||||
<i class="bi bi-plus me-2"/>Add Note</button>
|
||||
<i class="bi bi-plus-lg me-2"/>Add Note</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user